fdisk vs. gdisk vs. parted vs. sfdisk vs. blkid vs. lsblk vs. dfsee compared

Not all partitioning tools report the same information, particularly WRT SI vs. binary multiples, and whether or not to list an extended partition, which can’t be mounted or hold any filesystem directly. For particular forum needs, one might serve better than others. The following are on an nvme device partitioned in MBR format with a bit of redaction here and there:

# fdisk
Disk /dev/nvme0n1: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: MKNSS...
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: dos
Disk identifier: 0x00000000

Device          Boot     Start       End   Sectors  Size Id Type
/dev/nvme0n1p1            2048    516095    514048  251M  6 FAT16
/dev/nvme0n1p2          516096   5431295   4915200  2.4G 17 Hidden HPFS/NTFS
/dev/nvme0n1p3  *      5431296   7888895   2457600  1.2G 83 Linux
/dev/nvme0n1p4         7888896 234440703 226551808  108G  5 Extended
/dev/nvme0n1p5         7888928  41928703  34039776 16.2G 82 Linux swap / Solaris
/dev/nvme0n1p6        41928736  50120703   8191968  3.9G 83 Linux
/dev/nvme0n1p7        50120736  86984703  36863968 17.6G 83 Linux
/dev/nvme0n1p8        86984736 123848703  36863968 17.6G 83 Linux
/dev/nvme0n1p9       123848736 160712703  36863968 17.6G 83 Linux
/dev/nvme0n1p10      160712736 197576703  36863968 17.6G 83 Linux
/dev/nvme0n1p11      197576736 234440703  36863968 17.6G 83 Linux

# gdisk
GPT fdisk (gdisk) version 1.0.4

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Disk /dev/nvme0n1: 234441648 sectors, 111.8 GiB
Model: MKNSS...
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 9F015572-...
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 234441614
Partitions will be aligned on 32-sector boundaries
Total free space is 3149 sectors (1.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          516095   251.0 MiB   0700  Microsoft basic data
   2          516096         5431295   2.3 GiB     0700  Microsoft basic data
   3         5431296         7888895   1.2 GiB     8300  Linux filesystem
   5         7888928        41928703   16.2 GiB    8200  Linux swap
   6        41928736        50120703   3.9 GiB     8300  Linux filesystem
   7        50120736        86984703   17.6 GiB    8300  Linux filesystem
   8        86984736       123848703   17.6 GiB    8300  Linux filesystem
   9       123848736       160712703   17.6 GiB    8300  Linux filesystem
  10       160712736       197576703   17.6 GiB    8300  Linux filesystem
  11       197576736       234440703   17.6 GiB    8300  Linux filesystem

# parted
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      1049kB  264MB   263MB   primary   fat16           type=06
 2      264MB   2781MB  2517MB  primary                   hidden, type=17
 3      2781MB  4039MB  1258MB  primary   ext2            boot, type=83
 4      4039MB  120GB   116GB   extended                  type=05
 5      4039MB  21.5GB  17.4GB  logical   linux-swap(v1)  type=82
 6      21.5GB  25.7GB  4194MB  logical   ext3            type=83
 7      25.7GB  44.5GB  18.9GB  logical   ext4            type=83
 8      44.5GB  63.4GB  18.9GB  logical   ext4            type=83
 9      63.4GB  82.3GB  18.9GB  logical   ext4            type=83
10      82.3GB  101GB   18.9GB  logical   ext4            type=83
11      101GB   120GB   18.9GB  logical   ext4            type=83

# sfdisk
Disk /dev/nvme0n1: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Disk model: MKNSS...
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: dos
Disk identifier: 0x00000000

Device          Boot     Start       End   Sectors  Size Id Type
/dev/nvme0n1p1            2048    516095    514048  251M  6 FAT16
/dev/nvme0n1p2          516096   5431295   4915200  2.4G 17 Hidden HPFS/NTFS
/dev/nvme0n1p3  *      5431296   7888895   2457600  1.2G 83 Linux
/dev/nvme0n1p4         7888896 234440703 226551808  108G  5 Extended
/dev/nvme0n1p5         7888928  41928703  34039776 16.2G 82 Linux swap / Solaris
/dev/nvme0n1p6        41928736  50120703   8191968  3.9G 83 Linux
/dev/nvme0n1p7        50120736  86984703  36863968 17.6G 83 Linux
/dev/nvme0n1p8        86984736 123848703  36863968 17.6G 83 Linux
/dev/nvme0n1p9       123848736 160712703  36863968 17.6G 83 Linux
/dev/nvme0n1p10      160712736 197576703  36863968 17.6G 83 Linux
/dev/nvme0n1p11      197576736 234440703  36863968 17.6G 83 Linux

# blkid
/dev/nvme0n1p1: SEC_TYPE="msdos" LABEL_FATBOOT="..." LABEL="..." UUID="..." TYPE="vfat"
/dev/nvme0n1p2: LABEL="..." UUID="..." TYPE="hpfs"
/dev/nvme0n1p3: LABEL="..." UUID="f13e6a60-..." TYPE="ext2" PTTYPE="dos"
/dev/nvme0n1p5: LABEL="..." UUID="419700e8-..." TYPE="swap"
/dev/nvme0n1p6: LABEL="..." UUID="9896da66-..." SEC_TYPE="ext2" TYPE="ext3"
/dev/nvme0n1p7: LABEL="..." UUID="791ed376-..." TYPE="ext4"
/dev/nvme0n1p8: LABEL="..." UUID="ab95b076-..." TYPE="ext4"
/dev/nvme0n1p9: LABEL="..." UUID="cf1d1024-..." TYPE="ext4" PTTYPE="dos"
/dev/nvme0n1p10: LABEL="..." UUID="7d23773b-..." TYPE="ext4" PTTYPE="dos"
/dev/nvme0n1p11: LABEL="..." UUID="e93395c0-..." TYPE="ext4" PTTYPE="dos"
/dev/nvme0n1: PTTYPE="dos"

# lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1      259:0    0 111.8G  0 disk 
├─nvme0n1p1  259:35   0   251M  0 part 
├─nvme0n1p2  259:36   0   2.4G  0 part 
├─nvme0n1p3  259:37   0   1.2G  0 part 
├─nvme0n1p4  259:38   0     1K  0 part 
├─nvme0n1p5  259:39   0  16.2G  0 part 
├─nvme0n1p6  259:40   0   3.9G  0 part 
├─nvme0n1p7  259:41   0  17.6G  0 part 
├─nvme0n1p8  259:42   0  17.6G  0 part 
├─nvme0n1p9  259:43   0  17.6G  0 part 
├─nvme0n1p10 259:44   0  17.6G  0 part 
└─nvme0n1p11 259:45   0  17.6G  0 part 

DFSee Linux  16.2 : Executing: fdisk -r- -w-
Command timestamp : Monday 2019-07-29 05:32:27
+---+--+--+-----------------+--------+--------+-----------+----------------------------------------+-----------+
|ID |ux|Dr|Type, description|Format  |Related |VolumeLabel|OS2-LVM/BM / GPT / Crypt / additional in|  Size MiB |
+--</dev/nvme0n1 MBR disk  1>--------+--------+-----------<MKNSS...        >-----------------------+-----------+
|01 |  |  |FreeSpace Wasted |-- -- --|-- -- --|- - - - - -|                                        |        1.0|
|01*| 1|-c|Prim 06 FAT16    |FAT16   |IBM  7.0|   ...     |P01M120 DOS          P01M120 DOS        |      251.0|
|02*| 2|-y|Hide 17 Inst-FSys|HPFS    |IBM 4.50|   ...     |P02M120 HPFS         P02M120 HPFS       |     2400.0|
|03>| 3|  |Prim 83 LinuxNatv|EXT2    |GRUB    |   ...     |P03M120 realboot     P03M120 realboot   |     1200.0|
|04 | 5|  |Log  82 SunS/SWAP|SWAP    |LinuxV1 |   ...     |P05M120 Linux swap   P05M120 Linux swap |    16621.0|
|05 | 6|  |Log  83 LinuxNatv|EXT3    |Linux   |   ...     |P06M120 /usr/local   P06M120 /usr/local |     4000.0|
|06*| 7|  |Log  83 LinuxNatv|EXT4    |Linux   |   ...     |P07M120 /root1       P07M120 /root1     |    18000.0|
|07*| 8|  |Log  83 LinuxNatv|EXT4    |Linux   |   ...     |P08M120 /root2       P08M120 /root2     |    18000.0|
|08*| 9|  |Log  83 LinuxNatv|EXT4    |GRUB    |   ...     |P09M120 /root3       P09M120 /root3     |    18000.0|
|09*|10|  |Log  83 LinuxNatv|EXT4    |GRUB    |   ...     |P10M120 /root4       P10M120 /root4     |    18000.0|
|10*|11|  |Log  83 LinuxNatv|EXT4    |GRUB    |   ...     |P11M120 /root5       P11M120 /root5     |    18000.0|
|48 |  |  |Partial Cylinder |-- -- --|-- -- --|- - - - - -|                                        |      0.461|

DFSee Linux  16.2 : Executing: part -t-
Command timestamp : Monday 2019-07-29 05:32:28
+---+--+--+-----------------+----------+----------+-------------------+----------+-----------+
|ID |ux|Dr|Type, description|Begin Sect|End sector|   Cylinder range  |  Sectors |  Size MiB |
+--</dev/nvme0n1 MBR disk  1>----------+----------+-------------------<MKNSS...        >-----+
|01 |  |  |FreeSpace Wasted |         0|       7ff|       0 -        0|       800|        1.0|
|01*| 1|-c|Prim 06 FAT16    |       800|     7dfff|       1 -      251|     7d800|      251.0|
|02*| 2|-y|Hide 17 Inst-FSys|     7e000|    52dfff|     252 -     2651|    4b0000|     2400.0|
|03>| 3|  |Prim 83 LinuxNatv|    52e000|    785fff|    2652 -     3851|    258000|     1200.0|
|04 | 5|  |Log  82 SunS/SWAP|    786020|   27fc7ff|    3852 -    20472|   20767e0|    16621.0|
|05 | 6|  |Log  83 LinuxNatv|   27fc820|   2fcc7ff|   20473 -    24472|    7cffe0|     4000.0|
|06*| 7|  |Log  83 LinuxNatv|   2fcc820|   52f47ff|   24473 -    42472|   2327fe0|    18000.0|
|07*| 8|  |Log  83 LinuxNatv|   52f4820|   761c7ff|   42473 -    60472|   2327fe0|    18000.0|
|08*| 9|  |Log  83 LinuxNatv|   761c820|   99447ff|   60473 -    78472|   2327fe0|    18000.0|
|09*|10|  |Log  83 LinuxNatv|   9944820|   bc6c7ff|   78473 -    96472|   2327fe0|    18000.0|
|10*|11|  |Log  83 LinuxNatv|   bc6c820|   df947ff|   96473 -   114472|   2327fe0|    18000.0|
|48 |  |  |Partial Cylinder |   df94800|   df94baf|  114473 -   114473|       3b0|      0.461|

Note that DFSee screen ouput is by default also saved to a plain text log file. These logs are how I inventory and track backups of my many multiboot installations.