Drive and partition labelling in Linux and FreeBSD

by Administrator 14. May 2009 03:37

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 an IDE 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 my FreeBSD slice is labelled in the following way. It is the labelling you get by default. It is possible to change the labelling if you do a custom installation of FreeBSD (/dev/hda4 is the FreeBSD slice in the example): 
Linux label FreeBSD label FreeBSD mount point 
/dev/hda5 /dev/wd0s4a /
/dev/hda6 /dev/wd0s4b swap
/dev/hda7 /dev/wd0s4e /var
/dev/hda8 /dev/wd0s4f /usr

If you run dmesg in Linux you will see this as (The linux kernel must be build with UFS filesystem support for this to work. See section Installing and preparing Linux): 
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 hda8 >

If you have installed FreeBSD in the /dev/sd1s3 slice (/dev/sdb3 in Linux parlace), 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 FreeBSD mount point 
/dev/sdb7 /dev/sd1s3a /
/dev/sdb8 /dev/sd1s3b swap
/dev/sdb9 /dev/sd1s3e /var
/dev/sdb10 /dev/sd1s3f /usr

This will be shown as 
Partition check:
 sdb: sdb1 sdb2 < sdb5 sdb6 > sdb3 < sdb7 sdb8 sdb9 sdb10 >
in the output from dmesg. 

If you have a Linux extended partition after your FreeBSD slice you're in for trouble, because most Linux kernels installation floppies are build without UFS support, they will not recognise the FreeBSD partitions inside the slice. What should have have been seen as (/dev/hda3 is the FreeBSD slice and /dev/hda4 is the Linux extended partition) 
Partition check:
 hda: hda1 hda2 hda3 < hda5 hda6 hda7 hda8 > hda4 < hda9 hda10 >
is seen as: 
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 hda6>

Tags: , ,

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

 

My Quote :P

Each morning when I open my eyes I say to myself: I, not events, have the power to make me happy or unhappy today. I can choose which it shall be. Yesterday is dead, tomorrow hasn’t arrived yet. I have just one day, today, and I’m going to be happy in it.

Month List

Page List