Commands to know for the exam:
df
lsblk
blkid
fdisk
gdisk
partprobe
MBR (Master Boot Record) and GPT (GUID Partition Table) are two different ways of storing the partitioning information on a drive. This information includes where partitions start and begin, so your operating system knows which sectors belong to each partition and which partition is bootable.
A master boot record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The concept of MBRs was publicly introduced in 1983 with PC DOS 2.0.
MBR - Master Boot Record
Commands:
List all disks and partitions
# fdisk -l
List partitions on device
# fdisk -l /dev/sda
Allows you to manipulate/create a disk and it's paritions.
Enter command mode
# fdisk [disk]
Options:
m
- print help menua
- toggle a bootable flagp
- print partition tabled
- delete partitionl
- list known partition typesn
- add a new partitiont
- change a partition typew
- write table to disk and exitq
- quit without saving changes📝 NOTE: You should be familiar using all this options to manage paritions
The GUID Partition Table (GPT) is a standard for the layout of partition tables of a physical computer storage device, such as a hard disk drive or solid-state drive, using universally unique identifiers, which are also known as globally unique identifiers (GUIDs).
Newer servers using UEFI can address GPT partitions, however older servers still using BIOS need additional software installed.
GPT partitions can be significantly larger than MBR partitions:
Commands:
📝 NOTE: Options are the same as on fdisk