[Cialug] Transplant OS

Paul Gray gray at cs.uni.edu
Wed Jun 24 07:39:24 CDT 2009


jrnosee at gmail.com wrote:
> Ok, my server's primary drive is in SMART Pre-Fail. It's used too many of
> the spare sectors.  Now I need to transplant my OS to a new drive.  Any
> suggestions for a best way to do this?  I know UUID's in fstab and settings
> in GRUB will need to be updated somehow.  Anything automated, or a good
> guide?

There are many ways to do what you want from a bootable distro.  Here's 
what I'd do.

Install the new drive -- if it's an IDE, configure it to be primary (it 
makes the grub transition a bit easier).

Boot to a USB/CDROM distro (finnix, for example).

fdisk the new disk.  mkfs the filesystems.

mount all the old and new filesystems

rsync -plarv /mnt/old/ /mnt/new/

edit /mnt/new/boot/grub/menu.*
edit /mnt/new/boot/etc/fstab
install grub to the new disk
-> under finnix ... just run grub and issue, "root (hd0,0)" (or whatever 
is appropriate), "setup (hd0)"

Not too difficult of a process...and it should boot the new disk just fine.

Good luck.

-PG


More information about the Cialug mailing list