Partition

From regional-training

Disk partitioning is the slicing of one or more regions on the storage device so that each region can be managed separately. These regions are called partitions.

The disk stores the information about the partitions' locations and sizes in an area known as the partition table that the operating system reads before any other part of the disk. Each partition then appears to the operating system as a distinct "logical" disk that uses part of the actual disk.

In Linux the storage appears as a device with partitions numbered in accordance with the partition table.

The command lsblk will list the partitioning of block devices e.g.

ralph@ralph-tp202nas:~/Downloads$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    1 119.1G  0 disk 
├─sda1         8:1    1 118.9G  0 part /
└─sda2         8:2    1   215M  0 part /boot/efi
mmcblk0      179:0    0  58.2G  0 disk 
├─mmcblk0p1  179:1    0   260M  0 part 
├─mmcblk0p2  179:2    0    16M  0 part 
├─mmcblk0p3  179:3    0  57.2G  0 part 
└─mmcblk0p4  179:4    0   800M  0 part 
mmcblk0boot0 179:8    0     4M  1 disk 
mmcblk0boot1 179:16   0     4M  1 disk 

With information shown by fdisk -l

sudo fdisk -l
Disk /dev/mmcblk0: 58.24 GiB, 62537072640 bytes, 122142720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AE41EC68-D5AA-4A46-9D42-E784CD38785E

Device             Start       End   Sectors  Size Type
/dev/mmcblk0p1      2048    534527    532480  260M EFI System
/dev/mmcblk0p2    534528    567295     32768   16M Microsoft reserved
/dev/mmcblk0p3    567296 120502271 119934976 57.2G Microsoft basic data
/dev/mmcblk0p4 120502272 122140671   1638400  800M Windows recovery environment


Disk /dev/sda: 119.08 GiB, 127865454592 bytes, 249737216 sectors
Disk model: STORAGE DEVICE  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6407731F-FED8-3649-B7DA-51B1BFC346B3

Device      Start       End   Sectors   Size Type
/dev/sda1  442368 249730391 249288024 118.9G Linux filesystem
/dev/sda2    2048    442367    440320   215M EFI System

Partition table entries are not in disk order.

Note the mmcblk0 is the internal NVME drive and sda is the USB accessible sdcard that shows as a disk on the TP202nas Asus netbook. include gparted image