Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
dev:ubuntu:clonedisk [2013/04/18 16:44] jamis7005 |
dev:ubuntu:clonedisk [2013/04/19 19:01] (текущий) jamis7005 |
||
---|---|---|---|
Строка 30: | Строка 30: | ||
ssh username@host "dd if=/mnt/hdd.img" | dd of=/dev/sda | ssh username@host "dd if=/mnt/hdd.img" | dd of=/dev/sda | ||
===== Copying MBR ===== | ===== Copying MBR ===== | ||
+ | [[http://www.cyberciti.biz/faq/howto-copy-mbr|src]]\\ | ||
MBR Total Size = 446 + 64 + 2 = 512 | MBR Total Size = 446 + 64 + 2 = 512 | ||
* 446 bytes - Bootstrap. | * 446 bytes - Bootstrap. | ||
Строка 53: | Строка 54: | ||
Now to restore the image to any sdb:\\ | Now to restore the image to any sdb:\\ | ||
dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1 | dd if=/tmp/mbrsda.bak of=/dev/sdb bs=446 count=1 | ||
+ | | ||
+ | ** example: 32Gb to 8Gb**\\ | ||
+ | Given: | ||
+ | * sdc: 32Gb with sdc1=4Gb, sdc2=4Gb, and 23Gb of free space. | ||
+ | * sdd: 8Gb | ||
+ | Count number of blocks to copy: | ||
+ | 8015282176/512 = 15654848 | ||
+ | | ||
+ | Create image file: | ||
+ | sudo dd if=/dev/sdc of=jr1.img count=15654848 | ||
+ | | ||
+ | Write image file: | ||
+ | sudo dd if=jr1.img of=/dev/sdd | ||
===== Watching Progress ===== | ===== Watching Progress ===== | ||