GRUB error 2 and 21

Asked by Stephen

After instaling ubuntu I got error 21 and also error 2 thats when I unplug USB External hd and reboot ,thing is I cant get out from error massage no matter what I do only thing what works is ctrl+alt+del and if I hold F2 that takes me to BIOS setings
Dont know what to do !!!!
Help please..

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Antonio PĂ©rez-Aranda Alcaide (ant30) said :
#1

The Grub Error Index say:
http://www.uruk.org/orig-grub/errors.html

2 : "Selected disk doesn't exist"

This error is returned if the device part of a device- or full filename refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.

You haven't got a good configuration of grub. Remember that (hd0)=hda or sda and (hd0,0) is the first partition of the first recognized drive.

Revision history for this message
John Arthur Fensome (fensj) said :
#2

BugFix:

Grub Loader problems:- "OS will not boot halts at Grub loader" as seen in versions 5.04 / 6.06 / 6.10 / 7.04 (& beta) / 7.10

Most of these are created by the grub loader reading (or attempting to read) an area that it can't see because of the DMA settings.

Fix: Rather simple really go into your BIOS and reset the IDE hard-drive settings from (Auto) to a DMA mode the hard-drvie does not recognise,

 e.g. On the following two motherboards, Asus A8V Deluxe (model A + B I'm building two for friends) and Asus A7V 880, the hard-drives are seen automatically and the drives set according to the reported back DMA mode is auto-selected (using Seagate Barracuda 120gb, 250gb, and 320gb ATA {also known as PATA} 16mb cache drives are seen as UDMA modes 5 and 6, and Hitachi Deskstar 80gb (these drives are the same as IBM I believe.)

 Set the value to one NOT recognised by the drive (ignore motherboard modes) and set them to UDMA 4, if your drive uses DMA4 or UDMA 4 use a lower value or adjust accordingly.

 This will force the grub loader to read the relevant DMA/UDMA mode directly from the drive and not from the motherboard BIOS, so it then selects the correct mode and can read the drive. (If it trys to read from the motherboard BIOS it stalls and this is where the problem [BUG] occurs.

Acknowledgements:-

 This information was gleaned from the web pages at http://www.ubuntulinux.org {it is not my own}

 I hope that this helps people fix the majority of the Grub booting problem[s].

Revision history for this message
Niels (niels-olson) said :
#3

John,

great tip! I ran into this problem on only one of three machines, but grub was thoroughly confused on that machine and this fixed all the errors in one fell swoop! Thanks!

For anyone else, the machine was a Dell 4550 with the following OSs:

1) shipped with Win XP Home
2) added Debian Etch and grub, somehow ended up with two complete sets of Debian Etch entries (two fail-safe entries, etc)
3) upgraded to Win XP Pro and never told grub, but no big deal, it still pointed to the right partition
4) added Ubuntu 7.10 and grub threw "Error 2"
5) Changed BIOS setting to "UDMA - Off" and grub now recognizes all systems correctly

Revision history for this message
Hobie (hobartcat) said :
#4

LESS TECHIE SOLUTION - installed on non-partitioned drive

I had this problem, too, and I found a lot of super-techie solutions out there which I did not understand. So, I reinstalled Jaunty and when selecting the partition, I used the Advanced Options to make sure my exact hard drive was selected. Luckily, I had just installed the drive and so recognized the brand name, etc. which was very helpful.

I would recommend if you run into this problem to check the BIOS for the exact name of your drive - manufacturer and all.

I had this trouble with Heron, too, but couldn't get Heron to reinstall (some I/O error which comes and goes...?)

Good luck. I hope this is a helpful comment to techie and less-techie alike.

Revision history for this message
imagomundi (ditmarl) said :
#5

After trying to fix some UBUNTU 8.04 load problem (UBUNTU is installed on a partition of my hd - "main" and only other OS is XP pro) I ran into the same problem as NIELS is presenting in his 4): GRUB throws "Error 2". Tried JOHN ARTHUR FENSOME's and NIELS' solutions - but in vain!

HOPE someone can help ME too!

Some hd details as far as they seem relevant with regard to the above answers:

LBA Mode: Supported
Async DMA: Multiword DMA-2
Ultra DMA: Ultra DMA-5

Possible settings:

LBA/Large Mode: Auto or Disabled
DMA Mode: Auto - SWDMA0 - SWDMA1 - SWDMA2 - MWDMA0 - MWDMA1 - MWDMA2 - UDMA 0 up to 5

Other Setting Items (possible settings)

Type (not installed - auto - cdrom - armd)
Block (Multi-Sector Transfer) (disabled - auto)
PIO Mode (auto - 0 - 1 - 2 - 3 -4)
SMART Monitoring (auto - disabled - enabled)
32-Bit Data Transfer (disabled - enabled)

None of the settings I tried was successful - I hope to get a solution here!

Revision history for this message
peakit (guntasg) said :
#6

Hi, I am having ubuntu 8.04 installed for the last 2 years. Updated till yesterday with all the latest updates.
But today I have suddenly started getting these "Error 2" while GRUB loading.

Ctrl+Alt+Del continues to work.

Before this started happening I encountered a system panic (sort-off) where my keyboard's caps-lock on indicator and num-lock indicator started blinking together. I had to power off the system. And after that when it restarted it started showing me this "Error 2" errors on GRUB loading.

Could you please shed some light on how to go about fixing it? I have my office data in the system, don't want to loose that.

Thanks in advance!

Revision history for this message
delance (olivier-delance) said :
#7

@imagomundi : 8.04 uses Grub Legacy and not Grub 2. Grub2 is a complete rewriting of Grub Legacy and solution for Grub2 will not work for Grub Legacy. 8.04 is finishing and Grub2 is used since 9.10, so less and less people will be able to answer you. You should plan to move to 10.04 LTS if you want to get some help on issues. If hardware is too light for latest Ubuntu, there is lighter Linux distros. As Grub Legacy is still used by most of current Linux distros, you could also request help on other forums, like Fedora one.

Can you help with this problem?

Provide an answer of your own, or ask Stephen for more information if necessary.

To post a message you must log in.