File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # sgdisk
2+
3+ > Manage GUID Partition Tables (GPT).
4+ > Part of the GPT fdisk suite; designed for scripting and automation.
5+ > More information: < https://manned.org/sgdisk > .
6+
7+ - Display basic GPT partition summary data for a device:
8+
9+ ` sudo sgdisk {{[-p|--print]}} {{/dev/sdX}} `
10+
11+ - Wipe both GPT and MBR data structures from a device (destroys all partition information):
12+
13+ ` sudo sgdisk {{[-Z|--zap-all]}} {{/dev/sdX}} `
14+
15+ - Convert a GPT disk to MBR format using up to four partitions:
16+
17+ ` sudo sgdisk {{[-m|--gpttombr]}} {{1:2:3:4}} {{/dev/sdX}} `
18+
19+ - Delete a partition entry by number (data in sectors remains untouched):
20+
21+ ` sudo sgdisk {{[-d|--delete]}} {{1}} {{/dev/sdX}} `
22+
23+ - Save the current in-memory GPT data (protective MBR, headers, and table) to a binary backup file:
24+
25+ ` sudo sgdisk {{[-b|--backup]}} {{/path/to/backup.gpt}} {{/dev/sdX}} `
26+
27+ - Load GPT data from a backup file (restoring from a non-original disk is not recommended):
28+
29+ ` sudo sgdisk {{[-l|--load-backup]}} {{/path/to/backup.gpt}} {{/dev/sdX}} `
30+
31+ - Verify GPT structures for CRC errors, mismatches, or inconsistencies:
32+
33+ ` sudo sgdisk {{[-v|--verify]}} {{/dev/sdX}} `
34+
35+ - Display a summary of available partition type codes (no device required):
36+
37+ ` sgdisk {{[-L|--list-types]}} `
You can’t perform that action at this time.
0 commit comments