Friday, July 07, 2006

Restoring your Thinkpad after installing Linux

I'm really posting this in case someone else finds it useful. I have a Thinkpad x60s (which I love), and awhile back I installed Ubuntu Linux as a dual boot with Windows XP. Then, two nights ago, Windows contracted a particularly nasty virus. I did my best to get rid of it, but i decided I could never really trust the laptop again (email passwords, banking, credit card numbers, etc.) unless I reimaged the machine and restored it to its original factory condition, an option which IBM / Lenovo makes available by including an extra partition on the hard drive you can do "Rescue and recovery" from. So I did it.

I chose the option to wipe out all the other partitions (incluing the Linux partition) and restore the drive to its original fresh-from-the-factory state. I didn't really have anything important stored on the Linux part anyway, so I wasn't losing much.

But then, when my laptop rebooted, I got an error! And it wouldn't finish booting! The error was something like:

Grub loading stage 1.5
Grub loading , please wait
Error 22
I quickly discovered that the problem had to do with the master boot record (MBR), which I know nothing about except that I'm not supposed to touch it or it might mess up my computer, and all of the discussions online of possible solutions to my problem were too technical for me to follow, plus they were all followed with caveats of "...but don't try this solution unless you're familiar with GRUB and MBRs, etc." which as I stated, I am not. At this point, I was on the brink of depression.

To make a very long story short, here is the solution I ultimately found on the web. It involves booting from a floppy disk (which I was fortunate enough to still have a few of lying around), but I don't see why you couldn't do it with a CD or USB hard drive or flash drive:

http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-54483

You just make the floppy disk per the instructions on the webpage, boot to it, and follow instructions. You can get an external, USB floppy drive really cheap at a computer store, but we had one at work I was able to use. It takes a while to run, so be patient.

The solution came from here:
http://www.thinkwiki.org/wiki/Talk:Rescue_and_Recovery,
and most helpful was this comment toward the bottom of the page from 217.146.157.238. For the record, although he did not find the first method to be successful, I did, so try it first
:

I have tested the Recovery repair diskette on my T43, which was not booting the Rescue and Recovery partition anymore. I have successfully created and used the disk with an USB floppy drive. Everything works now again the same way it used to when the laptop was shipped. The tool on that floppy will offer two different major options:

"1. Repair the current master boot record" and
"2. Replace the current master boot record.".

The first option did not fix the problem with the Rescue and Recovery partition on my system. When selecting the second choice, there were three new "sub-options":

"A: Supports the newer IBM Rescue & Recovery ...",
"B: Supports previous versions ..." and
"C: Supports only the main operating system environment.".

For my system the choice A was successfull.

You'd think IBM / Lenovo (and they are aware of this issue, BTW) would include fixing the MBR as part of the Rescue and Recovery process.

Anyway, I hope someone else finds this useful at some point.

No comments: