Created
December 1, 2014 09:01
-
-
Save h3xxx/32dc16b87dadd45a8bd4 to your computer and use it in GitHub Desktop.
Linux disk recovery tools
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.raymond.cc/blog/5-free-tools-to-backup-and-restore-master-boot-record-mbr/2/ | |
http://www.rodsbooks.com/gdisk/repairing.html | |
parted / gparted | |
gpart | |
gdisk | |
fdisk | |
sfdisk | |
BOOTREC /FIXMBR | |
Save partition table: | |
sfdisk -d /dev/sda > backup.txt | |
Restore partition table: | |
sfdisk -f /dev/sda < backup.txt | |
Save MBR: | |
dd if=/dev/sda of=backup.mbr bs=512 count=1 | |
Restore MBR: (446 = bootloader, above 446 is partition table) | |
dd if=backup.mbr of=/dev/sda bs=446 count=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment