[TriLUG] Re: HDD Migration

Lance A. Brown lance at bearcircle.net
Wed Jan 5 14:34:50 EST 2005


Jason Browne wrote:
> I am trying to get some tips on migrating an install of Linux to another,
> bigger HDD?  It is a straight 1 HDD to 1 HDD change...  I know I could use dd
> , but I am trying to see if there is a better way.

I've done this a couple time and do something like this:

- Back up existing system.
- Take system down and install new HDD as the primary disk and put the old 
HDD as the secondary disk.
- Boot the system using a rescue or system tools CD that supports the 
filesystems you are using.  I've had good success with System Rescue CD, 
http://www.sysresccd.org/, on Red Hat and Fedora systems.
- Partition the new HDD as you like.  I usually mimic the partition setup 
on the old drive, adjusting partition sizes to use the larger drive 
efficiently.
- make file systems in the new partitions.
- Copy the data from the old drive to the new.  I normally use a dump | 
restore to do this because I'm comfortable with it.  Note that if you 
changed the paritioning scheme you'll have to start with the root partition 
first and the mount the new paritions and copy over the old ones as needed.
- To fixup grub/LILO I mount the root partition for the new drive, chroot 
into it, mount any other partitions needed (/boot, etc.) and run 
grub-install inside the chroot to get the MBR set correctly.
- Exit the chroot, unmount everything and reboot.

--[Lance]
-- 
  Celebrate The Circle: http://www.celebratethecircle.org/
  Carolina Spirit Quest:  http://www.carolinaspiritquest.org/
  My LiveJournal: http://www.livejournal.com/users/labrown/
  GPG Fingerprint: 409B A409 A38D 92BF 15D9 6EEE 9A82 F2AC 69AC 07B9



More information about the TriLUG mailing list