Hardware Misery… Again!
The hard disk in my laptop failed again yesterday :-( Fortunately it’s still under warranty, so I’ll have to dig out the receipt and go and swap it.
The good news is that I was mostly able to recover my data. Here’s how:
- Boot Knoppix in failsafe mode. Flip back to a text console using Ctrl+Alt+F1.
- Get the networking running. You’ll need to run
/etc/init.d/pcmcia - Set up an NFS server on another box. You’ll need to add a line containing
/somewhere/with/lots/of/space *(rw,sync)to/etc/exportsand then runexportfs -a - Mount the NFS share from the poorly computer using
mkdir /tmp/mnt ; mount -t nfs server.ip:/somewhere/with/lots/of/space - Examine the partition table using
fdisk -l /dev/hdato find your home partition. - Image it with this command:
dd if=/dev/hdaX of=/tmp/mnt/home.img conv=noerror,sync. This might take some time to run, depending on how broken the disk is. You’ll end up with a large file on the NFS server which you can mount as a loopback device.