Create a hard disk image:
dd if=/dev/hda1 of=/home/hda1.bin
Create a compressed disk image
dd if=/dev/hda1 | gzip > /home/hda1.bin.gz
Back up the MBR
dd if=/dev/hda of=/home/hda.boot.mbr bs=512 count=1
Restore MBR (from a Live CD)
dd if=/mnt/hda1/home/hda.boot.mbr of=/dev/hda bs=512 count=1
Backup a drive to another drive
dd if=/dev/hda of=/dev/hdb conv=noerror,sync bs=4k |
Fabio Laganà Debian, Linux, cloning cloning, dd, hard disk
For a beowulf of full fledged Debian systems (local disk, no shared /usr
or anything like that) you'd need to use
prototype-node:
dselect (install and configure everything you want)
dpkg --get-selections > selection.file
second node:
dpkg --set-selections < selection.file
apt-get install dselect-upgrade
[log any questions and answers]
[create an expect script with your responses to any questions]
rest-of-nodes:
dpkg --set-selections < selection.file
expect -c "apt-get install dselect-upgrade" -f expect-script
Fabio Laganà Debian, Linux, Shell, bash cloning
from your machine to external usb disk:
dd if=/dev/<your machine disk> | gzip > /path/nameofyourimg.gz |
from your img saved to external usb disk:
zcat /path/nameofyourimg.gz | dd of=/dev/<your machine disk> |
Fabio Laganà Debian, Linux, Shell cloning, dd, gzip, Shell, zcat