Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-21-2004, 01:09 PM   #1
Registered: Aug 2004
Location: Perth, Australia
Distribution: Debian @ home + work :)
Posts: 66

Rep: Reputation: 22
Unhappy "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.

Uh oh!

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.

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
rerun grub

... is there an easier solution ...?

Old 08-21-2004, 02:13 PM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"... 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.

Steve Stites

Last edited by jailbait; 08-21-2004 at 02:17 PM.
Old 08-31-2004, 08:59 AM   #3
Registered: Aug 2004
Location: Perth, Australia
Distribution: Debian @ home + work :)
Posts: 66

Original Poster
Rep: Reputation: 22

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:



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"hdc: lost interrupt" - hard drive hangs philetus Linux - Hardware 18 03-14-2008 05:17 AM
grub "drive geom error" (unusual) Jottt Linux - Software 1 07-10-2005 05:57 PM
Suse 9.2 "GRUB Hard Disk Error" Help! fxafelix Linux - Newbie 3 02-22-2005 05:37 AM
GRUB bootloader spits out "GRUB hard disk error" Crampedson Linux - Software 2 01-26-2005 06:34 PM
Mandrake 10.1 - Linux doesn't "see" free hard drive space scottlyter Linux - General 3 10-15-2004 04:39 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration