List partitions.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 20 Feb 2016 02:00:25 +0200
changeset 1888 5a71256a6315
parent 1887 7ace23894f44
child 1889 265b8d0f6149
List partitions.
partition.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/partition.rst	Sat Feb 20 02:00:25 2016 +0200
@@ -0,0 +1,41 @@
+.. -*- coding: utf-8; -*-
+.. include:: HEADER.rst
+
+======================
+ Storage partitioning
+======================
+.. contents::
+
+MBR
+===
+
+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
+===================
+
+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
+
+List partitions.
+================
+
+Active / maunted partitions::
+
+  $ mount
+