D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Disk replacement

 

On Wed, 24 Mar 2010, tom wrote:

I have a nice 80G 7200rpm drive from a knackered video recorder and thought it would be nice to use it to replace my old 40G 5400 rpm drive and use that elsewhere. Does anyone know of an easy cloning method - so I dont have to modify all those horrible device ID's in menu.lst.

Device ID's? How quaint. My lilo.conf has names like /dev/hda1 and so on...

Ideally I'd just like to insert the drive, go 'CLONE' and then take out the old drive et vouloir (for those of you that like correcting my french - veux doesn't quite make the pun work)

How I'd do it would be to connect the new drive up, boot the system, manually partition the new drive, format it (mkfs), then copy the old drive over.

And for the copy, lets say we're copying the root filesystem and the new root filesystem is mounted under /mnt - I use what might appear to be somewhat archaic way of

  cd /
  find . -xdev | cpio -pm /mnt

Then you need to get the bootloader onto the new drive - and I can tell you how to do that with lilo, but not grub...

Do the same for all other partitions and don't forget to mkswap a swap partition if it has one.

Do it all on a velour mat and you'll be fine.

Gordon
Ps. Sorry for giving some of you old timers nightmares - I bet you thought you'd never see the cpio command ever again ;-)

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html