partition.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 01 Oct 2017 20:50:44 +0300
changeset 2197 5ee52f8d25b5
parent 1912 8b81a8f0f692
child 2205 5b98c1476d30
permissions -rw-r--r--
Changing Vagrant home directory.

.. -*- coding: utf-8; -*-

======================
 Storage partitioning
======================
.. contents::
   :local:

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