author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 19 Oct 2015 17:04:52 +0300 | |
changeset 1769 | cadd23f8127f |
parent 899 | 7b4265c8d324 |
permissions | -rw-r--r-- |
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 |