gpart: guess a lost MBR partition table
Package: gpart · Writes to disks: only with -W
Scans a disk for the start of known file systems and proposes an MBR (msdos) partition table. For GPT disks, use testdisk or gdisk instead.
sudo gpart /dev/sdX # scan and print the partitions it guesses
sudo gpart -f /dev/sdX # full scan (slower, finds more)
Compare its guess with what you know about the disk before acting on it.
Writes:
-Wwrites the guessed table to a device or file. Use testdisk for an interactive, safer repair.