Should root partition be first partition?

Peter Steele psteele at maxiscale.com
Mon Feb 8 14:45:36 UTC 2010


>The root partition should always be the 'a' partition, but it doesn't have to be the first in physical order on the disk (ie. starting at cylinder 0).  So long as partitions don't overlap (with the >historical exception of the 'c' partition, which should cover the whole drive) you can put them in any order and starting at any offset.  You can even leave gaps between partitions if you >want, but that is pretty crazy since it just wastes some of the available space.

I should clarify that I am using GPT partitions, not MBR, so in fact there is no 'a' partition and in fact no bsd label at all. My partitioning looks like this:

# gpart show ad4
=>       34  490234685  ad4  GPT  (234G)
         34         16    1  freebsd-boot  (8.0K)
         50   67108864    2  freebsd-swap  (32G)
   67108914   67108864    3  freebsd-swap  (32G)
  134217778   10485760    4  freebsd-ufs  (5.0G)
  144703538   25165824    5  freebsd-ufs  (12G)
  169869362    5792557    6  freebsd-ufs  (2.8G)
  175661919  283115520    7  freebsd-ufs  (135G)
  458777439   31457280    8  freebsd-ufs  (15G)

Partition 4 (ad4p4) is the root partition. This works fine, but I was just wondering why I've seen layouts with root first, then swap, then var, etc. The only problem I've had is that I cannot find a way to tell the boot loader to boot from an alternate drive since it seems to expect MBR partitioning when using a reference such as 4:ad(4,a)/boot/loader. That's a separate issue though.




More information about the freebsd-questions mailing list