LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2009, 08:42 PM   #1
yp673mp
LQ Newbie
 
Registered: Aug 2009
Distribution: Ubuntu Linux 9.0
Posts: 3

Rep: Reputation: 0
Grub error 21


I have recently duel booted my computer with Windows XP SP3 and Ubuntu 9.0. This has been working fine until I tried to install Ubuntu on to an external hard drive also. When I reboot the computer it says GRUB ERROR: 21. No other buttons work except the power button. Does anyone know how to fix this issue. And if at all possible keep Linux and XP on the computer hard drive and another copy of linux on the external. Thanks
 
Old 08-16-2009, 10:35 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Grub error 21 means that the first grub stage was unable to access the partition it needed to load the second grub stage (so it cannot even put up the menu).

To fix this, you will need to boot from the Ubuntu CD and run it as a live CD. Then you can reinstall grub. This will at least get both the operating systems on the internal drive working.

Okay, so why did it happen? When you installed Ubuntu on the removable drive, you installed grub stage 1 in the MBR, but it now pointed to grub stage 2 on the removable drive. That means that it could only access the stage 2 if the removable drive was connected. Worse, if the external drive required a driver, grub may be unable to access it even when it is connected.

So if you are adding an operating system on an external drive, you will need to modify the grub menu (/boot/grub/menu.lst) on the internal one, so that the external drive operating system is just another entry (in which the entry uses something like "root (hd1,0)" instead of eg "root (hd0,0)". This still assumes that grub can access the external drive.
 
Old 08-17-2009, 01:11 PM   #3
yp673mp
LQ Newbie
 
Registered: Aug 2009
Distribution: Ubuntu Linux 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
I used the link you gave about reinstalling GRUB. But anytime I type in a command i get this message and nothing happens. -bash: Is: command not found
 
Old 08-17-2009, 03:21 PM   #4
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Did you do this as root by typing sudo -i (it may ask for a password) then the fdisk -l command?
 
Old 08-17-2009, 09:42 PM   #5
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Jessie (Fluxbox WM)
Posts: 1,387
Blog Entries: 52

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
If you really get stuck on how to restore your grub installation, you can just reinstall Ubuntu over the top of the Ubuntu already on your internal hard drive (assuming that you have backed up your data). It is overkill, but you might find it easier.

You will still need to understand more about the grub menu if you want to have the external hard drive as a third boot option.

Last edited by neonsignal; 08-17-2009 at 09:43 PM.
 
Old 08-18-2009, 07:34 PM   #6
yp673mp
LQ Newbie
 
Registered: Aug 2009
Distribution: Ubuntu Linux 9.0
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks neonsignal. I backed up all my data and reinstalled linux. My friend is going to show me how to install and boot from the external hd. But everything is now working.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
install kubuntu 8.10 with lilo rather than grub (because of grub error 18) dukeinlondon Ubuntu 7 12-27-2008 07:53 PM
Loading Grub 1.5 Please Wait...... Grub Failed Error 18 2words4uready Linux - Newbie 5 06-12-2008 06:37 PM
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 11:29 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 09:33 AM


All times are GMT -5. The time now is 08:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration