User:Zulu Foxtrott/GentooOnARM/EasyInstall/BlockDevices

Block devices
Let's take a good look at storage-oriented aspects of Gentoo Linux and Linux in general, including block devices and partitions. Once the ins and outs of storage devices are understood, partitions and filesystems can be established for installation.

To begin, let's look at block devices. SCSI and Serial ATA drives are both labeled under device handles such as:, , {{Path|/dev/sdc}, etc. On more modern machines, PCI Express based NVMe solid state disks have device handles such as , , etc., while on embedded systems, SD cards and MMCs have handles such as , , etc.

The following table will help readers determine where to find a certain type of block device on the system:

The block devices represent an abstract interface to the storage device. User programs can use these block devices to interact with the storage device without worrying about whether the devices are SATA, SCSI, or something else. The program can simply address the storage on the device as a bunch of contiguous, randomly-accessible 4096-byte (4K) blocks.

Partition tables
Although it is theoretically possible to use a raw, unpartitioned storage device to house a Linux system (when creating a btrfs RAID for example), this is almost never done in practice. Instead, block devices representing a physical device are split up into smaller, more manageable block devices. On systems, these are called partitions. The current standard partitioning technology is GPT, whereas older systems might still use MBR (Master boot record, sometimes also called DOS disklabel).

GPT
The GPT (GUID Partition Table) setup uses 64-bit identifiers for the partitions, which means there is practically no limit on the amount of partitions for a GPT disk. Also the size of a partition is bounded only by a quite big limit (almost 8 ZiB - yes, zebibytes).

GPT also takes advantage of checksumming and redundancy. It carries CRC32 checksums to detect errors in the header and partition tables and has a backup GPT at the end of the disk. This backup table can be used to recover damage of the primary GPT near the beginning of the disk.

MBR
The Master boot record boot sector was first introduced in 1983 with PC DOS 2.x. MBR uses 32-bit identifiers for the start sector and length of the partitions, and supports three partition types: primary, extended, and logical. Primary partitions have their information stored in the master boot record itself - a very small (usually 512 bytes) location at the very beginning of a disk. Due to this small space, only four primary partitions are supported (for instance, to ).

In order to support more partitions, one of the primary partitions in the MBR can be marked as an extended partition. This partition can then contain additional logical partitions (partitions within a partition).

It is suggested to use GPT whenever possible for Gentoo installations.