A use for network boot

Have you ever had to try to replace a hard drive in a machine with a dead built-in DVD drive and an old BIOS (i.e. one that doesn’t really boot off USB devices)? It can be a frustrating endeavor.

My favored way to replace a hard drive (and yeah, I know there are other ways, but this is really the best one) is to boot the machine off a Linux LiveCD and use some sort of cloning program to clone the drive to the new one in a USB enclosure, then swap ’em. Clonezilla served me well when I replaced the hard drive in my laptop recently, so I wanted to do that with my girlfriend’s, too. But the internal DVD drive is dead, it wouldn’t boot off the external one, it wouldn’t boot off a USB Flash drive with the Clonezilla USB option, and any hope that a BIOS upgrade would fix the problem was dashed by the fact that the BIOS update program had to be run off a floppy (which the machine never had) or a CD, which clearly leaves me with the same problem again.

But, the BIOS does have a network boot option, which only became relevant to me when I felt I was running out of options. Setting up a server for network boot from scratch sounded kinda painful, but I remembered that Knoppix has this fairly cool feature they call ‘terminal server’ that might do the trick. Sure enough, I booted Knoppix on my laptop, ran their terminal server, connected it to this laptop with an Ethernet cable (luckily, though the Ethernet port is a little out of wack on this laptop, it’s still functional), selected network boot, and rather quickly, I was in a full-featured Linux environment without touching the to-be-cloned hard drive.

I used ntfsclone, which I knew to be the core of what Clonezilla uses when moving an NTFS partition, to move the single XP partition to the new drive, then ntfsresize to fill the drive (the new drive is twice the size of the old). The only snag I ran into with that was that Windows had previously diagnosed the drive to have bad sectors (the primary reason for replacing the drive in the first place), and ntfsclone doesn’t want to proceed with more than 5 bad sectors. But luckily that’s just a matter of adding a ‘–rescue’ commandline option. ‘course, it clones the bad sector map, which then causes ntfsresize to barf, but it has a ‘-b’ option. I see now that there’s some verbiage on the ntfsclone page that talks about bad sectors… whatever, it’s fine now, so I don’t feel the need to understand now NTFS deals with BS.

It’s cool that the Linux-NTFS tools have gotten to maturity these days; a few years ago when I was replacing drives, I had to do much more annoying things to clone NTFS. (I’m not sure if the software I mentioned in a previous post was based on Linux-NTFS or if they had some proprietary system (Apricorn’s software _was_ Linux-based, though.)).

One comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.