On Wed, 5 Oct 2011, Dean E wrote:

> Really all you needed to do to switch disks was to:
>
> 1. boot any linux distro's livecd with all 3 disks installed. (must be an x64 
> cd if your previous install was x64 though)
> 2. create your raid set (MD? or dm? whatever)
> 3. make a matching filesystem on your raid set for each filesystem on your 
> old disk (sizes do not have to match).
> 4. mount each partition, and cp -a /mnt/oldpartition/* /mnt/newpartition
> 5.  mount /proc and /dev to their relative new location in the new root
> 6. chroot into your new root partition.
> 7. edit fstab and grub lines to reflect new partition names or GUIDs. don't 
> forget swap also
> 8. reinstall grub/lilo to new raid disks via grub install, dpkg reconfigure 
> grub, whatever you want.
> 9. exit chroot, Shutdown, remove old disk, and fire it up. Machine should be 
> the same exact machine, just on different HDDs.
>
> I'm sure I'm missing a step or two but that's the gist of it.
>
> Based on your post you seem to have the technical skill for it, just not the 
> knowledge of the boot/grub/kernel/filesystem to think of how to make it work.

Thanks.  I hope that will work for someone.  I can tell that I would have 
gotten stuck on the fstab and grub editing and grub reinstallation.  The 
other weird thing was that after I got a new motherboard, my old hard 
drive wouldn't boot anymore.  I think I got it to boot after changing some 
BIOS settings, but then it would not load gnome and I was stuck with the 
console.  I can't say why it didn't work.  If I had simply copied it over, 
it seems likely that it would have continued to fail and I would have had 
to figure out what was wrong.


> Although IMHO the better way to upgrade is to do basically what you did.

That makes me feel a little better.  I didn't mention it earlier but I 
have another machine on which I need to upgrade the OS from defunct Ubuntu 
9.10 (they don't even support them for two years, except for the LTS 
releases).  I don't want it to be down long because I use it for work. 
It has a RAID1 in it, but the HDDs are 250GB and I should upgrade to 2TB 
and increase the RAM.  To me it seems like it would be wise to do what I 
know -- what I just did on my home machine and install Ubuntu 10.10 from 
scratch.  I can do a normal upgrade later to 11.10, if it is any good, but 
so far I haven't liked what I've seen from 11.04.  Or maybe I should try 
to stick with 10.04 because it is LTS.


> Get a list of what programs you want to reinstall, and then "cp -a" your 
> user home dir from the old setup to the new setup. Then just "chown 
> youruser: HOMEDIRNAME -R" to get the UID/GID correct.

Thanks.  I guess I've been using "cp" for more than 20 years but I still 
didn't know about the -a option.  I thought to use rsync because I 
believed it would do an md5 check on the file transfer.  I don't know if 
cp does anything like that, but maybe it does.

Mike