Replacing a hard disk drive with a newer/larger one can get complicated, especially since disk geometries can be confusing.
Let's assume first, that your old drive is still operating, and boots up fine.
Since my mythbox is running "headless", I found it just easier to do the rebuild on another workbench machine. In my case, my both of the IDE channels were wide open. The CD ROM drive was setup as a slave, and it is quite bootable. I plugged in both the old disk drive (in the "A" channel) and the new disk drive (in the "B" channel) as Master Drives. This means that the old drive comes up as hdz and the new drives is hdc.
I located and downloaded the ISO image for the gparted "live CD". Most of the work done is from here.. on the booted CD.
Looks like there's a newer version.. I got 0.3.4-4 .. I'm sure that'll work as well.
http://sourceforge.net/project/showfiles.php?group_id=115843
With the drives in place, I booted up on the "gparted live cd". It's a bit cranky on my nVidia card.. but Ctrl-Alt-1 gets you into a terminal mode so you can use the "Forcevideo" command and get up the GUI. The default 1024x768 works fine.. but the text is pretty tiny.. and 800x600 works great.
In no time, gparted showed both drives. real easy to click on one partition, hit "copy", click on the new drive, and hit "paste". That's what gui is all about. I setup the "activities" to copy the root, swap and myth partitions, then let it fly. You also can set it to change the partition size (on the fly) to the target drive.
I have used partitionmagic in the past.. and it works very well (under windows).. gparted is quite it's equal under Linux.
Going from my 200 GB drive to my new 500 GB drive took over four hours to complete.. to make matters worse, I screwed up the new drive, so I had to repeat the process. I was in no hurry.
The real trick to this process is betting the MBR (master boot record) to work properly on the new drive. You seriously cannot expect it too just work. .. In other words.. at this point, you got lots of data on a new drive that won't boot.. ouch!
Googling around.. I learned that you want to get "lilo" to fix the MBR for you.
Here's a page with a procedure that works..
http://users.bigpond.net.au/hermanzone/p4.html#Install_Lilo_from_a_Linux_LiveCD .. nice thing.. it works right from your "gparted live cd" session.. so there's nothing else to setup.
There are some things that I don't quite understand.. but here goes..
The procedure suggests "1. Set the boot flag". gparted doesn't show the boot flag on my old disk drive (yet it works).. I used gparted to set it on the root partition on the new drive. (ok, so it works.. doesn't seem to hurt.)
We don't really mind that the procedure is for Ubuntu.. we're all Debian family members.. close enough. In the prcedure, some of the command line items are preceeded with "sudo" .. cute, but we don't care, we don't need it.
"2. chroot into the Ubuntu install and apt-get and install Lilo" .. yeah, yeh, yeah .. sounds all that nice.. but seriusly.. our KnoppMyth drive already has Lilo.. so we don't have to get it or install it.. but the "live CD" doesn't.. and it doens't have apt-get either.. no worries.. we don't need it.. that's why we're doing "chroot". .. but first, we mount the new drive .. if you're the cautuous type.. power it all down and remove your old drive.. this is your backup in case you screw up!
"mkdir /mnt/ubuntu" .. uhh we mean mkdir /mnt/hdcmnt (new drive being hdc)
"mount /dev/hda7 /mnt/ubuntu/" .. uhhh we mean: mount /dev/hdc1 /mnt/hdcmnt/
"mount -t proc none /mnt/ubuntu/proc" >> mount -t proc none /mnt/hdcmnt/proc
"mount -o bind /dev/ /mnt/ubuntu/dev" >> mount -o bind /dev/ /mnt/hdcmnt/dev
OK, now we can "chroot" ...
the procedure says "chroot /mnt/ubuntu /bin/bash" .. our version is: chroot /mnt/hdcmnt /bin/bash
I really can't explain that the last mount commands and the chroot commands really do.. but the bottom line is.. you're logged into the new knoppmyth drive.. and you're good to go.. and set the MBR..
They show "lilo -b /dev/hda7" .. for us that's either lilo -b /dev/hdc1 OR lilo -b /dev/hda1 ... I did both!.. and the second one last.. I'm thinking that it supposed to be "hda1" because, that's what it WILL BE when I boot it back up in my mythbox. (and it works.. so.. so there!)
(last steps in the procedure.. exit.. unmount.. yeah, yeah, yeah.)
Put the new drive back in the mythbox .. and boot... enjoy!
Other reference...
http://www.tldp.org/HOWTO/LILO-2.html#ss2.1
Anyone with questions, comments.. why it should work.. why it shouldn't.. I'd be glad to hear.. Just here to learn and share!
_________________
// Brian - Hardware:
ASUS P5P800 - P4 3Ghz, 500 GB PATA HD
ASUS P5K-V - P4 Core2 Duo, 500 GB SATA HD
Hauppauge PVR-350, IR Blaster, Comcast Digital Cable
http://tech.groups.yahoo.com/group/KnoppMyth/
KnoppMyth R5F27 >> R5.5