partition.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Aug 2015 23:55:34 +0300
changeset 1729 22ffd80639c0
parent 899 7b4265c8d324
permissions -rw-r--r--
Make centered content design with adoption for mobile devices. Highlight TOC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
899
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     1
-*- mode: outline; coding: utf-8; -*-
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     2
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     3
* Backup mbr.
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     4
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     5
  $ dd if=/dev/hda of=boot.mbr bs=512 count=1
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     6
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     7
* Restore backuped mbr:
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     8
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
     9
  $ sudo of=boot.mbr if=/dev/hda bs=512 count=1
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    10
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    11
* Backup PC partition table.
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    12
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    13
  $ sfdisk -d /dev/sda >partition.tbl
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    14
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    15
* Restore PC partition table.
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    16
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    17
  $ sfdisk /dev/sdb <partition.tbl
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    18
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    19
* Move PC partition table from on dist to another.
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    20
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    21
  $ sfdisk -d /dev/sda | sfdisk /dev/sdb
7b4265c8d324 Set fill-column as directory local var.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 753
diff changeset
    22