partition.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Mon, 22 Feb 2016 12:46:36 +0200
changeset 1905 fba288d59662
parent 1888 5a71256a6315
child 1912 8b81a8f0f692
permissions -rw-r--r--
Include only local subsections into TOC. This prevent duplication of TOC when build single page HTML document. Also this make unnecessary CSS hack to hide document title as top level section.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1888
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     1
.. -*- coding: utf-8; -*-
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     2
.. include:: HEADER.rst
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     3
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     4
======================
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     5
 Storage partitioning
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     6
======================
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     7
.. contents::
1905
fba288d59662 Include only local subsections into TOC. This prevent duplication of
Oleksandr Gavenko <gavenkoa@gmail.com>
parents: 1888
diff changeset
     8
   :local:
1888
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
     9
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    10
MBR
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    11
===
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    12
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    13
Backup MBR::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    14
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    15
  $ dd if=/dev/hda of=boot.mbr bs=512 count=1
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    16
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    17
Restore backuped mbr::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    18
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    19
  $ sudo of=boot.mbr if=/dev/hda bs=512 count=1
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    20
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    21
Backup PC partition
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    22
===================
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    23
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    24
Backup PC partition table::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    25
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    26
  $ sfdisk -d /dev/sda >partition.tbl
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    27
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    28
Restore PC partition table::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    29
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    30
  $ sfdisk /dev/sdb <partition.tbl
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    31
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    32
Move PC partition table from on dist to another::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    33
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    34
  $ sfdisk -d /dev/sda | sfdisk /dev/sdb
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    35
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    36
List partitions.
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    37
================
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    38
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    39
Active / maunted partitions::
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    40
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    41
  $ mount
5a71256a6315 List partitions.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff changeset
    42