If you don’t have your floppy device,
/dev/fd0 set up yet
This should be done already since 99.5% of floppies at this time are
the same and some reasonable assumptions were possible at install
time. First, there should be a device in the
/dev/ directory that
correctly deals with your particular hardware device. In fact, there
are lots of other too, in case you find yourself with a weird floppy
drive. The trick is to find the right one. This command will show you
ls /dev/fd* Then you would need to associate the
correct one with the standard
Heres an example:
# setfdprm -p /dev/fd0 1440/1440
How to low-level format a floppy
Don’t screw this up and put the wrong device!
What about an old floppy (like a DR-DOS boot image from an old 720k disk)? Well, there’s a lot of old fashioned screwy systems out there. This almost worked, but it didn’t boot (hmmm) :
Then use dd as described below to move the image on to the disk.
Creating the file system
fdformat just gets things ready for something useful. Now you have
to do the real formatting with the filesystem you want. To make a
native Linux filesystem:
mke2fs -c -v -L "SomeName" /dev/fd0
-c is to do a "bad block" check, the
-v is verbose, the
-L "name" is to give the floppy a volume label.
Accessing the floppy
After following these steps, you now have a disk with a filesystem on it, but that filesystem still hasn’t been attached or mounted to YOUR filesystem tree. You must now mount the floppies filesystem:
mount -t ext2 /dev/fd0 /mnt/floppy
/mnt/floppy is the name of a directory you create (it could be
anything you like) that you can access the floppy from.
Of course, when you’re done with the floppy, you have to tell Linux to
take care of anything it was caching by unmounting it:
Dealing with DOS disks
Using the Unix-style file system is great for many reasons like
filename flexibility, permission preservation, sensible dates, etc.
But unfortunately, there are times when you need to deal with DOS (FAT
filesystems) disks. I have no direct experience, but it seems like the
mtools are a nice package. There are things like mformat, mcopy,
minfo, mdel, mdeltree and many other. I think that if I had to send
off a DOS disk to someone, I would use mformat, then mount it
mount -t msdos /mnt/floppy) and then treat it like a normal Linux
Dealing with Recovery/Boot disks
If you have a disk image of some boot disk you like (and this is a good idea!) you can copy the image onto a floppy with this:
dd if=./hal91.img of=/dev/fd0
Conversely if you have a nice boot disk (or a disk with anything on it that you’d like to preserve as an image) do the reverse:
dd if=/dev/fd0 of=./hal91.img
These two options assume that your disk image will be in the current directory and called hal91.img. The size of the image that I got from a floppy was 1,474,560 bytes.
By the way, the Red Hat boot disk says to copy it thusly:
dd if=rescue.img of=/dev/fd0 bs=72k
I don’t know what bs means here (maybe block size?). Anyway, the bs seemed to not be necessary.
This particular boot disk,
hal91 is a micro distribution that fits
on one disk. It is great except for one little problem - it doesn’t
So if your main Linux setup is on
/dev/hda7, like mine is, you’re
SOL. I redid it somewhat ditching its impressive, yet weak networking
skills in favor of 1. the mknod program and some info on how to use it
and 2. vi (it originally comes with joe and/or pico - not my thang.)
This is accomplished by mounting the disk (it’s msdos filesystem) and
pulling out the tar file
/hal91/add.tgz. You can redo this to
contain whatever you want that will fit. That’s the trick, of course.
When you’re done modifying, put it back as a tar and put it back on
the disk. Should work…