How to replace a hard drive...

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu May 12 16:59:03 UTC 2011


On Thu, May 12, 2011 at 12:39:45PM -0400, Peter King wrote:
> On Fri, May 06, 2011 at 09:18:06AM -0400, Peter King wrote:
>  
> > > So here's the second question. Is there a more sensible/straightforward way to reproduce
> > > one disk onto another of larger size?
> > 
> > The consensus seems to be: partition the new disk; copy over files (versions using cpio,
> > tar, and rsync have been mentioned); mount the new disk and chroot into it to grub-install.
> 
> The struggle continues. Got a fresh new shiny disk, and I partitioned it and installed the
> same filesystems as the current disk: /dev/sda1 for /boot [ext2], sda2 for swap, sda3 for /
> [ext3]. Mounted the boot and root partitions separately and used rsync -avHx SOURCE/ DEST/
> to copy everything over exactly -- thanks to Lennart for the suggestion. Then I replaced
> the old disk with the almost-mirror-image new disk, booted from a USB stick, chrooted into
> the new disk, and installed grub manually. All seemed to go well. Reboot, and the new disk
> is seen by the BIOS; it finds grub on the MBR and loads it; I select a kernel and start to
> boot up -- by this time I'm starting to think it will work -- and then, after it correctly
> finds my keyboard, it just, well, stops. Nothing. No drive activity, no indication of life.
> 
> Replacing the old disk I see that after finding a keyboard it then loads /sys, and calls for
> udev. Perhaps the problem is there.
> 
> What went wrong? Any idea? Seems as though grub is fine. As far as I can tell the new disk
> is the mirror-image of the image, except with respect to the installation of grub, though.
> 
> Any suggestions or ideas welcome.

Do you have UUID statements in grub.cfg and /etc/fstab?

If so, those would need to be updated to match your new filesystems.

Grub probably already got it right, but then again it might not.
That would prevent mounting / and that would make boot hang part way.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list