LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-20-2007, 10:08 AM   #1
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
Disk image with dd


When I make an image of a drive to a file, using, say,

dd if=/dev/hda of=/mounted_usb_drive/hda.img

Is the file size going to be the same as the size of the drive at hda? If so, is there a better way of cloning a drive for recovery purposes? In this instance, probably about 30GB of 80GB are actually in use, but the drive contains an XP recovery partition and two Win XP partitions; the recovery partition may also contain the inbuilt DVD player (this is a multimedia-type laptop) which I have no other recovery for, to my knowledge (or it may live on its own little ROM?).

The point is to remove Windows and try Linux without burning myself (if it doesn't work, I should be able to just clone back the image).

Many thanks,

Samsara
.
 
Old 01-20-2007, 10:21 AM   #2
The Headacher
Member
 
Registered: Jan 2007
Distribution: Vector Linux
Posts: 90

Rep: Reputation: 15
I'm not sure about imaging a disk, but I occasionally use partimage to make an image of a partition. It can be found on several livecd's amongst which the System Rescue CD
 
Old 01-20-2007, 10:28 AM   #3
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
You could pipe the output of the dd command into gzip to make a compressed image. This is the way I do my backups and a 6GB partition is reduced to ~2GB:
Code:
dd if=/dev/hda | gzip > /mnt/hdb1/system_drive_backup.img.gz
And to restore:
Code:
gzip -dc /mnt/hdb1/system_drive_backup.img.gz | dd of=/dev/hda
Obviously, compressing the image takes longer, but does result in smaller backups. Refer to the wiki article for more info: http://wiki.linuxquestions.org/wiki/Dd

edit: it's also worth looking at this thread for a really comprehensive article on the dd command: http://www.linuxquestions.org/questi...postid=1848006

Last edited by pwc101; 01-20-2007 at 10:30 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
disk image using dd fatrandy13 Linux - Software 2 11-15-2005 04:39 PM
Burn IMAGE to disk NoS Sr50 Linux - Software 3 09-05-2004 11:56 PM
Disk Image sgc Linux - Newbie 10 10-10-2003 08:33 AM
Disk image to CD unixgeek Linux - Software 3 09-25-2003 01:22 PM
Disk image to CD unixgeek Linux - Software 1 09-16-2003 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration