To backup and restore disk partition tables, you need to use the command “dd” with two options:
if and of.
if = “input”
of = “output”
# dd if=/dev/sda of=backup bs=512 count=1
it will backup the MBR on the first disk, including 64-bit partition which is part of it.
# dd if=backup of=/dev/sda bs=512 count=1
those commands will only import the primary partition table. it does not deal with any partition tables stored in the other partitions.
–help display this help and exit
–version output version information and exit
GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils ‘dd invocation’
[root@b0ydC home]# dd –version
dd (coreutils) 8.22
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.