This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.

Formatting Disks in Dedicated Mode

2. Formatting Disks in Dedicated Mode

2.1. Introduction

This section details how to make disks that are totally dedicated to FreeBSD. Remember, dedicated mode disks cannot be booted by the PC architecture.

2.2. Making Dedicated Mode Disks using Sysinstall

/stand/sysinstall, the system installation utility, has been expanded in recent versions to make the process of dividing disks properly a less tiring affair. The fdisk and disklabel editors built into sysinstall are GUI tools that remove much of the confusion from slicing disks. For FreeBSD versions 2.1.7 and later, this is perhaps the simplest way to slice disks.

  1. Start sysinstall as root by typing

        # /stand/sysinstall
                 
    
    from the command prompt.

  2. Select Index.

  3. Select Partition.

  4. Select the disk to edit with arrow keys and SPACE.

  5. If you are using this entire disk for FreeBSD, select A.

  6. When asked:

        Do you want to do this with a true partition entry so as to remain
        cooperative with any future possible operating systems on the
        drive(s)?
                 
    
    answer No.

  7. When asked if you still want to do this, answer Yes.

  8. Select Write.

  9. When warned about Writing on installed systems, answer Yes.

  10. Quitthe FDISK Editor and ESCAPE back to the Index menu.

  11. Select Label from the Index menu.

  12. Label as desired. For a single partition, enter C to Create a partition, accept the default size, partition type Filesystem, and a mountpoint (which isn't used).

  13. Enter W when done and confirm to continue. The filesystem will be newfs'd for you, unless you select otherwise (for news partitions you'll want to do this!). You'll get the error:

        Error mounting /mnt/dev/wd2s1e on /mnt/blah : No such file or directory
                 
    
    Ignore.

  14. Exit out by repeatedly pressing ESCAPE.

2.3. Making Dedicated Mode Disks Using the Command Line

Execute the following commands, replacing wd2 with the disk name.

    # dd if=/dev/zero of=/dev/rwd2 count=2
    # disklabel /dev/rwd2 | disklabel -B -R -r wd2 /dev/stdin
    We only want one partition, so using slice 'c' should be fine:
    # newfs /dev/rwd2c
       

If you need to edit the disklabel to create multiple partitions (such as swap), use the following:

    # dd if=/dev/zero of=/dev/rwd2 count=2
    # disklabel /dev/r$d > /tmp/label
    Edit disklabel to add partitions:
    # vi /tmp/label
    # disklabel -B -R -r wd2 /tmp/label
    newfs partitions appropriately
       

Your disk is now ready for use.

For questions about FreeBSD, e-mail <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.