> So .. I'll let you know How I go,

(again .. don't read if you're in a hurry :-)

I'll outline the FACTs first.
+ the dead system was RedHat 7.2 (and my last RedHat i've decided.)
  so the oportunity to complete the migration of all my boxen
  to Debian has arisen.
+ I don't mind configuring the 'extras' over a few days to get
  it working again as their need arises.
+ the main stuff I needed off the drive was all my development
  and DataStore directories. in some known dirs.
+ My Hard Drive Doesn't detect when the box is booted
  I left the server off for a few hours and still nothing.

Step 1: Cool the Drive.
        Because the drive doesn't detect..
        it led me to putting the HardDrive in the Freezer:
        put the drive in a static Bag
        and wound about a meter of GladWrap     around the drive.

        (be careful with all this as condensation forming on the
        drive after it comes out is fairly risky.)

Step 2: Build a new system
        Didn't want to bother ripping out a CDROM from a box.. so.
        I booted up off the Debian Boot floppies.
        Got the install going on a new Drive.
        and built the system as if it was new.

        Some points on this:

        I have a Smoothwall Linux Firewall that is my DHCP server.
        I chose a DHCP address for the Network Card (NIC)
        (although I was going to use a static IP in the end
        anyway, beacuse I wanted to 'just make sure the NIC was okay'
        without 'worrying about remembering everything')

Step 3: Get the drive detecting
        (* got a working system)
        Go to the freezer and get out the HardDrive,
        I put it in at lunchtime and took it out at 8pm.
        about 6 hours. and it was COLD.

        Plugged it into the secondary bus, the BIOS was set to Auto detect.
        fired the box up and up it came. Good so far.

        (by this time, it was absolutely covered in condensation,
        not much I could do about it)

Step 4: Mount the old partitions
        After the box had booted up I had the task of identifying
        where the partitions were mounted.

        Get the partition list of the 'dud' drive
        # fdisk -l /dev/hdc

        (and while i was at it, I needed a compy to print out
        and stick on the drive later so took a copy
        # fdisk -l /dev/hdc > hdc_part_table.txt

This is my Partition Table (and when I saw it it freaked. why the stuff is a
Fat32
partition in there (odd, *shrug* oh well)

   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1         6     48163+  83  Linux
/dev/hdc2             7       831   6626812+  83  Linux
/dev/hdc3           832      1133   2425815   83  Linux
/dev/hdc4          1134      1247    915705    f  Win95 Ext'd (LBA)
/dev/hdc5          1134      1182    393561   83  Linux
/dev/hdc6          1183      1215    265041   83  Linux
/dev/hdc7          1216      1247    257008+  82  Linux swap

        So now I had the partition, I just had to work out who was who (/ /boot etc)

        # mkdir /mnt/old
        I know that the first partition is /boot, but i needed to mount the root(/)
first

        # mount /dev/hdc2 /mnt/old
        Some weird error about an invalid partition.. (haven't got that screen shot,
        but if I knew I was going to write this I would have
        captured the screen with 'setterm -dump <tty_number>')

        Anyways, so I tried all partitions and they ALL complained ..
        so then, of course, they would not have been shutdown properly.
        'fsck /dev/hdc1' thru to hdc6 (excluding that FAT32 partition)

        Now when fsck was running, it conveniently printed out a message stating
        where the partition is mounted (might be an ext3 thing)

        The Partitions were ext3. So .. after fsck did it's thing all a-ok
        I went to mount them

        # mount -t ext3 /mnt/hdc6 /mnt/old

        Kernel doesn't support ext3 .. BUGGER!
        Ah well, let's just mount ext2

        # mount /dev/hdc6 /old

        Good!

        and the rest
        # mount /dev/hdc2 /mnt/old/usr
        # mount /dev/hdc3 /mnt/old/home
        # mount /dev/hdc5 /mnt/old/var

Step 5: Copy the old data
        Because I was limited to time before this drive fails again (possibly)
        I decided quickly to create directory /usr/local/backups

        and then
        # cd /usr/local/backups
      # mkdir public && cd public && cp -av /mnt/old/usr/local/public/. .

        and repeated the above for the other directories I wanted, (on a different
console)
      /mnt/old/etc /mnt/old/var/lib/mysql  /mnt/old/www

        This whole process was 4 copies as you can see, but took 2 hours. (5G of
data)

Step 6: The rest is pretty uneventful.

        I unmounted all the partitions from the dodgey drive
        and rebooted the box, disconnected the drive,
        wrote on it that it failedd (and the date)

        Rebooted the new system and then ran 'base-config'
        and finished configuring the apt-sources setting the 'testing'
        from the debian server, and then

        installed 2.4.18 kernel, ssh, samba, apache, php4, and other stuff I can't
remember.

        And I am done (so far)...

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to