LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 12-29-2006, 03:08 PM   #1
blee37
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Rep: Reputation: 0
How to avoid GRUB error 21 when I remove external hard drive


Hi, I have a laptop with Windows XP on the internal hard drive and Fedora Core 6 on an external hard drive. I use the Grub boot loader. It works great as long as the external hard drive is attached.

However, if the external hard drive is not connected then Grub gives Error 21. I understand that this is because Grub was expecting both hard drives to be available. I am looking for a way to allow booting Windows XP, when the external hard drive is not attached.

I tried this:
I booted off my Fedora Core 6 CD and did linux rescue.
I edited grub.conf by commenting out all the lines for booting fedora and all lines referring to (hd1,0) the external hard drive. I then edited device.map to comment out the line for (hd1).

Unfortunately, I would still get Error 21 if the external drive is not attached.

I appreciate any help. Thanks!
 
Old 12-29-2006, 03:34 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Install Grub for Windows; http://grub4dos.sourceforge.net/
 
Old 12-29-2006, 06:39 PM   #3
blee37
LQ Newbie
 
Registered: Dec 2006
Posts: 2

Original Poster
Rep: Reputation: 0
I wanted to try your suggestion, but I cannot uninstall Grub and replace it with NTLDR. I am running Windows XP and entered "fixmbr" at the recovery console, but it did not replace Grub (even though "fixmbr" claimed to have completed its operation). Until I figure out how to get NTLDR in the MBR, I can't use WinGrub.

Any other possibilities?
 
Old 12-30-2006, 08:05 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
It usually takes two steps to [re]install the Windows bootloader, fixmbr is one the other is fixboot;

http://www.microsoft.com/resources/d....mspx?mfr=true
 
Old 12-30-2006, 08:40 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Maybe anticlimactic, but the reason grub was failing, is that its config file was on that external drive.

I would simply re-arrange the internal drive to hold both OSes, and put data on the external.

Another trick which I have not tried, but should work: Put a very small Linux partition on the internal--just enough to hold the grub stage files and the config file. If that disk is already "full of Windows", you will still have to resize even for this one.
 
  


Reply

Tags
boot, error, fc6, grub


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
Hard drive undetectable + Grub error 22 zsejk Linux - Laptop and Netbook 15 12-11-2006 07:33 AM
external enclosure for an internal hard drive vs external USB hard drive powah Linux - Hardware 1 03-10-2006 10:03 AM
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 09:48 AM
GRUB Error 17 when installing Ubuntu on an External Drive nrbelex Linux - Software 1 11-16-2005 09:06 AM
hard drive grub loading error message drum Linux - Hardware 2 02-01-2005 03:02 AM


All times are GMT -5. The time now is 09:04 PM.

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