Backup/restore mbr/partition table.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Fri, 10 Dec 2010 14:34:29 +0200
changeset 753 052ba865b3dc
parent 752 8423422f0a57
child 754 1fed660348c4
Backup/restore mbr/partition table.
partition.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/partition.rst	Fri Dec 10 14:34:29 2010 +0200
@@ -0,0 +1,22 @@
+-*- mode: outline; coding: utf-8; fill-column: 80 -*-
+
+* Backup mbr.
+
+  $ dd if=/dev/hda of=boot.mbr bs=512 count=1
+
+* Restore backuped mbr:
+
+  $ sudo of=boot.mbr if=/dev/hda bs=512 count=1
+
+* Backup PC partition table.
+
+  $ sfdisk -d /dev/sda >partition.tbl
+
+* Restore PC partition table.
+
+  $ sfdisk /dev/sdb <partition.tbl
+
+* Move PC partition table from on dist to another.
+
+  $ sfdisk -d /dev/sda | sfdisk /dev/sdb
+