User:NeddySeagoon/The Olde Way

= The Olde Way = This needs to be understood so that you can decide what is right for you. It may not be the process detailed here. This decision is difficult to change later.

In The Beginning
Once upon a time PCs only had 340kB floppy disk drives. Floppies are historically used without a partition table because the original MSDOS did not support the concept of partitions.

When hard drives were introduced, first 5MB and 10MB everything still worked. The FAT filesystem of the day could cope with 32MB. Once hard drives grew beyond 32MB, the space beyond was lost.

The Introduction of the Partition Table
To be able to use all of drives bigger than 32MB, the idea of breaking them into pieces "Partitions" was added to MSDOS, so the partition table was added and tools to manipulate it supplied too. A maximum of four partitions could be supported.

The Extended Partition
All was well until hard drives reached 128Mb. That required more partitions so the Extended Partition, which is just a container for other partitons was added.

The End of the Road for the MSDOS Partiton Table
Over the years, the MSDOS Partiton Table has been extended to address more space. It has a hard limit at 2.0GiB, so cannot be used on drives bigger than 2.0GiB without loosing the space beyond.

It had to be replaced, since it could no longer be extended.

The Global Partition Table
The Global Partition Table was introduced as a replacement for the MSDOS partition table. At the same time, EFI replaced the traditional BIOS.

The Situation Today
There are older systems with BIOS, there are newer systems with EFI that have a Legacy BIOS option. There are MSDOS Partition Tables, there are GPT Partition tables and there are hard drives bigger and smaller than 2GiB. That's three boolean variables that result eight options.

It can be seen that all the useful EFI cases are covered in the handbook, leaving this guide to cover BIOS.

The four BIOS options fall nicely into two groups BIOS with MSDOS BIOS with GPT

Compatability Notes
When EFI/GPT was introduced, designers realised that it had to be forward compatible with BIOS/MSDOS. Thus making a GPT disk label actually makes a "Protective MSDOS" disk label too. This allows tools that are not GPT aware to alert users that GPT is in use.

The MSDOS disk label is stored in 66 bytes at the end of logical block 0 on the HDD as BIOS can only read block 0 of the HDD.

With GPT the Protective MSDOS disk label stays in LBA 0, the GPT disk label starts in LBA 1 (so BIOS cannot read it) and ends in LBA 2047. There is a backup copy of the GPT disk label stored at the end of the volume too.

In both cases, modern tools put the start of the first partition at LBA 2048. It wasn't always that way. Traditionally, with an MSDOS disk label, the MBR was at LBA 0 and the first partition stated at LBA 63, leaving LBA 1..62 free.

Designing The Partition Layout
A minimal Gentoo install using an MSDOS disk label requires two partitions. Three is recommended as every now and again hard drives get too big for older BIOSes to read, so a small /boot partition is used at the start of the drive to ensure that the BIOS can read all the files to boot the system.

This gives us boot swap root

BIOS and GPT requires a fourth partition. When grub is installed into the MBR, its far to big to fit into the 466 available bytes, so with an MSDOS disk label, it uses the following, otherwise unallocated space, before the first partition.

From the above, with GPT in use, there is no unallocated space before the first partition, so grub needs a small partition identified for its own use.

This gives us bios_boot (for grub) boot swap root

= Making the Disk Label and Partitioning the Hard Drive=

Using parted


Setting the Bootable Flag
This may or may not be required but its harmless. BIOS systems can only read the MSDOS partition table, even when GPT is in use. Therefore, the bootable flag must be set in the MSDOS partition table.

= Legacy Boot =

Grub


Lilo
