Goals
Format the floppy
Create a filesystem on a floppy disk
mount the new filesystem in the overall Linux file structure
write files to the new filesystem
umount the filesystem when you are done
In the diagram below, /dev/hda2 is the second primary partition on our classroom hard drives. Note that the /var directory is a mount point for another partition on our hard drives. In this example it is /dev/hda5 which is the first logical drive in the extended partition.
In this lab we will be building a filesystem on /dev/fd0, the first floppy device. Then we will mount /dev/fd0 on the directory /mnt/floppy. This directory is called the mount point. This will make the small filesystem living on the floppy part of the overall Linux filesystem tree. You will be able to access the data on the floppy without being concerned on which partition or device the data lives.

Lab:
Accessing Floppy Disks - DOS and ext2 Filesystems
Purpose:
To create a DOS filesystem on a floppy disk
mount the new filesystem in the overall Linux filesystem.
use that new filesystem and, when finished with it,
unmount it and remove the floppy disk.
Syntax:
# fdformat <device>
# mkfs -t <filesystem type> <device>
# mount -t <filesystem type> <device> <mount-point>
# ls -la <mount-point>
# umount <device or mount-point>
Procedure:
Format the floppy
# fdformat /dev/fd0H1440
NOTE: You may have umount the device first!
# umount /mnt/floppy
Create the msdos filesystem on the floppy
# /sbin/mkfs -t msdos /dev/fd0
Mount the device in the linux filesystem
# mount -t msdos /dev/fd0 /mnt/floppy
Do a long listing of the /mnt/floppy filesystem
# ls -la /mnt/floppy
Write a file to the directory
# cp /etc/redhat-release /mnt/floppy
Do another listing
# ls -la /mnt/floppy
Remove the device from the Linux filesystem
# umount /mnt/floppy
/dev/fd0 is for the first floppy drive
fd0H1440 means you are using a 3.5 inch high-density floppy disk with a capacity of 1.44 MB.
mount: places your newly defined filesystem in the tree-like file hierarchy
You must be the root user to mount or umount a filesystem for security reasons
file system type msdos doesn't support long file names but vfat does
Create an /ext2 filesystem on the floppy and mount it
This same series of command can be used to create an ext2 filesystem on the floppy.
# umount /mnt/floppy
# mkfs -t ext2 /dev/fd0
# mount -t ext2 /dev/fd0 /mnt/floppy
# ls -la /mnt/floppy
total 17
drwxr-xr-x 3 root root 1024 Sep 17 12:53 .
drwxr-xr-x 12 root root 4096 Sep 4 20:11 ..
drwx------ 2 root root 12288 Sep 17 12:53 lost+found
# cp /etc/redhat-release /mnt/floppy
# cat redhat-release
Red Hat Linux release 7.3 (Valhalla)
When you are done, you must turn your floppy back into a boot floppy for your machine!
# umount /mnt/floppy
# mkbootdisk --device /dev/fd0 `uname -r`
Your system mounts the partitions you created and build filesystems on at boot time. The system refers to the configuration file, /etc/fstab. This file tells your system on which directory to mount a particular filesystem.
$ cat /etc/fstab