0. Run dd as root or with sudo
1. Check very carefully that you get the correct drive letters and partition numbers with
Code:
sudo fdisk -lu
sudo blkid
df
Try either of these commands (assuming the internal drive (the source) is hda and the target partition is sda1
As root:
Edit: Mount the target drive
Code:
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
Code:
dd if=/dev/hda bs=4096 | gzip > /mnt/sda1/hda.img.gz
or (the following command is probably slower)
Code:
dd if=/dev/hda | gzip > /mnt/sda1/hda.img.gz
or with sudo:
Code:
sudo -s
mkdir /mnt/sda1
mount /dev/sda1 /mnt/sda1
dd if=/dev/hda bs=4096 | gzip > /mnt/sda1/hda.img.gz
sync
exit
or (the without the bs specifier)
Code:
sudo -s
dd if=/dev/hda | gzip > /mnt/sda1/hda.img.gz
sync
exit
Bookmarks