LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Image drive??? (https://www.linuxquestions.org/questions/fedora-35/image-drive-381942/)

vbtalent 11-10-2005 05:56 PM

Image drive???
 
What's the best way to image an Linux harddrive?

spooon 11-10-2005 06:14 PM

I've heard of Partimage, which is included in Knoppix and SystemRescueCd.

saikee 11-11-2005 05:38 AM

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.

vbtalent 11-11-2005 05:45 AM

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?

BoldKiller 11-11-2005 05:48 AM

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.

saikee 11-11-2005 06:01 AM

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.

cs-cam 11-11-2005 06:06 AM

Code:

cat /dev/hda > /home/cam/hda-image.img
Easy! Saves everything, partition types, tables and their parents and pets, That's Tops Tonka!

BoldKiller 11-11-2005 06:08 AM

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.

vbtalent 11-11-2005 04:53 PM

G4U was eaxactly what I was looing for!!! Worked like a charm...

Thank's for the feedback and the suggestions!

AJM,:p


All times are GMT -5. The time now is 11:13 AM.