Frequently Asked Questions for FreeBSD 2.X : System Administration : I have a new removable drive, how do I use it?
Previous: How can I add my new hard disk to my FreeBSD system?
Next: How do I mount a secondary DOS partition?

8.4. I have a new removable drive, how do I use it?

Whether it's a removable drive like a ZIP or an EZ drive (or even a floppy, if you want to use it that way), or a new hard disk, once it's installed and recognized by the system, and you have your cartridge/floppy/whatever slotted in, things are pretty much the same for all devices.

(this section is based on Mark Mayo's ZIP FAQ)

If it's a ZIP drive or a floppy , you've already got a DOS filesystem on it, you can use a command like this:

        mount -t msdos /dev/fd0c /floppy
      

if it's a floppy, or this:

        mount -t msdos /dev/sd2s4 /zip
      

for a ZIP disk with the factory configuration.

For other disks, see how they're laid out using fdisk or /stand/sysinstall.

The rest of the examples will be for a ZIP drive on sd2, the third SCSI disk.

Unless it's a floppy, or a removable you plan on sharing with other people, it's probably a better idea to stick a BSD file system on it. You'll get long filename support, at least a 2X improvement in performance, and a lot more stability. First, you need to redo the DOS-level partitions/filesystems. You can either use fdisk or /stand/sysinstall, or for a small drive that you don't want to bother with multiple operating system support on, just blow away the whole FAT partition table (slices) and just use the BSD partitioning:

        dd if=/dev/zero of=/dev/rsd2 count=2
        disklabel -Brw sd2 auto
      

You can use disklabel or /stand/sysinstall to create multiple BSD partitions. You'll certainly want to do this if you're adding swap space on a fixed disk, but it's probably irrelevant on a removable drive like a ZIP.

Finally, create a new file system, this one's on our ZIP drive using the whole disk:

        newfs /dev/rsd2c
      

and mount it:

        mount /dev/sd2c /zip
      

and it's probably a good idea to add a line like this to /etc/fstab so you can just type "mount /zip" in the future:

        /dev/sd2c /zip ffs rw,noauto 0 0
      


Frequently Asked Questions for FreeBSD 2.X : System Administration : I have a new removable drive, how do I use it?
Previous: How can I add my new hard disk to my FreeBSD system?
Next: How do I mount a secondary DOS partition?