LinuxQuestions.org
Help answer threads with 0 replies.
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 06-10-2009, 07:17 AM   #1
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Rep: Reputation: 16
GRUB Error 21


Hi everybody!

I'm sure you have seen many "GRUB Error 21" posts, and I, myself have read a lot of them. But none of them gave me a solution to my problem which I describe below...

Recently I installed Ubuntu 9.04 Jaunty on an External USB hard drive (750 GB Western digital Caviar Black). The 3,5" case in which my HD is placed has very slow response time, in spite the HD itself is very fast (7200 rpm).

I've made the following partitions
sdb1 /boot
sdb2 /
sdb3 /home
sdb5 swap
sdb6 /var
sdb7 /tmp

1. GRUB is installed on the right place, the MBR of the sdb (external HD and not my internal one)

2. /boot/grub/menu.lst and /etc/fstab are refering to sdbx with their UUID numbers, so the partitions are independent of the sdbx labels ... I tell you that, because I have many usb devices connected, and sometimes labels can be different e.g sdbx --> sdfx

3. I have recompiled the kernel from source, and included support for external USB storage media: CONFIG_USB_STORAGE=y and CONFIG_BLK_DEV_SD=y. In this way the boot process does not fall into ramdisk because of the slow HD response. The kernel already knows about my HD and doesn't have to detect it.

Now! this is how I successfully boot into my ubuntu 9.04.

Assume my PC and my HD are turned off...

First I turn on my external HD, and wait a few seconds
Then, I turn on my PC, press F8 to select boot media (USB: external HD in my case) and the boot menu appears. I select ubuntu 9.04 and everything is fine. I can work with my ubuntu environment.

THE PROBLEM arises when I restart my PC (reboot) from within ubuntu. When I press F8 , and after selecting boot media (USB: external HD) no boot menu appears. Instead I get a black screen with GRUB Error 21 message. No matter how many times I try to reboot, I always get this error. I tried to use doslowusb and scandelay parameters in the menu.lst file, but in vain because the boot process does not reach this stage. (GRUB Error 21 appears after stage 1.5 actually)

What can I do ?
My mobo is an ASUS M3A with AMI BIOS (version 1001). Is it something I could adjust from BIOS ?


P.S. Here is a sample of my menu.lst and fstab files ...

menu.lst
...
# kopt=root=UUID=a1875a0f-91a8-4ca2-9b24-ca82d3a42d51 ro
...
# groot=011b8e92-d253-4adf-9e2d-ca61def41c66
...
title Ubuntu 9.04, kernel 2.6.29.4-custom
uuid 011b8e92-d253-4adf-9e2d-ca61def41c66
kernel /vmlinuz-2.6.29.4-custom root=UUID=a1875a0f-91a8-4ca2-9b24-ca82d3a42d51 ro scandelay loglevel=3 splash
initrd /initrd.img-2.6.29.4-custom
quiet

fstab

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0

UUID=a1875a0f-91a8-4ca2-9b24-ca82d3a42d51 / ext3 relatime,errors=remount-ro 0 1

UUID=011b8e92-d253-4adf-9e2d-ca61def41c66 /boot ext3 relatime 0 2

UUID=63c48326-e6f3-477c-9fd2-cc67f94dc943 /home ext3 relatime 0 2

UUID=8d124f03-1b12-4db4-afde-36350b9c3a5d /tmp ext3 relatime 0 2

UUID=d5ef0f32-ff54-4ec4-98e8-71e1d3d97123 /var ext3 relatime 0 2

UUID=67b25321-62ac-4a7c-8cca-fac2788b844e none swap sw 0 0

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0




Best Regards!
Vas ...
 
Old 06-10-2009, 07:29 AM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Just a note on a recent problem I had involving grub on my 4GB USB.
Every attempt at installing grub to usb failed miserably with errors. I was using my HP Pavillion a810n PC to install grub to usb.
Then I got another used PC and followed a tinycore how-to for installing grub to usb
Ok, it worked; however, once I tried to boot it on the first PC, the hp, I would get a grub 2
error?!
Yet it booted fine on the other PC.
I again tried to install grub from the HP and again errors on installing.

Solution; the HP was set to boot from CD in the BIOS, I changed it to boot the HD group first
Bang!
The damn thing booted fine, only problem whole time was hp was not set to boot HD groyp first.
weird.
So, the advice is that it may be sopmething really simple, but that you never figured mattered
as my FAT32 syslinux usb boots on the hp no matter what the bios is set at.
 
Old 06-10-2009, 07:41 AM   #3
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Original Poster
Rep: Reputation: 16
Hi Linus and thank you! for your very fast response! (Guess you aren't Torvalds are you ?)

My boot sequence in my BIOS is:
1st CD ROM
2nd External Device
3rd Internal Hard Drive

I'll follow your advice and make my External Device 1st... and see what happens.

However I've also installed Debian on an other External Hard drive (following the same logic) and I had never boot problems with this device...

Also my "problematic" Ubuntu External Hard Drive, when tested on my brothers PC boots and reboots with no problems .... Something has to be done with my PC, but what ?

Regards!
Vas

Last edited by vasmakk; 06-10-2009 at 07:42 AM.
 
Old 06-10-2009, 07:58 AM   #4
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by vasmakk View Post
Hi Linus and thank you! for your very fast response! (Guess you aren't Torvalds are you ?)

My boot sequence in my BIOS is:
1st CD ROM
2nd External Device
3rd Internal Hard Drive

I'll follow your advice and make my External Device 1st... and see what happens.

No luck man ! Same problem with reboot !

...
 
Old 06-10-2009, 08:04 AM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Lots of stuff with Linux is confusing; but I do know that 95% of all problems are usually related to either a configuration file (menu.lst, syslinux.cfg, fstab, etc) or related
to how weird the BIOS of any given computer is.
The best way to really learn Linux is to go buy 3 used lappys and 3 or 4 used Desktops and start banging distro's thru them in various ways, cd, usb, etc.

Being that all my computers are used junk I punish them daily with multiple installs, reboots, partitioning schemes, etc

I will say that my 2 Kingston USB's, a 2GB and 4GB, are BulletProof as far as reliability is concerned.
Evey download at my site has been run thru those 2 usb's over and over again!
They have been dd'd, formatted various fs types, dropped from various heights, etc

Anyway, let's hope your issue is just something simple.
 
Old 06-10-2009, 09:35 AM   #6
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by linus72 View Post

...I will say that my 2 Kingston USB's, a 2GB and 4GB, are BulletProof as far as reliability is concerned.
I fully agree with you Linus!

I never had any problems with my 8GB HP USB stick either... It is very reliable and fast!

But I'd prefer to use an External Hard Drive instead, because I've heard here and there that USB sticks do not tolerate too much R/W. They just wear out. But hard drives is a different story... I make a heavy use of HD every time I touch my hands on the keyboard (Image, Video, Sound processing e.t.c)
One very good thing, linux is portable (in contrast with Windows). Also has some cute and free Apps (in contrast with Windows). And, since I use both Linux and Windows and travel often... I'd like my Linux on an External HD....

Maybe my problem due to some cunning BIOS adjustment, or else I'll have to change my External 3,5" HD Case (a MANHATTAN EXTERNAL ENCLOSURE SATAII to USB 2.0).


Vas
 
Old 06-10-2009, 10:04 AM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Maybe you could try using a bootmanager that boots different media?
( http://www.plop.at/en/bootmanager.html )
( http://martin.hinner.info/mbtmgr/ )
( http://btmgr.sourceforge.net/about.html )
 
Old 06-10-2009, 10:19 AM   #8
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Original Poster
Rep: Reputation: 16
That's Interesting .... Didn't know about those managers at all.
PloP looks promissing!

But let's assume I want to stick to GRUB.
If I manage to configure GRUB to put some "delay" (a few secs) between load stages (1 , 1.5 and 2) won't have I solve my problem ?
From your experience, Is it possible ?


Vas

Last edited by vasmakk; 06-10-2009 at 10:21 AM.
 
Old 06-12-2009, 10:51 AM   #9
vasmakk
Member
 
Registered: Jan 2009
Distribution: Debian Lenny, Ubuntu 9.04
Posts: 87

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by vasmakk View Post
That's Interesting .... Didn't know about those managers at all.
PloP looks promissing!

But let's assume I want to stick to GRUB.
If I manage to configure GRUB to put some "delay" (a few secs) between load stages (1 , 1.5 and 2) won't have I solve my problem ?
From your experience, Is it possible ?

Vas
I've also noticed something else, that might due to the slow response of my ext. hard drive.

1) When I let my PC idle for some time, clicking on any of the menus (specifically the first time I do that) they do not appear immediately, but after a few secs ...

2) When I Shut Down my PC, sometimes my external HD keeps on spinning and never stops after my PC is off ...

Ideas ?


Vas
 
  


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 12:12 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