3

In the GNU GRUB info pages in the Ubuntu 16.04 LTS distro, the naming convention for partitions seemed straight forward with the following definition:

(hd0,msdos2)

  Here, 'hd' means it is a hard disk drive. The first integer '0' indicates the drive number, that is, the first hard disk, the string 'msdos' indicates the partition scheme, while the second integer, '2', indicates the partition number...

...This expression means the second partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.

This would seem to indicate that the first hard drive has a fat partition of some sort on the second disk partition and is referred to as an msdos partition scheme.

Reading on, there is another example with the following text:

(hd1,msdos1,bsd1)

This means the BSD 'a' partition on first PC slice number of the second hard disk.

Since the first definition specifies that the second field is the partition scheme followed by the partition index (starting from 1), and section 13.1 makes reference to the ability to specify "sub partitions", then this example seems to indicate that the bsd1 partition is a sub partition of the msdos1 partition.

The text indicates it is the "BSD 'a' partition" on the "first PC slice number". I am not familiar with the "BSD 'a' partition", the term "first PC slice number", or the concept of sub partitions so this makes it a bit confusing as I am unable to find further information.

What is a sub partition and how does it differ from logical and extended partitions? More specifically: what is a BSD 'a' partition and a first PC slice number?

  • I attempted to get some clarification about sub-partitions from tldp.org/LDP/sag/html/partitions.html, but only became more confused as the term sub-partition there is explained by describing extended partitions as "sub partitions" of the primary partition which are actually logical partitions. Perhaps some good partition literature would be helpful. – Chezzwizz Sep 2 '18 at 22:32
  • The tldp.org page you linked to is severely out of date, as it only talks about the legacy MBR partitioning scheme. Grub uses "msdos" as a synonym for an MBR partition table. The Guid Partition Table (gpt) is the recommended partition table format today, especially if the machine has UEFI firmware or disks larger than 2TB. – Johan Myréen Sep 3 '18 at 5:01
2

Regarding MSDOS partitioning:

This would seem to indicate that the first hard drive has a fat partition of some sort on the second disk partition and is referred to as an msdos partition scheme.

Actually, the msdos2 indication only has to do with the partitioning scheme; The format used to define partitions. For example, and alternative format is GPT. This doesn't have anything to do with the content of the partitions, such as the filesystems used, such as FAT.

Regarding slices:

What is a sub partition and how does it differ from logical and extended partitions? More specifically: what is a BSD 'a' partition and a first PC slice number?

The confusion here stems from a difference in terminology in BSD Unix systems. There are two levels of "partitioning" at play.

The first is the MSDOS (or GPT) partitioning. At this level the partitioning information is stored in a structure located at the beginning of the disk (and in the case of GPT, a copy is stored at the end of the disk). This is the level of partitioning understood by the hardware; The BIOS or UEFI firmware knows how to boot an OS (or boot manager/loader) from such partitions.

The second level is, in this case, is the BSD disklabel. This partitioning information is stored within a MSDOS/GPT partition. In addition, the hardware (at least in the case of PCs) does not comprehend nor use this level of partitioning. It is up to the operating system to do something with it. BSD systems are capable of utilizing this partitioning scheme.

Now here's the kicker. Within the context of BSD systems, a MSDOS/GPT partition is called a slice and the sub-divisions created by the BSD disklabel are called partitions.

You may have noticed a similarity between BSD partitions and MSDOS logical partitions. While they are similar conceptually, in that a top-level partition is sub-divided, as you can see they are implemented differently.

  • So in a sense, I gather that the idea of the partitioning scheme relates to how the partitions are stored on the disk and the actual file system is the implementation of how the operating system stores the actual partitions on the disk. Sort of like if a filing cabinet where the partitioning scheme, and the drawers get configured in the cabinet depending on the OS? – Chezzwizz Sep 7 '18 at 1:06
  • Imagine for a moment that there's no such thing as a partition. In such a world, a filesystem would consume an entire disk, which means you'd only be able to have a single OS per disk. Partitioning makes it possible to break a disk into smaller units without actually manipulating the disk's hardware. In reality, a partition is just a range of physical addresses on the disk. The partition itself is not "stored", per say, but rather those ranges are stored. The format in which those ranges are stored is the "partitioning scheme." – Emmanuel Rosa Sep 7 '18 at 10:04
  • Well, I guess this opens up a lot more questions about the whole subject about partitions and file systems. Any recommended books? – Chezzwizz Sep 18 '18 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.