Linux and FreeBSD label hard drives and partitions after two differents schemes. This section explains the main differences between the two schemes.
2.1 FreeBSD « slices » and « partitions »
Table des matières
FreeBSD needs only one entry in the primary partition table on your hard drive. This primary partition is called a « slice » in FreeBSD terminology. It then uses the program disklabel
to make several logical partitions in this primary partition. These logical partitions are called « partitions » in FreeBSD terminology. This concept is similar to the way Linux (and DOS) handles logical partitions in an extended partition. Note that the Linux fdisk
program can’t display the partitions in a FreeBSD slice, the output is something like this (/dev/hda4
is the FreeBSD slice):
hafnium:~# fdisk /dev/hda Command (m for help): p Disk /dev/hda: 64 heads, 63 sectors, 621 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Begin Start End Blocks Id System /dev/hda1 * 1 1 27 54400+ 83 Linux native /dev/hda2 28 28 375 701568 83 Linux native /dev/hda3 376 376 403 56448 83 Linux native /dev/hda4 404 404 621 439488 a5 BSD/386 Command (m for help): q hafnium:~#
2.2 Drive and partition labelling in Linux and FreeBSD
The hard drives are labelled in the following way in Linux and FreeBSD:
Linux FreeBSD First IDE drive /dev/hda /dev/wd0 Second IDE drive /dev/hdb /dev/wd1 First SCSI drive /dev/sda /dev/sd0 Second SCSI drive /dev/sdb /dev/sd1
The partitions (FreeBSD slices) on a drive are labelled in the following way (/dev/hda
is used as an example):
Linux FreeBSD First primary partition /dev/hda1 /dev/wd0s1 Second primary partition /dev/hda2 /dev/wd0s2 Third primary partition /dev/hda3 /dev/wd0s3 Fourth primary partition /dev/hda4 /dev/wd0s4
The partitions in a FreeBSD slice is labelled in the following way (/dev/hda4
is the FreeBSD slice in the example):
Linux label FreeBSD label Default FreeBSD mount point /dev/hda5 /dev/wd0s4a / /dev/hda6 /dev/wd0s4b swap /dev/hda7 /dev/wd0s4e /var /dev/hda8 /dev/wd0s4f /usr
If you have installed FreeBSD in the /dev/sdb3
slice, and /dev/sdb2
is a Linux extended partition containing two logical partitions (/dev/sdb5
and /dev/sdb6
), the previous example would look like this:
Linux label FreeBSD label Default FreeBSD mount point /dev/sdb7 /dev/sd1s3a / /dev/sdb8 /dev/sd1s3b swap /dev/sdb9 /dev/sd1s3e /var /dev/sdb10 /dev/sd1s3f /usr