Tuesday, June 20, 2006

VIA EPIA Gentoo Migration

Currently, I was using a VIA EPIA system as my music server, but now I'm thinking about turning it into a smart router for the home office. This will entail adding a ethernet card to the unit in addition to migrating my hard drives from a pair of 300GB drives to a pair of notebook drives (for less power). Since I'm using Software RAID, moving from one set of disks to another should be nearly seamless.

The hardware has changed a little bit since my previous attempt at building the system back in March 2005, but the BIOS settings are identical. The current hardware consists of:

(1) VIA EPIA ME6000 (EPIA M series), 600Mhz fanless CPU
(2) 300GB 5400rpm hard drives
(1) DVD-ROM
(1) Morex Venus 668 Black Case
(1) 1GB PC2100 DIMM

I'm going to replace the two 300GB 3.5" drives with less power-hungry 60GB laptop drives. The basic process is:

  1. Detach the DVD-ROM (which happens to be the master drive on the 2nd cable) and connect the laptop drive. That will allow me to work with the new drives one at a time while I migrate from the old to the new.
  2. Copy the boot sector from the old /dev/hda to the new laptop drive: dd if=/dev/hda bs=512 count=1 of=/dev/hdc
  3. Verify that the first (3) partitions on the new drive are identically sized as the original drive.
  4. Copy the filesystem from the old drive to the new drive: dd if=/dev/hda1 of=/dev/hdc1
  5. Install grub on the new disk.
  6. Shutdown
  7. Remove the old /dev/hda 300GB drive, move the new laptop drive into place
  8. Restart the system, verify the Software RAID. I had to tell mdadm to add the /dev/hda partitions to the arrays: mdadm /dev/md0 -a /dev/hda1


Note: I forgot to install grub on the new disk this last time. So I need to boot from the LiveCD, chroot into the O/S and re-install grub on the new disks.

No comments: