fdisk & gdisk Flashcards
fdisk
fdisk is a dialog-driven program for creation and manipulation of partition tables. It understands GPT, MBR, Sun, SGI and BSD partition tables.
fdisk
- b
- B
- c
- L
- l
- o
- b, –sector-size <size>, Physical and logical sector size.</size>
- B, –protect-boot, Don’t erase bootbits when creating a new label.
- c, –compatibility [=<mode>], Mode is 'dos' or 'nondos' (default)</mode>
- L, –color [=<when>], Colorize output (auto, always, or never)</when>
- l, list, Display partitions and exit.
- o, –output <list>, Output columns.</list>
fdisk
- t
- u
- s
–bytes
- w
- W
- t, –type <type> recognize specified partition table type only.</type>
- u, –units [=<unit>], Display units: 'cylinders' or 'sectors' (default).</unit>
- s, –getsz, Display size in 512-byte sectors.
–bytes, Print SIZE in bytes rather than in human readable format.
- w, –wipe <mode>, Wipe signatures (auto, always, or never).</mode>
- W, –wipe-partitions <mode>, Wipe signatures from new partitions (auto, always, or never).</mode>
fdisk
- C
- H
- S
- C, –cylinders <number>, Specify the number of cylinders.</number>
- H, –heads <number>, Specify the number of heads.</number>
- S, –sectors <number>, Specify the number of sectors per track.</number>
fdisk -o, –output [OUTPUT COLUMNS]
gpt
dos
bsd
sgi
sun
gpt: Device Start End Sectors Size Type Type-UUID Attrs Name UUID
dos: Device Start End Sectors Cylinders Size Type Id Attrs Boot End-C/H/S Start-C/H/S
bsd: Slice Start End Sectors Cylinders Size Type Bsize Cpg Fsize
sgi: Device Start End Sectors Cylinders Size Type Id Attrs
sun: Device Start End Sectors Cylinders Size Type Id Flags
gdisk -l /dev/sda
-l, List the partition table for the specified device and then exit.
gdisk
GPT fdisk (aka gdisk) is a text-mode menu-driven program for creation and manipulation of partition tables.