sgdisk¶
"sgdisk - Command-line GUID partition table (GPT) manipulator for Linux and Unix" - man sgdisk
See also¶
gdiskis an interactive prompt interface.cgdiskis a curses interface to gdisk, similar to fdisk in MS Windows of yore.
Examples¶
Delete all GPT and MBR entries and create a new GPT¶
Create a new partition¶
- Partition numbers start at 1
- The syntax here is
--new <partition_number>[:<start>[:<end>]] - See the man page for a variety of ways to reference start and end.
Randomize GUIDs to ensure uniqueness after cloning¶
Print info about partitions on a disk¶
Destroy GPT partition table¶
Print last block number of the largest available section of the disk¶
Print extended info about the first partition on /dev/sda¶
Backup a GUID partition table¶
Restore a GUID partition table¶
Create a new partition¶
This creates a 4th partition that is 50G using the default starting point (0 is default)