"GRUB error 15" after hard drive removal
I recently bought new hardware - an ABIT KV8 PRO and a SATA drive. Eager to play, I plugged my 2 existing PATA drives in, as hda and hdb.
I built the SATA drive last week - the current debian installer has a driver for the controller, and everything ran fine. GRUB was installed by default.
After a hassle-free week of playing and configuring, I decided to remove hdb and return it to its original home. Rebooted, and GRUB came up with Error 21.
Instinct led me to plug the drive back in, and now I get Error 15.
This is my first experience with grub (and probably my last...;)
a) I would like to understand the problem,
b) I would like to boot!!!
Luckily I had a knoppix CD lying around, so I could trawl the net for info. I've found none :(
This knoppix distro does not see the SATA drive, so no chance of chroot'ing and re-running grub (assuming that would fix the issue!)
I'm guessing (short of there being a magical fix for my broken boot loader), that I'll need to build a new boot medium with support for the SATA controller. My debian CD is a net-installer and I can't find a 'rescue' mode.
:confused: Any pointers on my best course of action? The best I've come up with is
boot with knoppix
download a late-model kernel source onto one of the IDE drives
compile it (with support for the SATA driver)
try and get it onto a floppy... (or CD I guess)
boot and mount the SATA root partition
... is there an easier solution ...?
"... is there an easier solution ...? "
The problem may be that grub uses relative addressing for hard drives instead of absolute addressing. The first drive that it encounters is 0, the second 1, etc. By pulling a hard drive out of your machine you may have thrown off the relative numbering in your grub config file. Try using knoppix to edit your Debian grub config file. See if you can fix the problem by correcting the hard drive addresses in the grub config file.
If you cannot access the Debian grub config file with knoppix or another rescue CD you could try placing the grub config file on a hard drive that the rescue CD can access and then pointing the MBR at the new grub config file. The new grub config file can be either temporary until you can boot into Debian or it could be permanent.
Be prepared. Create a LifeBoat CD.
I've rescued my system, did pretty much what you suggested - created a new MBR on one of my IDE drives. Once I was booting from a harddrive, I updated that kernel so that it could see my SATA drive, and, well the rest is obvious.
When I first read your post, I followed the Lifeboat link. Seemed pretty relevant! I thought, what a great idea, and downloaded the tarball. Now that I'm up and running again, one of my first tasks before messing around with the drives again is to build one of these rescue CDs. :)
Came a bit unstuck during the "edit the config" stage - went for a google, and turned up a question in this forum - which identified you as the Lifeboat author!
Not finding an answer elsewhere, maybe I can ask you directly here?
I posted an entirely new thread, for the benefit of others:
|All times are GMT -5. The time now is 04:56 AM.|