V.0.1 If there are any questions or comments, please direct them to walt@erudition.net. The newest copy of this How-To can always be retrieved from www.erudition.net/freebsd/. All rights for the reproduction of this document are reserved. Summary This mini HowTo deals with mounting DOS Floppies and FAT16/FAT32/VFAT HardDisks in FreeBSD, and includes a quick section on the background for partitioning schemes in x86 systems. Outline 1. Background - HardDisk Partitions 2. Usage 2.1. Mounting DOS HardDisks 2.2. Mounting DOS Floppy Disks 3. Appendix 1. Background Keep in mind that the following applies not only to FAT16, but also FAT32 and VFAT. In the name of expediency, the term 'DOS' is used as a catch-all to denote all of them. 1.1. HardDisk Partitions Without knowledge of the basic partition strategy on DOS/Windows/Linux/BSD - x86 OSes in general - one is often left somewhat confused when it comes to mounting DOS partitions in FreeBSD. These restrictions are ancient, and contigent upon the BIOS structure found in all x86 systems. DOS primary partitions are limited to a maximum of four. DOS extended partitions, a method for allowing additional partitions, can number higher, and allow one to design a system with more than four partitions, however, these extended DOS partitions are not bootable. FreeBSD on x86 systems suffers from the same limitation of four primary partitions; however, in FreeBSD parlance, the 'parimary partitions' are the 'slices' 1 - 4; in addition, in FreeBSD parlance, the *working* equivalent of DOS 'extended partitions' are called 'partitions.' That is, FreeBSD 'partitions' in FreeBSD perform the same task as DOS 'extended partitions' in DOS. This difference in terminology often confuses newcomers to FreeBSD. To further confuse newcomers, DOS extended partitions, as well as primary partitions, are recognized as slices under FreeBSD. Although, FreeBSD is limited to 4 bootable FreeBSD slices, it can mount more than four slices, be they FreeBSD slices, or slices corresponding to other OS partitioning schemes. In this manner, FreeBSD is far more flexible. 2. Usage As mentioned previously, DOS primary and extended partitions are recognized as slices in FreeBSD. The primary partitions correspond to slices numbering 1 through 4, while the extended partitions start at slice 5. For instance, if one has a DOS drive with a single primary partition, and 4 extended partitions, the single primary partition would be referenced by slice 1 in FreeBSD, and the 4 extended partitions would be referenced by slices 5, 6, 7, and 8 in FreeBSD. Presuming that the DOS partitions existed on a common IDE drive, and this was the first drive in the system, then the following table illustrates the corresponding device file for each DOS partition: DOS Partitions | FreeBSD Slices ----------------------------------------------------- 1st DOS Primary /dev/wd0s1 1st DOS Extended /dev/wd0s5 2nd " " /dev/wd0s6 3rd " " /dev/wd0s7 4th " " /dev/wd0s8 2.1. Mounting DOS HardDisks Understanding the concepts introduced in the previous sections, the syntax required for mounting DOS partitions should not be alien. To specify that one is mounting a DOS partition the 'msdos' parameter needs to be specified with the -t option. For instance, if one is mounting the first extended partition of a DOS drive, which is the second drive on the system, on the mount point '/mnt/dos/' then the following command will accomplish this: (root@erudition)/mnt># mount -t msdos /dev/wd1s5 /mnt/dos 2.2. Mounting DOS Floppy Disks To mount a DOS floppy, the partition issues previously introduced can be ignored. For instance, to mount a floppy disk, in the first floppy drive, on the mount point '/mnt/floppy/' then the following command will suffice: (root@erudition)/mnt># mount -t msdos /dev/fd0 /mnt/flp 3. Appendix mount(8)