2.3 CD Installation - Disk setup

2.3.1 Disk formatting

The slice layout on the newly formatted disk or partition needs to be set up, using this command.

          # fdisk -u

If there are multiple operating systems on the disk, pick the correct partition judging by what partitions were created earlier with a resizing tool.

2.3.2 Boot block installation

The 'ad0' here refers to the first disk on the first IDE bus of a computer. Increment the number if the target disk is farther down the chain. For example, the master disk on the second IDE controller would be 'ad2'.

          # boot0cfg -B ad0
          # boot0cfg -v ad0

-s SLICE, where SLICE is a number, controls which slice on disk is used by boot0cfg to start from. By default, this number is 1, and will only need modification if a different slice contains DragonFly.

Use -o packet as an option to boot0cfg if the DragonFly partition is located beyond cylinder 1023 on the disk. This location problem usually only happens when another operating system is taking up more than the first 8 gigabytes of disk space. This problem cannot happen if DragonFly is installed to a dedicated disk

2.3.3 Disklabel

If DragonFly is installed anywhere but the first partition of the disk, the device entry for that partition will have to be created. Otherwise, the device entry is automatically created. Refer to this different partition instead of the 'ad0s1a' used in later examples.

          # cd /dev; ./MAKEDEV ad0s2

The partition needs to be created on the DragonFly disk.

          # disklabel -B -r -w ad0s1 auto

Using /etc/disklabel.ad0s1 as an example, issue the following command to edit the disklabel for the just-created partition.

          # disklabel -e ad0s1

ad0s2a 256m /
ad0s2b 1024m swap
ad0s2c leave alone This represents the whole slice.
ad0s2d 256m /var
ad0s2e 256m /tmp !
ad0s2f 8192m /usr - This should be at least 4096m
ad0s2g * /home - This holds 'everything else'

2.3.4 Partition Format

newfs will format each individual partition.

          # newfs /dev/ad0s1a
          # newfs -U /dev/ad0s1d
          # newfs -U /dev/ad0s1e
          # newfs -U /dev/ad0s1f
          # newfs -U /dev/ad0s1g

Note: The -U option is not used for the root partition, since / is usually relatively small. Softupdates can cause it to run out of space while under a lot of disk activity, such as a buildworld.

Note: The command listing skips directly from ad0s1a to ad0s1d. This is because /dev/ad0s1b is used as swap and does not require formatting; ad0s1c refers to the entire disk and should not be formatted.

Contact the Documentation mailing list for comments, suggestions and questions about this document.