Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 12-08-2005, 08:39 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
Unhappy grub boot loader error 21

Hi, im new to linux and im trying to install ubuntu on my archos usb 20gb harddrive( ajbm20 ). when i remove the ubuntu install cd and restart the system, grub loader attempts to load but says "error 21". how can i get grub to load ubuntu off of my usb harddisk? if u have ANY information that might help me, ill greatly appreciate it.
Old 12-08-2005, 09:56 AM   #2
Registered: Aug 2004
Location: Philly
Distribution: Debian Lenny, FreeBSD
Posts: 577

Rep: Reputation: 30
Here's one solution:

Peace V
Old 12-08-2005, 11:18 AM   #3
LQ Newbie
Registered: Dec 2005
Posts: 2

Original Poster
Rep: Reputation: 0

when i went to change the cmos setting it didnt have the "user" setting like the doc stated but did have the "LBA" setting. this link, www neowin net/forum/lofiversion/index.php/t333932.html , is the closest thing to my problem, and this link , reviews cnet com/4505-6496_7-20349561.html , shows my usb harddisk, is it possible to enter a new boot location for linux into winxp boot.ini so linux attempts to boot from the usbdrive first as a way to totally avoid using grub? ps, i removed the dots from the urls so i could post them

Last edited by rippedrob420; 12-08-2005 at 11:20 AM.
Old 12-08-2005, 11:31 PM   #4
LQ Newbie
Registered: Oct 2005
Location: Berwyn Heights, MD
Posts: 5

Rep: Reputation: 0
Sorry folks. Jim

When installing Ubuntu on a USB drive it is necessary to create a new initrd.img file in order to boot. That initrd will have to contain the necessary USB drivers.Also I have found that many times when I first boot a USB installation that I have to edit the grub menu.lst file to correct the drive mapping.
The first thing to do is to insure that your computer BIOS can be set to boot from USB.If it can not you will have to create a boot floppy or boot CD.

For a begining reference to creating the initrd necessary there are two threads on the site. Go to that site and look for the following links 1: /showthread.php?t=77280 and 2: /showthread.php?t=20522

These threads do not explain the problem of disk mapping but it is as important as anything. To check the disk mapping you will have to check two files. First the map file located in /boot/grub Make sure that your drives are mapped as follows:

hd0 (sda)
hd1 (hda)

not the other way around.

Then check the menu.lst file to insure the the drive specified for the installed linux is hd0 not hd1. Change if necessary.

It will also be necessary to change the Windows entry as follows:

title Windows
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
chainloader +1

That assumes that your Windows partition is the first partition of your IDE drive. If your computer is a Dell there will be a Utilities partion first and Windows will be : (hd0,1)

BTW I usually do my editing of the grub and menu.lst file with a LiveCd where I can work as root in a GUI mode- easier if Windows is your background as it is for me.

If you need more information just post there is lots of help here.

I always put my grub or lilo bootloader on my USB drive so that if it is not plugged in or turned on I will not get a boot error from my computer BIOS and I get a normal Windows boot.

Last edited by james419; 12-09-2005 at 08:14 AM.
Old 12-26-2005, 08:03 PM   #5
LQ Newbie
Registered: Dec 2005
Posts: 5

Rep: Reputation: 0
error 21 - question

I've managed to get kubuntu to load off an external USB drive, with windows setup as my default entry in GRUB on my primary drive and second partition. However, since I installed grub on hd0 (primary hard drive on laptop), if my external usb drive (hd1) isn't plugged in or turned on, I get the Error 21 message. Is there anyway to configure grub so that I don't need to have the hd1 mounted? - If it's not there, can't it just default to booting windows on hd0?

Any advice would be appreciated!
Old 01-19-2006, 11:46 AM   #6
LQ Newbie
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
james 419, it sounds like you may have the solution to my problem (error 21 blah blah), but could you tell me exactly how to do what you said? I don't know any commands or anything, so I'd appreciate it if you could explain to me exactly how to do what you said.
Old 01-25-2006, 07:45 AM   #7
LQ Newbie
Registered: Jan 2005
Location: NL
Posts: 9

Rep: Reputation: 0
grub error 21

Nasty error, what can I say, heh?
I had it this morning also... I am running xp, suse, and couldn't believe my eyes when I've tried to restart pc. My brain was at max use... I remembered that I had heard the other night, one of my drives had produced quite unusual noise. I thought, maybe some of the drive sectors are damaged. Tried to update, repair, manually add grub list, everything went without a hitch, but on the boot, error was still there. I've booted knoppix, and checked my drives, all okay. I've opened the bios, and changed drives from auto to LBA. No changes... and only then, before I wanted to change the order of my master/slaves, I came to realize that I have one of the USB keys connected and thought, let me unplug it, maybe that is the reason for the grub confusion. Guess what? It was. Sometimes, linux operates in really weird ways, luckily I really enjoy challenges and love the idea of open source, but at the same time I think of beginners, and I come to conclusion that bugs like this will turn many people of linux distros.
Old 01-26-2006, 08:16 AM   #8
LQ Newbie
Registered: Jan 2006
Posts: 6

Rep: Reputation: 0
errr...could you tell me exactly how it is that you change the drives from auto to LBA? People keep talking about it but no one mentions how to do that...all my computer has is AUTO and OFF.


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
wireless Keyboard not working to select boot options (Grub boot loader) psrini_vasan Fedora 7 12-16-2009 05:45 PM
GRUB boot loader blocking windows boot julienroger Linux - Newbie 3 10-12-2004 01:11 PM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
Need help with boot loader. Multi boot questions. Grub? 1993gt40 Linux - Software 1 10-16-2003 08:28 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:27 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