Cloning a Hard drive ?

Vincent Trouilliez vincent.trouilliez at modulonet.fr
Mon May 2 10:02:42 UTC 2005


> 1. Boot from the live cd.
> 2. On the new disk create the same partitions as on the first drive (same
> order, same size, same partition type) for example with fdisk. You should
> restart, as some times the ioctl-reload failes and the new partition-map for
> the drive is not reread.
> 3. Boot the livecd again and do a "dd if=/dev/sourceX of=/dev/destinationX
> bs=512" (maybe change blocksize) for each data-partition. For the
> swap-partition just do "mkswap /dev/partitionX".
> 4. Create a mountpoint (for example /mnt/newdisk) and mount the new disks
> linux root-partition.
> 5. Reinitalize grub by typing "chroot /mnt/newdisk grub-install
> /dev/destinationDisk".
> 6. That's it, reboot your new old system ;-)
> 
> Cu
> Sebastian


Danke Sebastian. I tried doing all that, but I ran into problems and was
bored wasting time and going nowhere.... so in the end, seeing as the
new drive was sliiiiiightly larger than the old drive, I tried my chance
with a simple "dd if=/dev/hda of=/dev/hdb" (as Professor X also
suggested), and about one hour later, I got a perfect clone !
partitions, filesystems, data, GRUB what have you, everything worked
perfectly as soon as I plugged the clone in ! :o)

I would like to re-arrange GRUB though, now, so need some basic help
about that... in a new thread, to keep things tidy :-)

--
Vince





More information about the ubuntu-users mailing list