[Debian, Ethernet, crazy ideas] Data transfer, the hard way...

A little while ago, my PC died. Something critical --- RAM, Mother Board, CPU, not sure. It was old and needed a replacement anyway (I knew it was on its last legs a year ago, but kept putting it off), so I simply ordered a new system. I would like to recover all my old files, however, and opening the new box would obviously void the warranty. What I need to do it get them off the hard drives in the old box and onto my new one.

It so happens I have a third system laying around. It is the same architecture as the dead one (i386), but is far older. Old enough that the optimal form of data transfer was 3.5'' floppy. Not the best way to recover a few hundred Gigs of data. It does have Ethernet, however, which gave me an idea.

I was thinking of taking the hard drives out of the dead PC and putting them into the old-old one. The OS on the primary disk is Debian, so while I suspect it will not boot as-is, I would imagine I could use the Debian install disc as a live disc to do some form of kernel adjustments or something. I was then thinking of configuring NFS shares where I have files I want to keep. I will then run a cable from the old-old PC's Ethernet to the new one's and somehow connect them up (Debian to Debian, Lenny in both cases). With a mini-network and file sharing, I can just copy across and be done.

This was just a crazy idea I came up with. How realistically achievable would it be? What kinds of difficulties should I expect in moving the hard drives from the dead PC to the old-old PC? I suspect I will need to run fsck (I was logged in when it finally died), but is there any other preparatory groundwork I should undertake? How do I connect two Debian systems via a direct Ethernet link? Would I require any special hardware for this?

It's a common misconception, backed by the PC manufacturers, that opening a PC will void the warranty. This is not true, as a PC (Personal Computer) by definition can be Personalized by adding (not replacing) new hardware, provided this is all you do. As long as you apply great care, and maybe document your steps (to be on the safe side), you shouldn't have any problems.

If you think this is too risky: generally, you can move the discs to the old PC, and Debian should largely boot as if nothing happened. If it does give you problems, boot it into single user mode (append "init=S" to the kernel arguments), and disable the services that act up. To connect the 2 PCs, unless you also have a hub or switch lying around, you'll need a crossover cable.

One thing to keep in mind: if the machine you intend to transfer files from is as old as you suggest, it probably only has a 10Mbit card, which would mean a max of 1 MB/s transfer speed, or about 18 minutes per GB.

Thanks for the advice.

I had confirmed with the manufacturer and they would not respect the warranty if I opened it up.

I transferred the primary master HDD to the old-old PC, to see how things would go. I used a live disc to fsck it (it needed it) and then booted. This all went perfectly. I then configured NFS shares on the new system and ran some crossover cable between the systems. It fell away here, however. I seemed to be able to get the new PC to recognise what I was trying to do, but the old one just would not acknowledge the Ethernet at all. I tried even connecting to the Internet, but that failed. Perhaps the Ethernet port was damaged some time in the past?

While struggling with this, I realised there was actually a far easier, far more obvious route that I had not considered. Why not just make the IDE drives USB? I hunted around and found a local supplier who stocks IDE-to-USB adapters. I have started transferring files this way. It seems to be mostly successful, but there does appear to be something horridly wrong. Periodically it will fail (I/O errors), and when I check dmesg I find all manner of kernel errors about the connection and a note that it remounted the drive (after this ls no longer works on the drive). So far, I have just been noting which filed failed. I tried unplugging the drive, letting it cool down (it was burning up), and reconnected to retransfer one of the files that failed. At least this one worked after doing this. I am about half way so far, but this seems to be a pretty good solution.

You can boot udpcast livecds to make disk transferring fairly easy. It just streams /dev/[sh]d[a-z] from one machine to another over a loopback or network and comes with a decent menu system to get it configured and running the way you want. I'd trust a raw disk image a lot more than I'd trust files pulled from an NFS share, where files owned by 'root' might become owned by 'nobody', permissions masked out, etc etc etc. Incorrect owners and/or permissions on a few important files can really mess up a system in ways that will haunt it. And it certainly won't back up your bootloader, whatever it is.

You could also just do

tar -zcpf - /path/to/mounted/disks | ssh mynewserver 'cat > enormousbackup.tar.gz'

when booted from a livecd since GNU tar is very good at preserving users, permissions, and even special/device files. But again that won't back up your bootloader, only a bare-metal backup -- reading the devices files raw -- like the updcast livecds do will do that.