grub 2 error: out of disk. failed to boot default entries. press any key to continue...

Reported by yossisynett on 2009-11-07
This bug affects 18 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)

Bug Description

Binary package hint: grub2

I recently updated one of my computers to Ubuntu 9.10 and I've been trying to upgrade the bootloader to grub 2. The computer is an Acer TravelMate 240 but the hard drive died some time ago so I've been booting off a USB harddrive, because the computer's BIOS doesn't support USB boot, I'm using the PLoP Bootmanager on CD (http://www.plop.at/en/bootmanager.html) to chainload GRUB from the USB drive. GRUB legacy has been working fine like this for months.

Now when I chainload GRUB 2 from GRUB legacy I get the following error:

error: out of disk

    Failed to boot default entries.

Press any key to continue...

When I press a key the message just repeats. In order to boot and access the GRUB legacy menu, I have to do a CTRL+ALT+DEL. Please tell me if you need any more information to complete this bug report.

ProblemType: Bug
Architecture: i386
Date: Sat Nov 7 15:08:55 2009
DistroRelease: Ubuntu 9.10
Package: grub-pc 1.97~beta4-1ubuntu4
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: grub2
Uname: Linux 2.6.31-14-generic i686

yossisynett (yossisynett) wrote :
yossisynett (yossisynett) wrote :

Update: So I changed the GRUB 2 configuration to allow me to enter the menu. First I went to the command line and entered the boot commands for the default entry one by one. I found that the second command: "if [ -n ${have_grubenv} ]; then save_env recordfail; fi" is the one that produces "error: out of disk". When I removed that from the default entry, my system booted fine.

Orus (david-contact) wrote :

Same problem here!

My computer (Compaq evo n600) doesn't have a hard-disk, since i've replaced it with a compact flash card (thanks to a CF<->IDE adapter).

After serveral boots, I get the "out of disk" error.

I'll try tonight to remove the line "if [ -n ${have_grubenv} ]; then save_env recordfail; fi". Which file must I modify? I suppose I have to boot from a live CD in order to make the change.

Orus (david-contact) wrote :

Ok, I've commented the line and it boots again! The error message "out of disk" is still displayed, but at least it boots.

I've also commented the line in the file /etc/grub.d/10_linux , because the file grub.cfg is generated.

beardedwalrus (beardedwalrus) wrote :

Hey could one of you PLEASE give me step-by-step instructions to fix this? I know how to work a terminal pretty well but I have no idea how to enter the boot commands one by one or remove a code from the default entry

yossisynett (yossisynett) wrote :

Hi beardedwalrus, I hope this helps. If you can't log into your system at all then you need to hold down shift when you start the computer to access the grub menu and then 'e' to edit the default entry.

Find the line recordfail=1 and comment out that line and the line after it which should start "if [ -n ${have_grubenv} ]".

Then hit Control + x to boot.

Once you've got into your system open up a terminal and edit the file /etc/grub.d/10_linux, you'll need superuser priviledges so for instance if you wanted to edit it with vim you would run: -

sudo vim /etc/grub.d/10_linux

Once again, find the line recordfail = 1 and comment out that line and the line after. Save the file and quit the editor.

Now run

sudo update-grub

The last command will regenerate /boot/grub/grub.cfg and your system should boot normally.

For more information you should try looking at: -
http://ubuntuforums.org/showthread.php?t=1195275 - there is specific instructions for dealing with this bug there although no information about what's causing it.

yasmynt (yasimoontea) wrote :

I'm also getting the msg:

error: out of disk

    Failed to boot default entries.

Press any key to continue...

I've deleted out the two lines:

recordfail=1 and the line after it: "if [ -n ${have_grubenv} ]".

Then hit Control + x to boot. - but it doesn't load. I'm running 9.1 and have been for the past couple months, with no major problems excepts it gangs for a long time before allowing me to log in----- well that was when I could log in...

I'm seriously considering going back to Windows though Ive really liked ubuntu. but I cant deal with these issues every few weeks!!!!!

Alfonso Rodriguez (euoar) wrote :

@yasmynt Have you tried just deleting the "if .." line? May be the recordfail=1 shouldn't be deleted. I had the same problem and deleting that line has worked for me. Then once in linux I've edited the 10_linux file as explained by @yossisynett and it works for me...

Chris (cbaines) wrote :

I also have this error, the workaround works but I think there is a running theme here. I also use PLoP to boot ubuntu from my external usb hard drive. Could this bug only affect grub booting form external hard drives?

Changed in grub2 (Ubuntu):
status: New → Confirmed
status: Confirmed → New
Davidian1024 (david-brinovec) wrote :


First off, sorry about the status changes. I have to be more careful when I click.

Anyway, this bug also affects me. Although my case might be unique.

I installed Ubuntu-9.10 to an SD card and with a purposefully made kernel i was able to get it to boot from that. Then for no reason I can come up with I started getting this "error: out of disk". I played around with manually reinstalling GRUB2 which for a while only seemed to make matters worse. Now I am back to the "error: out of disk".

A little GRUB2 specific info:

I get the out of disk error when I try a few commands from the grub rescue> prompt the error leaves me at:

grub rescue> insmod /boot/grub/normal.mod
error: out of disk

Chris (cbaines) wrote :

I think this problem is caused by trying to boot off a usb/external device, your case is quite normal, most (maybe all) of the people with this bug are booting off usb/external devices.

Have you tried the fix above, deleting the first two lines of the relevant boot sequence?

Davidian1024 (david-brinovec) wrote :

I didn't. I ended up playing around with grub-mkimage and built my own grub core image. That's been allowing me to boot off of the SD card.

I think I might be able to get it back to the situation I was in before I reinstalled grub. I might try putting it back and then see if the fix works.

Chris (cbaines) wrote :

Good news people,
Looking at these two connected pages suggests this problem will be fixed in 10.04.

Chris (cbaines) wrote :

I have now upgraded to lucid and the problem is now fixed. Can anyone else confirm this?

Chris (cbaines) on 2010-04-24
Changed in grub2 (Ubuntu):
status: New → Fix Released
John Hart (jlhart68) wrote :

I just upgraded my Acer Netbook to 10.04LTS and neither of my SD card readers work. With 9.10 the left worked at upgrade and after some tweaks the right side SD was made to work.

How do I fix this to work with 10.04LTS?

Chris (cbaines) wrote :

@John, I think you have the wrong place, try creating a thread on the ubuntu forums.

sm8ps (sm8ps) wrote :

I had a similar problem as originally stated but worse, namely the machine never did boot at all. (I tried to install Ubuntu 10.4 on my Acer Aspire One 110L. So the problem apparently is not fixed in general.) It always dropped me to the Grub Rescue. The interesting fact is that it has a Compact Flash (CF) to IDE adapter as harddisk. (I had replaced the SSD (=Super Slow Disk) on the AAO with a LSD (=Less Slow Disk).)
The fix proposed above by yossisynett did not work for me. Neither did anything else that Google came up with. After having tried all possible and impossible fixes, I did some serious trouble-shooting and discovered that another CF-card that I had installed Puppy Linux on did boot.
So my conclusion is that Grub is incapable of handling CF-to-IDE adapters well. Indeed, installing the Extlinux boot loader immediately gave me a fully functional Ubuntu 10.4 on my machine. For installing Extlinux, I followed the following explanations (in German):
Hope this helps others saving some hours of their lifetime.
St. Müller, Switzerland

Wolf (tehwan) wrote :

This bug also affects me. I tried installing Ubuntu 10.04 i386 on a Pentium 3, but it kept failing to boot from the CD. I then used Smart Boot Manager and got it to boot from the floppy, and then from the CD. I installed Ubuntu 10.04, but now, every time I try to boot the computer, it says "error: out of disk." and then boots to Ubuntu, but it does not load any session, it simply goes to a console, tty1. If I type in "startx", I have my desktop session loaded fine, but I shouldn't have to write a script to get it loaded automatically, it should already be done. I used the same CD to install Ubuntu 10.04 on another machine and all went well, so I am guessing it really is hardware specific, maybe caused by the boot sector protection on the hard drive (which I was able to get rid of using sbm).

I got networking working, I'll try upgrading the system and give you more news about it, like how I fixed it, if I did, or what I tried that did not work. But I know in the end I'll have it working, but it will probably be a hackish solution.

Chris (cbaines) wrote :

@Wolf Mostly everyone with this bug is trying to boot from a usb device, have you tried removing the first two lines (you can do this from grub) before booting. Also mostly everyone with this error were prevented from booting, Yours seams to be an unusual case.

Wolf (tehwan) wrote :

@Chris The hardware does not support booting from USB, but I get the same error. I tried removing the lines, as was mentioned in here, with no success. It still displays the error. Updating my system did not do it. I guess I'll post a new bug with all the info. As for the system not loading X automatically, it seems to be related to a problem with dbus. I think I'll just reinstall the whole system and if it still doesn't work, post a new bug report (or look for existing ones). All this could be due to a problem with the installation, and not grub specifically, so I am sorry for disturbing the calm of this thread.

Chris (cbaines) wrote :

@ I think its still a problem with grub however I think your right, your better creating a new thread. The problem behind the message, "Out of disk" is that grub is trying to access something that it cant reach. In my case it was trying to write to a usb device.
Good Luck,

I think I know why we're getting this error message, but I don't know how to fix it. I was installing Mint Linux 9 on my computer, and during the setup I chose to delete the whole hard drive and install linux on the entire disk. I have one 320GB IDE hard drive, but on the screen the setup program reported that it is a SCSI drive. That's incorrect! This is not an SCSI drive. If grub is trying to look for a SCSI drive on my computer, then it won't find it. I just installed Mint Linux, and I restarted my computer for the first time, and I get this error message:

error: out of disk
grub rescue>_

David (eduard-garza) wrote :

hi i have a the same problem i install ubuntu 10.04 from a cd, i don't have any other OS but when i turn up mi pc give this problem and other like GNU GRUB version 1.98-ubuntu1 minimal BASH.like line editing is supported for the first word, TAB list possible device or file completions. Or other like error: hd0,1 out of disk. or just: read error. and others errors...

pleas help me im a newbie

Benjamin Humphrey (humphreybc) wrote :

Getting this issue on a pressed copy of 10.04 that I picked up in UDS.

Bananabob (bananabob) wrote :

I would like to add that I am getting this issue with a freshly burnt 10.4.1

Bananabob (bananabob) wrote :

More information about this bug.

If I boot from the 10.04.01 LTS Live CD and "restart" the system 10.04.01 will boot from the hard drive, but it issues a message "error: out of disk." just before it continues the boot sequence.

If I "cold boot" directly from the hard drive I get as far as the "error: out of disk." message and the boot sequence stops with the "grub rescue" message.

Obviously there is no way I am going to boot the Live CD and do a "restart" every time I want to boot my system so I am staying on 8.04 LTS until I can get a clean boot from 10.04.

I have attached the grub.cfg from the hard drive of my 10.04 install. The fact that it boot from a "restart" and the fact that I checked with a "sudo blkid" means that there is no problem with the UUID.

Changed in grub2 (Ubuntu):
status: Fix Released → New
Bananabob (bananabob) wrote :

Using the information in this post http://ubuntuforums.org/showthread.php?t=1195275 I have been able to get more information about this bug
I reinstalled 10.04.1 LTS and tried this http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:write
This isn't the problem because the grub.cfg no longer contains those lines
So I tried removing the "search --no-floppy" from grub-mkconfig_lib as per http://sourceforge.net/apps/mediawiki/bootinfoscript/index.php?title=Boot_Problems:search

That didn't work. I got the following results:

On a "restart" the system will boot.
On a "Cold Boot" the system still gives the error: "out of disk" message

I am left thinking that the code for a "restart" follows a different path than the code for a "cold boot", hence the reason a "restart" works. The other option is that the hard drive has not reached full speed by the time a read is required during a "cold boot"
Either way this is a major bug.

This install was on a system using just SATA drives. I have installed 10.04.1 LTS on a system using IDE drives. Maybe that is another clue to finding out what is causing this bug.

I can not move forward with 10.04.1 LTS until this bug is fixed. Not what one expects from a LTS release.

Dejan Oljaca (dejan-oljaca) wrote :

I can confirm the issue mentioned in post #27.
On my machine it sometimes boots up to the grub rescue console after a cold boot, (with "out of disk" message) but always succeeds with a restart (warm boot). I'm using latest 10.04 binaries and even tried to comment out the line from post #2, but no improvement.

The same machine bootet correctly and without any issues with grub legacy, which I used up to Ubuntu 9.10.

Bananabob (bananabob) wrote :

Thanks Dejan Oljaca I have opened a new bug at https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/634639 in the hopes that someone would look at it at fix it. I would be plased if you added your support to that bug as well.

Bananabob (bananabob) wrote :

I have now tried to use Linux Mint Debian Edition to see if this problem is a Ubuntu of a Grub2 problem. I can report that the problem exists with LMDE as well. Therefore I assume this is a Grub2 problem.

Philip Muškovac (yofel) wrote :

Setting High as this makes the system unusable.

Changed in grub2 (Ubuntu):
importance: Undecided → High
matt lowy (mattml) wrote :

For my half-penny-worth on this...

I see the 'Out of Disk' error message on cold or warm boot of 10.04... it sits for a few seconds and then flashes up a 'timeout' message before it goes on to boot.

This is on an HP NC4400, clean install from the live CD image onto a big SATA hard disk, stock partitioning (i.e. / is most of the disk and there is an extended partition providing swap space). On the initial build the 'out of disk' was stopping the run but (I think, it was months ago) removing the recordfail check in /etc/grub.d/10* prevented that happening and allowed the system to boot.

I 'just' accepted the patch that introduced kernel 2.6.32-30 and now the system shows the 'out of disk' and carries on after a few seconds.

I have 10.04 installed on virtual machines at work, running in Virtual Box on XP and none of these have ever had the issue... nor does a work Dell laptop (a Dimension M4300) running 10.04 stock. This appears to be a hardware-specific issue... not related to USB connected disks or to IDE/CF exclusively.

Bananabob (bananabob) wrote :

Just to add a comment that I have just tried this with a completely fresh updated version of 10.04 and it still will not enable me to log in at all. I am afraid that this means I am stuck here on 8.04 until I can get a fix for this problem. I really think this is an extreme high priority bug. How many more people are experiencing this - not reporting it - and staying with Windows?

Changed in grub2 (Ubuntu):
status: New → Confirmed
frank van dijk (bee-c4) wrote :

effects me too after installing on a 8GB CF->IDE card.

i have used the "guided-use all space option"
after boot grub reports: "out of disk."
and i have the resque promt.

TDB (michael-baranov) wrote :

I too experience the issue.
I have been carrying my root+home+swap partitions from version to version no problem until 10.10 and 11.04; Now I have to boot livecd first, then restart, and boot from HDD.

Has anyone reported that to grub2 as a bug?

Szabolcs (szhorvat) wrote :

Every version of Ubuntu that uses grub2 gives me an "out of disk" error on first boot after a clean install. Whenever a new version comes out I try installing it on a logical partition (side by side with WinXP), and it fails to boot.

Despite many tries, couldn't come up with a solution, and couldn't boot from the grub rescue prompt either. I've the latest bios version that available for this 5yr old computer.

Please take this issue seriously. It's stayed unfixed for many Ubuntu versions, I wonder how many people have walked away from Ubuntu because they couldn't even install it.

TDB (michael-baranov) wrote :

I tried Fedora 15 on a fresh HDD. Used default partitioning with an LVM -- same problem, GRUB fails to boot me with the same symptoms. Fedora 15 too uses GRUB 0.99. Rolled back to Ubuntu 10.10 with GRUB 0.97 -- works like a charm. IMO the problem is clearly somewhere in v0.97 < GRUB <= v0.99

wb8nbs (wb8nbs) wrote :

I just spent several days trying to install 10.04 NBR on a Thinkpad 770Z (circa 1999). The machine was running SuSE 10.3 and would not run the Arduino IDE and refused to connect to my wireless AP with anything but bare WEP. I collected several hard drives so I could experiment while not disturbing the 40 gig SuSE disk. I tried Puppy and a couple versions of Vector but the distro that worked best was Ubuntu 10.04 Netbook Remix. I installed that from a magazine DVD on one of the spare drives and got WPA2 and Arduino 1.0 working with not too much trouble. I used xorg.conf from the SuSE 10.3 install to get 1280x1024 display.

Then started in on the 40G Fujitsu drive. It had 6 partitions, win98, swap, /, /usr, /boot and /home. I kept win98 and /home but used the installer gparted to merge /, /usr and /boot. Drive would not boot Grub said "out of disk" and dropped to rescue mode. An ls showed the correct partitions including (Hd0,5) which was where / was installed but ls (hd0,5)/boot gave the "outof disk" message. Read the release note about cylinder alignment, then backed up /home and tried deleting all the linux partitions and rebuilt them with gparted still leaving the win98 alone. "out of disk" error. Backed up win98 files and deleted and rebuilt ALL the partitions with gparted. Still "out of disk" after the install. I noted gparted, cfdisk and fdisk each gave different reports when looking at the partitioning in each one of these steps. What finally gave me a bootable disk was deleting all partitions and rebuilding with good old fdisk. I think I installed 10.04 NBR six times during this (minimum one hour for an install).

I have a gadget to plug a second hard drive into the CDROM slot on this laptop so in each of the iterations I was able to boot from the spare disk, mount the installed system partition on the 40 gig disk. and examine the files. In all cases I was able to access all information on the non-booting drive. Since grub2 consistently gave "out of disk" when attempting to ls the boot directory after a failed start, I can only conclude that this is a deficiency in grub.

juanmatias (juanmatias) wrote :

Hello, everybody.

After read a lot of pages, try a lot of "possible solutions" and fail every time, I still have the same "out of disk" error on GRUB load.

Last step I took: ensambled a PC with an ASUS M5A78L LE, Athlon II X3, 4Gb RAM, SATA HDD WDC WD10EARS-00MVWB0 1TB.
Soft: Linux Mint 12 (Ubuntu based), grub-setup (GRUB) 1.99-12ubuntu5-1linuxmint1

When I start with a hard boot I get the "out of disk". But if I start with a soft reset ther is no problem.

What I found:

In the GRUB's rescue line I put 'ls' and I can see my partitions, ie (hd0,msdos1).
If I enter "ls (hd0,msdos1)/" I can see the files and dirs in the disk. But if I enter "ls (hd0,msdos1)/boot/" I get an error.

I tried "Super Grub2 Disk", and again in a hard boot I can't see any OS nor grub.cfg files. But if I run "Super Grub2 Disk" after a soft reboot I have no problem.

So, I thought the problem is only during the hard boot.

Seeing at the BIOS I found this: During a hard boot the BIOS' POST message shows a 32Mb HDD. But during a soft reset it shows a correct capacity (1TB).

So, the problem, I think, is that during a hard boot, since BIOS is detecting only 32Mb (the HDD's cache size) GRUB can't find any file beyond this capacity.
Then I start my PC with a USB stick, and starts ok. The loader shows the boot menu, I select the choice and the load process begins. In this moment, does not matter if it is before OS finish its load or not, I reset my PC (throguh ALT+CTRL+DEL or reset button). Since this time is a soft reset, the BIOS detects correctly the 1TB hdd and my OS loads with no problem.

My guess: when the USB stick (or live CD) boots, the HDD starts to work, then it reports it whole capacity. Then if I reset my PC it is correclty detected and the OS starts ok.

My question: Is there a method that GRUB can "start" the HDD someway, so it report the correct capacity then the files can be accessed?

I don't know if it is a HDD's bug (I read a lot of people have this issue with big HDDs), but maybe it can be solved from within GRUB somehow.

Do you need more info about my PC?



Bananabob (bananabob) wrote :

Just to add to JuanMatias post.

I have had the same problem for ages. I recently updated my bios so that it would recognize the 1TB disk correctly, as per this post

The bios now does recognize the 1TB disk correctly but the PC will still not boot from the 1TB disk on a "cold" boot, but after the PC has been booted from another drive, I can do a reboot from the 1TB drive no problems.

It would appear from this that the problem is with GRUB 2 and not with the BIOS.

Why is this taking so long to get fixed?


juanmatias (juanmatias) wrote :

Ok, dudes.

Finally I SOLVED my issue. I'll post this info here 'cos if this is the cause for your problem then is not a GRUB's bug.

I read a reported issue with the HPA in the disk. Shortly, seems to be that a some motherboards write a copy of the BIOS (or something like this) in a low area of the disk. Then, since it used some space tries to write the correct amount of usable space. For example, if the MB used 1Mb then corrects the HDD size to be 1Mb smaller. This seems to be common with Gigabyte MB (which have XpressRecovery).

Ok, I have an ASUS mother, which doesn't write to HPA. But my HDD was used in a GB MB previously and despite I already deleted all the partitions and formated the unit seems to be that the problem was still there.
I used to check it hdparm utility:

I ran this command (my disk is /dev/sda)

    hdparm -N /dev/sda

This is the result:

    max sectors = 1953525168/1953525168, HPA is disabled

As you can see HPA is disabled. Anyway I tried to apply the solution as if HPA were enabled, which is re write the visible sectors of the disk again on it. In this case:

    hdparm -N p1953525168 /dev/sda

(don't forget the "p" in front of the number, it makes the change permanent)

Then I rebooted my PC and the POST message of BIOS reported my disk as 1TB.

So what I think. The motherboard (in this case the previous Gigabyte used with my disk) wrote the HPA. Despite I repartitioned and formated the disk, something remained in the unit reporting to the BIOS a wrong capacity (I read that in Windows the OS itself could have problem reading this value, does it read the value from the BIOS? I don't know). In my GNULinux I got the correct capacity since the OS read this value in other way (does it count the sectors or something else? I don't know). So, if you rewrite this value with hdparm (or use other apps such HDAT2 or "HDD capacity restore tool", I didn't test these apps, I used hdparm only) the disk should report the correct amount of sectors to BIOS.

Ok, I hope this info will be useful for a lot of people and I insist, if this is the problem (thanks Gigabyte Motherboard for my time researching ;) )it is not a GRUB's bug.


juanmatias (juanmatias) wrote :

Sorry, I forgot to say that when Gigabyte writes the HPA to correct the amount of space, it has a bug, so a 1TB disk is reported as 33Mb, a 2TB as 1TB and so on.

Bananabob (bananabob) wrote :

It would still appear to be a GRUB2 problem as my disk is recognized correctly

juanmatias (juanmatias) wrote :


Do you have a Gigabyte MB?
I had that problem with a GB. I don't know how GB handles the HPA writting process, but if you have a GB (or any other writting-HPA-motherboard) and you had the problem before you updated the BIOS, maybe you can get a try to hdparm to update the value in your disk.
Think about this, my disk was used in a GB MB, then repartitioned, then formated, then installed in an ASUS.... and despite this MB does not write the HPA the value remained the same.

I have this problem with an old machine where the BIOS does not recognize the full size of the hard disk.

The machine is a Dell Inspiron 6000 laptop and the BIOS recognizes the disk as 137GB even though it is really 250GB.

Grub2 won't boot off a partition that goes beyond where the BIOS sees the end of the disk, which is how Ubuntu is installed by default (with a single large partition).

I can work around the problem by using manual partitioning during the installation and making sure that /boot is on a partition that is in the first 137GB of the drive - in my case I created a separate 1GB partition at /dev/sda1 and mounted it as /boot.

My source of inspiration was http://www.dudek.org/blog/220

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers