| UNIFY-GPT(1) | User Commands | UNIFY-GPT(1) |
NAME¶
unify-gpt - Create unified GPT for multiple block sizes.
SYNOPSIS¶
unify-gpt [OPTIONS] DEVICE|IMAGE
DESCRIPTION¶
unify-gpt takes a disk device or disk image file with a valid GPT and adds a valid GPT for the specified block size. This allows you to have valid GPTs for multiple block sizes.
The purpose is to be able to prepare disk images suitable for several block sizes.
Once the image is in use, you can remove the extra GPTs using '--normalize'.
Existing partitions are kept. Partitions must be aligned to the requested block size.
You can run unify-gpt several times to support more block sizes.
The additional GPTs need extra space and partitioning tools may notify you that not the entire disk space is used.
Note: since partitioning tools will update only the GPT for a specific block size, your partition setup will get out of sync. Use the '--normalize' option to remove the extra GPTs and keep only a single GPT for the desired block size before running a partitioning tool.
General Options¶
-l, --list
-a, --add
-n, --normalize
-b, --block-size=N
-e, --entries=N
--verbose
--version
--help
Extended Options¶
--force
--try
--overlap
--no-overlap
--align-1m
--no-align-1m
Notes¶
Note that the partition end is only changed for this particular block size. The partition layout of GPTs for other block sizes is not adjusted.
EXAMPLES¶
Basic use¶
# add a GPT for 4096 byte blocks to an existing 512 byte block
size GPT
unify-gpt --block-size 4096 --add foo.img
# add a GPT for 4096 byte blocks but reduce GPT size in cases
# where the GPT would get too big
unify-gpt --block-size 4096 --add --entries 32 foo.img
# remove all GPTs except the one for the actual block size of
/dev/sda
unify-gpt --normalize /dev/sda
Advanced use¶
# actually, --add and --normalize can be used at the same time;
# the following command will convert a 512 byte block size GPT
# to a 4096 byte block size GPT
unify-gpt --block-size 4096 --add --normalize foo.img
# you can use --normalize to rewrite a GPT to have a different
# number of partition slots
unify-gpt --normalize --entries 1024 foo.img
SEE ALSO¶
parti(1), fdisk(1), parted(1).
LINKS¶
| 2025-05-13 | unify-gpt 2.10 |