Cloning Ubuntu installation

26 04 2009

Hi you might want to upgrade your disk from time to time, so you either need to clone or ghost it. Heres how I do it.

First prepare the disk with the GUI tool gparted. I like to have a few partitions, one for winblows, one for winblows games, one for ubuntu and one ext3 for storage.

Then copy your system (remember not to have too many apps open at this time wierd stuff could happen once you start up the other disk)
Open a terminal and write:

sudo rsync -a -x --exclude /media/newdisk / /media/newdisk

Make grub active on the new disc, in the same terminal or another write:

grub> setup (hd0) (hd0,0)

Which installs grub into the MBR of hd0 (hda) using the boot files that were already in /boot on hd0,0 (hda1).

Now you can do "kernel (hd0," and then tab in the grub command line to find partitions. Once you identify your drive you should also be able to do the math for the partition.

Okay almost done, now we have to go edit the grub menu.list located under the /boot folder of the new disk, ubuntu are using uuids to identify partitions. So it’s time to open gparted again, remember that we did it the last time from a terminal, we do the same thing again “sudo gparted”, and find the partition where you copied the system to and then right click and press info now theres a field called uuid, copy paste those into the appropriate of the menulist like here :


title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 49753240-3c10-4fdb-a624-6b07b5071d09
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=49753240-3c10-4fdb-a624-6b07b5071d09 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic

title Windows XP Home
uuid 4D9D89C529CA8435
chainloader +1

So before wiping the old disk I suggest that you try booting the new one, just in case something went wrong. I had no troubles with it, but it’s always nice to have a backup.. Most motherboards today have a option to boot from different disks.

I’ve used this blog here as source
as well as this one




One response

27 04 2009

bookmarking this on delicious

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: