.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Podwrapper::Man 1.47.8 (Pod::Simple 3.47)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Required to disable full justification in groff 1.23.0.
.if n .ds AD l
.\" ========================================================================
.\"
.IX Title "nbdkit-floppy-plugin 1"
.TH nbdkit-floppy-plugin 1 2026-04-25 nbdkit-1.47.8 NBDKIT
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
nbdkit\-floppy\-plugin \- create virtual floppy disk from directory
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 2
\& nbdkit floppy [dir=]DIRECTORY
\&               [label=LABEL] [size=SIZE]
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
\&\f(CW\*(C`nbdkit\-floppy\-plugin\*(C'\fR is a plugin for \fBnbdkit\fR\|(1) which creates a
virtual FAT\-formatted floppy disk image from a directory on the fly.
The files in the specified directory (and subdirectories) appear in
the virtual floppy, which is served read\-only over the NBD protocol.
.PP
The virtual floppy disk will have a single partition (using an MBR
partition table).  In that partition will be a virtual FAT32
filesystem containing the files.  Long filenames are supported.
.PP
To create a CD/ISO, see \fBnbdkit\-iso\-plugin\fR\|(1).  To create a Linux
compatible virtual disk, see \fBnbdkit\-linuxdisk\-plugin\fR\|(1).
.PP
\&\fBNote:\fR The plugin does not save a temporary copy of the files, so
you must leave the directory alone while nbdkit is running, else you
may get an error (for example if the plugin tries to open one of the
files which you have moved or deleted).  This is different from how
\&\fBnbdkit\-iso\-plugin\fR\|(1) and \fBnbdkit\-linuxdisk\-plugin\fR\|(1) work, as
both of those plugins keep a temporary copy of the files and
directories.
.SH EXAMPLE
.IX Header "EXAMPLE"
Create a virtual floppy disk:
.PP
.Vb 1
\& nbdkit floppy /path/to/directory
.Ve
.SH PARAMETERS
.IX Header "PARAMETERS"
.IP [\fBdir=\fR]DIRECTORY 4
.IX Item "[dir=]DIRECTORY"
Specify the directory containing files and subdirectories which will
be added to the virtual floppy disk.  Files inside this directory will
appear in the root directory of the virtual floppy.
.Sp
This parameter is required.
.Sp
\&\f(CW\*(C`dir=\*(C'\fR prefix may be omitted in most cases.
See "Magic parameters" in \fBnbdkit\fR\|(1).
.IP \fBlabel=\fRLABEL 4
.IX Item "label=LABEL"
The optional volume label for the filesystem.  This may be up to 11
ASCII characters.  If omitted, \f(CW\*(C`NBDKITFLOPY\*(C'\fR is used.
.IP \fBsize=\fRSIZE 4
.IX Item "size=SIZE"
Optional total disk size.  If omitted then the disk will only be large
enough to store all the files and directories from \f(CW\*(C`DIRECTORY\*(C'\fR with
no free space.
.SH LIMITATIONS
.IX Header "LIMITATIONS"
The maximum size of the disk is around 2TB.  The maximum size of a
single file is 4GB.  Non\-regular files (such as block special,
symbolic links, sockets) are not supported and will be ignored.
.PP
The plugin does not support writes.  \fBnbdkit\-cow\-filter\fR\|(1) can be
placed on top to enable writes, but they will be thrown away when
nbdkit exits and not written to the underlying directory.
.PP
The virtual floppy will not be bootable.  This could be added in
future (using SYSLINUX) but requires considerable work.  As a
workaround use \fBnbdkit\-iso\-plugin\fR\|(1) instead.
.PP
FAT32 is always used, even for small disks (where dosfstools, for
example, would choose FAT12 or FAT16).  This results in extra wasted
space, but since it is only \fIvirtual\fR wasted space it isn\*(Aqt really
important, and it simplifies the implementation greatly.
.SH FILES
.IX Header "FILES"
.ie n .IP \fR\fI$plugindir\fR\fI/nbdkit\-floppy\-plugin.so\fR 4
.el .IP \fR\f(CI$plugindir\fR\fI/nbdkit\-floppy\-plugin.so\fR 4
.IX Item "$plugindir/nbdkit-floppy-plugin.so"
The plugin.
.Sp
Use \f(CW\*(C`nbdkit \-\-dump\-config\*(C'\fR to find the location of \f(CW$plugindir\fR.
.SH VERSION
.IX Header "VERSION"
\&\f(CW\*(C`nbdkit\-floppy\-plugin\*(C'\fR first appeared in nbdkit 1.8.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBnbdkit\fR\|(1),
\&\fBnbdkit\-plugin\fR\|(3),
\&\fBnbdkit\-file\-plugin\fR\|(1),
\&\fBnbdkit\-linuxdisk\-plugin\fR\|(1),
\&\fBnbdkit\-iso\-plugin\fR\|(1).
.SH AUTHORS
.IX Header "AUTHORS"
Richard W.M. Jones
.SH COPYRIGHT
.IX Header "COPYRIGHT"
Copyright Red Hat
.SH LICENSE
.IX Header "LICENSE"
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
.IP \(bu 4
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.IP \(bu 4
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.IP \(bu 4
Neither the name of Red Hat nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
.PP
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS \*(Aq\*(AqAS IS\*(Aq\*(Aq AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
