
2008/8/22 Glenn Ramsey <glenn(a)componic.co.nz>:
Hi,
I need to install a bigger hard drive in my laptop which dual boots Windows & Linux. I was wondering if anyone knows of any gotchas that I should be aware of?
What I'm planning to do is to boot from the GParted liveCD and first use dd to clone the original drive with
dd if=/dev/sda of=/dev/sdb
and then use gparted to resize the partitions.
Seems too simple, have I missed something?
Glenn
That would probably work, but it's not how I'd do it because it is likely to result in your partition table being 'less than ideal' for the new drive geometry. I generally create a new filesystem (with the new drive where it's going to be permanently, and the old drive as slave). Mount the new filesystem as '/target' and the old one as '/source', use cp -a to copy everything over. Then update the UUID's in /target/boot/grub/menu.lst and /target/etc/fstab to match the new filesystem. You can get filesystem UUID's using the vol_id command. Then run grub-install --root-directory=/target. There may be better ways, but this works for me.