HD Install :: to dd or not to dd



well, i have finally got to a place where i am happy with my hdd install. i know u all think i'm mad not going for a frugal install, but i just want to turn on the machine and have all of my apps installed as i like them.

any hoo, there are enough posts dealing with the pro's and con's of frugal, but i have a hdd install related question.

does anyone have any strong opinions on whether it is best to use th "dd if=* of=*" command to take an image of my shiny new hd install of dsl, or whether it is best to go the "g4l" or some similar prog. route.

let's here your opinions then... ;-)

i will be imaging my only partition on my only disk (apart from swap partition) to a usb external hdd. it will be no bigger than 2.9G uncompressed and the usb drive is working well in my current dsl setup.

oops, sorry about the double post.
Easiest, most efficient way to image a drive in Linux.

This creates the image...
Code Sample
bzip2 -1c < /dev/hda > myhdimage.img.bz2


And this restores the image to the HD...
Code Sample
bzip2 -dc < myhdimage.img.bz2 > /dev/hda


Happy imaging.

~J.P.

so, could you just clarify for me....
the first operation creates a bzip2'd image of my drive, which i can save to my ext. hdd.
then to restore the image do i need to boot into a live cd environment and issue the second command?
do i need to do cfdisk to recreate the partitions prior to unziping?
and i assume i need to perform the unzip action from within the dir that contains the bzip2'd image... i.e. my ext hd (sda8)

could i ask u to be slightly more "-v" as i am a noob of the first order.

thanks

FYI,

If you are going to use "dd", make sure that you install the "Upgrade to GNU utilities" first.

The built-in busybox "dd" command does not work with files larger than 2GB so you need the GNU "dd" command.

Also, before doing a backup, I suggest that you blank out any unused disk space with a bunch of zeros.  This will result in a smaller sized backup file.

1) Boot DSL livecd
2) Upgrade GNU utils
3) Mount your hard drive partition.

Then open a terminal (this example assumes hard drive partition located at /dev/hda1) and type:

sudo su
dd if=/dev/zero of=/mnt/hda1/file_of_zeros.bin bs=1M
rm /mnt/hda1/file_of_zeros.bin

Then you can go ahead and do your image backup.

Next Page...
original here.