Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

Removable Media and /etc/fstab

CD−ROMs are traditionally mounted on /cdrom, and floppy disks are usually mounted on /mnt. To make your life a little easier when mounting media, set up /etc/fstab to reflect this. If a removable filesystem has an entry in /etc/fstab, you can drop the device name when mounting it. This means that you don't have to remember the device name or the exact command to mount that particular filesystem.

...............................................................................................

# mount /mnt

#

...............................................................................................

That would be easier than typing mount_msdos /dev/fd0 /mnt every time, wouldn't it?

When listing removable media in /etc/fstab, be sure to include the noauto flag, or your boot will stop in single−user mode, because there's nothing in the floppy drive or CD−ROM tray!

Creating a Floppy

What most Windows users think of as "formatting a floppy" is actually a multistage process that usually includes formatting the disk, as well as giving it a disk label and a filesystem. You need to perform all of these operations to create a floppy in FreeBSD.

Note For our purposes, we'll assume that you have a standard 1.44MB floppy disk, which has been the standard on x86 hardware for over a decade. If you have an 800KB disk, or some other unusual size, you'll have to modify this process somewhat, but the general steps are the same.

Low−Level Formatting

To begin formatting your disk, low−level format it with fdformat(1). This program only requires two arguments: the floppy's size and the device name.

...............................................................................................

# fdformat −f 1440 /dev/fd0

Format 1440K floppy `/dev/fd0.1440'? (y/n): y

...............................................................................................

When you type y, fdformat will start running a low−level format to prepare the disk to receive a filesystem; it won't create one. Low−level formatting is the slowest part of making a floppy usable.

Creating an FFS Filesystem

If you're creating an FFS floppy, label the disk with disklabel(8). This writes basic identification information to the floppy, sets partition information, and can even mark a disk as bootable. Marking a disk as bootable doesn't actually put any of the programs that you would need on it, mind you; it

381