jondz on 20 Oct 2007 05:56:55 -0000 |
On Fri, 2007-10-19 at 23:18 -0400, Mike Leone wrote: > JP Vossen wrote: > >> Date: Fri, 19 Oct 2007 12:36:34 -0400 > >> From: Mike Leone <turgon@mike-leone.com> > >> Subject: [PLUG] How best to replace old drive with new drive > >> > >> So I've got a mail server that has an old HD. And I wanna replace it > >> with a > >> larger one, which I happen to have lying about. I know there's any > >> number of > >> ways to clone the HD (me, I like Ghost, but I also have DriveImageXML, > >> and I > >> suppose I could even do a dd). Anyways, if I were to Ghost to the new > >> drive, > >> what would I need to do to make grub run on it? I seem to remember doing > >> this before, and getting a new drive with larger partitions, but grub > >> wouldn't run. > >> > >> A pointer or clue, anyone? Something about booting a Knoppix LiveCD, and > >> running "grub-install", I believe? > > > > "Simple" answer: > > ---------------- > > 1) Install the new hard drive in the old machine > > 2) Boot a LiveCD or into recovery or single user mode > > 3) partition and format the new drive, then mount it + > > 4) rsync the data over * > > 5) chroot into the new drive's root > > I can't seem to chroot. I actually Ghosted the drive; made it the sole > HD in the system; booted with Knoppix; did a "mount /dev/hda1 > /mnt/hda1"; then tried "chroot /mnt/hda1". > > It told me it couldn't find /bin/sh. And so I couldn't go forward from > there. > > So what am I missing, that I can't install grub? (I'm asuming you partitioned your original disk into many filesystems) maybe /dev/hda1 is not root? maybe it was originally /boot ? what does ls -l /mnt/hda1/ say? ls -l /mnt/hda1/bin/sh ? if /mnt/hda1 shows a bunch of grub files try /mnt/hda2 next, then other partitions (a lot of installs used to allocate the first partition as /boot). doesnt hurt to mkdir /mnt/hdaX ; mount -o ro /dev/hdaX /mnt/hdaX to check. since the original disk is not there you can try out the partitions one at a time and "guess" the contents. try to locate the root first. get a list with fdisk -l /dev/hdX. if you locate the root then you'll have a list of the original paritions in /mnt/hdaX/etc/fstab. if youve splitted the original /boot you may have to do mount /dev/hda1 /mnt/hda1/boot or something to make the new / look like the original one (so when you chroot it will look similar to the old one). hth, jondz > > ___________________________________________________________________________ > Philadelphia Linux Users Group -- http://www.phillylinux.org > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce > General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|