Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ [1] 2 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: to dd or not to dd, best practice for imaging< Next Oldest | Next Newest >
robh Offline





Group: Members
Posts: 28
Joined: Oct. 2005
Posted: Oct. 31 2005,01:59 QUOTE

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.


--------------
Presario 1240
Pentium 266Mhz
96MB RAM
~3.2GB HD
full HD install of dsl 3.2
Back to top
Profile PM 
robh Offline





Group: Members
Posts: 28
Joined: Oct. 2005
Posted: Oct. 31 2005,02:05 QUOTE

oops, sorry about the double post.

--------------
Presario 1240
Pentium 266Mhz
96MB RAM
~3.2GB HD
full HD install of dsl 3.2
Back to top
Profile PM 
SaidinUnleashed Offline





Group: Members
Posts: 1428
Joined: Mar. 2004
Posted: Oct. 31 2005,03:56 QUOTE

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.


--------------
They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.

Unleash the power of the TILDE~~~
Back to top
Profile PM AOL MSN YIM 
robh Offline





Group: Members
Posts: 28
Joined: Oct. 2005
Posted: Oct. 31 2005,04:48 QUOTE

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


--------------
Presario 1240
Pentium 266Mhz
96MB RAM
~3.2GB HD
full HD install of dsl 3.2
Back to top
Profile PM 
cbagger01 Offline





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Oct. 31 2005,17:52 QUOTE

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.
Back to top
Profile PM 
11 replies since Oct. 31 2005,01:59 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ [1] 2 3 >/
reply to topic new topic new poll
Quick Reply: to dd or not to dd

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code