LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-10-2005, 05:56 PM   #1
vbtalent
Member
 
Registered: Aug 2005
Posts: 48

Rep: Reputation: 15
Image drive???


What's the best way to image an Linux harddrive?
 
Old 11-10-2005, 06:14 PM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
I've heard of Partimage, which is included in Knoppix and SystemRescueCd.
 
Old 11-11-2005, 05:38 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Just one line of dd command in Linux if the target disk (say it is hda) is of the same type and size of the source disk (say it is hdb)

dd if=/dev/hda of=/dev/hdb bs=64M

Basically to use the above you need to have the total number of cyclinders matched in both disks. The bs parameter if omitted will default to 512 bytes and the process will be a lot slower.

If you haven't got identical drives then just clone each individual partition. Again make the partition the same size. The command, for cloning /dev/hda7 to hdc7, is

dd if=/dev/hda7 of=/dev/hdc7 bs=64M

If your have to change the partition size in the target partition then use the tar command.

Post #23 is a bullet proof method of achieving it.
 
Old 11-11-2005, 05:45 AM   #4
vbtalent
Member
 
Registered: Aug 2005
Posts: 48

Original Poster
Rep: Reputation: 15
saikee, the drives are different in size so are you saying I need to recreate the partitions on the new drive before running DD on it?

What about an extended partition?
 
Old 11-11-2005, 05:48 AM   #5
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
There is also G4U.
I can make a full copy of the complete disk, whatever the partition type. Can be really usefull if you have a mix system with different partition type.

Plus, the image is stored/fetched from an ftp server. So you can easily make images for multiple machines. Or restore an image on multiple achine simultaniously.
 
Old 11-11-2005, 06:01 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
vbtalent,

Yep. You need to partition the disk first. Obviously in cloning, say from hda7 to hdc7, the target partition doesn't match the source but its image is mirrored. On removing hda disk and plug the hdc disk to hda position the target disk partition will inherit hda disk designation and will boot as the original.


BoldKiller

Not tried G4U, pressumably it is Ghost for GNU/Linux. Should be interesting to see if it can make a XP partition of size different to the original bootable in a multi-partition disk.

I practically threw away the Windows' version of Ghost after learning to clone partitions with the dd command which is available in every Linux.

Last edited by saikee; 11-11-2005 at 06:04 AM.
 
Old 11-11-2005, 06:06 AM   #7
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,544
Blog Entries: 4

Rep: Reputation: 57
Code:
cat /dev/hda > /home/cam/hda-image.img
Easy! Saves everything, partition types, tables and their parents and pets, That's Tops Tonka!
 
Old 11-11-2005, 06:08 AM   #8
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
Quote:
Not tried G4U, pressumably it is Ghost for GNU/Linux. Should be interesting to see if it can make a XP partition of size different to the original bootable in a multi-partition disk.
G4U is Ghost for Unix. It is named that way because it uses, if my memory is orrect, a modifyed bsd (of freeBSD, not sure) core.
It can image a multipartition system without any problem. But, as I was saying, it does a Full bytes per byte copy (and compress, of course!) It does not try to understand teh exact format of the partiton. The advantage is it can work with ANY filesystem! Disavantage, it cannot be as efficent (as in the size of the image) as it could be.

You can make an image of the full disk or only of a single partition. I saw a couple of info on G4U web site about restoring to diffrently sized disk. But I did not really read them, since it was not what I was looking to do.
 
Old 11-11-2005, 04:53 PM   #9
vbtalent
Member
 
Registered: Aug 2005
Posts: 48

Original Poster
Rep: Reputation: 15
G4U was eaxactly what I was looing for!!! Worked like a charm...

Thank's for the feedback and the suggestions!

AJM,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
hard drive failing, how can I create an image of my drive? oily_rags SUSE / openSUSE 6 07-07-2005 02:19 PM
Creating/restoring drive image on USB drive OneSeventeen Linux - Newbie 9 07-06-2005 05:08 AM
Creating a Drive image Earl_UK Linux - Newbie 1 02-16-2005 08:49 PM
Making a drive image pcdude Linux - General 3 01-05-2005 09:20 PM
making an image of my drive antken Linux - General 1 07-16-2003 01:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:53 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration