PDA

View Full Version : Cloning a hard disk



ferrel
06-29-2005, 06:50 PM
I want to clone the harddisk of a machine to six other identical pc's, without going through the
operating system install and application software install for each one. This strategy "seems"
reasonable! (Is it reasonable?) I did the install on the base machine; du -h shows about 5.6 Gb.
I used my external dvd+rw to burn the files, which required two dvds.
On one, I copied all of the files except /usr, and I copied /usr to the other dvd;
/usr is large, since that's where I installed all of the application software.

I want to boot the other machines with Knoppix 3.7, and install the files on both dvds to their
hard disks. The pc's to be cloned, when booted with Knoppix 3.7 with the dvd+rw (usb) plugged
in, do show that the dvd writer is mounted.

My question: How exactly do I prepare the hard drive for this cloning process? I use ext2 for
a small /boot partition, and ext3 for all others, except swap. I managed to delete all files on
the machine that I tried this on (yes, it really is easier to destroy than create!) Do I need to
format the hds, or can I just copy everything over? I do have the original partition table from
the base machine saved with sfdisk. Is there an easier or more obvious way to do this?

Thanks in advance!
Ferrel

chris-harry
06-30-2005, 05:39 AM
if all the computers are exactly the same, i dont see a problem... i really havent heard of cloning a hard drive yet...

but i have heard that you can do a mass install! thats where all the computers are connected via network, and yeah, they all get installed at once... i dont know how to do that though...

When you partion a hard drive, that partion automatically "formats" that new partion... not the whole drive itself...

Cuddles
07-02-2005, 01:39 PM
ferrel,

not exactly sure of this, I have never had more than one system that was precicely the same as another system ( something was always different; motherboard, memory, hard drives, processor, video, sound, etc... )

In theory, if the systems are, as you said, identical in every way, I would think your idea should work.

From what I would think, you would still need to do the following:

Boot the installed, or cloned, version, off the CD.
Use cfdisk, or fdisk for FAT, for your partitions to be set up.
Use the proper format program; as was previously mentioned, cfdisk is identical to fdisk, in that NO partitions that you create will be formatted.
*** for cfdisk - use the correct mk... routines to format; ext2, ext3, reiser, etc... for the swap, use mkswap ( if its Linux ), use the format with DOS for those FAT partitions.
When copying those ¨cloned¨ files, be sure to keep the user priviledges, permissions, intact. This is especially a concern when it comes to the /home areas - most of the time, using a Super User, or root user, copy, the priveledges / permissions may be created with the user root - /home areas need to have these both owner and group, set to the specific user, not root.

Lastly, and very important, copying the boot stuff isnt going to work... Especially if you use either LILO or GRUB for your Boot Manager - copying alone wont do the trick -=- you need to get the loader into the boot sector of the hard drive. This process is usually done when you do the INSTALL process.

Not exactly sure what you need to do, to get the Boot Loader working on the Boot Sector of one of these ¨cloned¨ copied systems.

Not exactly sure if I have ALL the information, above, exact, and complete, or that I might have not only missed something, inadvertantly, or not thought of it at all. My appologies, if I missdirect, it would, of course, be, unintentional, and would hope that that would be understandable, since I have never done ¨this exact process¨ before, myself.

I have done, a more, toned down version of what you are doing... I have done complete installs, from a LiveCD, created a LAN setup, and then ¨cloned¨ the /home folders -=- this process I have done for at least four systems, of these four systems, not one of them was either identical in any way, or had the exact same version of the Operating System being installed.

At one point I had two systems running different versions of Knoppix - each done with the ¨cloned¨ /home area, and then, three systems with RADICALLY different versions of Kanotix running on them -=- the later, I still have, one system has Kanotix64, and the other two now have Kanotix BH9a on them. Again, this method is seriously less than what you are attempting.

My best - theory - on how to do what you want to do - is:
Check out how to create your own ¨distrobution¨ - complete with what you want in your ¨cloned system¨, and then, simply, do a hard drive install on your ¨other¨ systems -=- this would take care of the permissions, setup, configurations, files, and programs, for you - not to mention setting up your Boot Loader. Only thing you would have to do is create your partitions, and format - in the case of swap and /home partitions. If your ¨distribution¨ only installed on a ¨single partition¨ then you wouldnt even need to worry bout formatting it, the installer would handle that for you.

Hope this has helped, even if it be a small amount,
Ms. Cuddles