Partitiontable manipulation utility is created to do modifications to an already existing partition table. For embedded devices often it is needed to have a primary and a backup root file system. To switch between them in case of a software update or a corrupted primary system without an user interaction, this tool could help.
major.minor.patch
- gpt header validation and invalidation
- dumping gpt and partition entries
- gcc >= 4.7.3 (c11 support)
- GTest (optional)
mkdir build && cd build
cmake ..
make
# To validate primary gpt:
./ptutil --primary --validate ./disk.img
# Invalidates the primary gpt:
./ptutil --primary --invalidate ./disk.img
# To repair an invalidated gpt header call:
./ptutil --primary --validate -r ./disk.img
To dump informations:
./ptutil --primary -d ./disk.img