Bug 849718 - GRUB menu not available: 'sparse file not allowed'
Summary: GRUB menu not available: 'sparse file not allowed'
Status: RESOLVED DUPLICATE of bug 856391
Alias: None
Product: openSUSE 13.1
Classification: openSUSE
Component: Bootloader (show other bugs)
Version: Final
Hardware: x86-64 openSUSE 12.3
: P5 - None : Major (vote)
Target Milestone: ---
Assignee: Michael Chang
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-09 09:58 UTC by Forgotten User TljacLiSMA
Modified: 2014-10-27 15:28 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
grub.cfg (9.25 KB, text/plain)
2014-10-26 19:01 UTC, Wolfgang Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User TljacLiSMA 2013-11-09 09:58:32 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0

Some time after upgrading to openSuse 13.1 RC2 from 12.3 and rebooting my laptop I get the following error message when the system is supposed to display the grub menu: 'sparse file not allowed'.

After showing the error message the system starts booting the default kernel, but that entry seems to be hit by another bug: #841426

I fixed the grub menu problem by booting with a live USB and commenting out the lines below in /etc/grub/00_header as described here: http://www.barryprice.co.uk/2012/05/04/fun-with-btrfs/

cat << EOF
if [ -s \$prefix/grubenv ]; then
  load_env
fi
EOF

Other distros seem to be struggling with this bug as well:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/736743

As the bug seems to be related to btrfs, it might be triggered by the fact that I started out with ext4 filesystem (although I'm not entirely sure) on 12.3 and ended up with btrfs on 13.1.

Reproducible: Didn't try

Steps to Reproduce:
1. Upgrade 12.3 with ext4 filesystem to 13.1 RC1
2. Reboot
Actual Results:  
Grub produces the error message: sparse file not allowed

Expected Results:  
A functioning grub boot menu
Comment 1 Andrei Borzenkov 2014-10-11 14:27:04 UTC
Well, reading environment may fail fir different reasons and it should not cause disappearing menu. Could you attach your grub.cfg?
Comment 2 Forgotten User TljacLiSMA 2014-10-12 11:30:52 UTC
I'm afraid I don't have the relevant grub.cfg anymore.
Comment 3 Wolfgang Bauer 2014-10-26 19:01:29 UTC
Created attachment 611250 [details]
grub.cfg

I just encountered the same issue in latest Factory with btrfs as / and no separate /boot:
I hibernated the system, and since then I get the "error: sparse file not allowed" and grub2 doesn't show the menu any more. The first boot entry is booted directly.

Removing grubenv fixed the problem as expected. (I only renamed it to be able to do further tests maybe)

The corresponding grub.cfg is attached, but it should be pretty much standard. I haven't changed anything regarding the boot loader options.

This was a fresh installation of 13.2 Beta 1 (IIRC) with the default installation proposal, except that I deselected the option to create a separate /home. I then later upgraded it to Factory.
Comment 4 Wolfgang Bauer 2014-10-27 15:28:12 UTC
I investigated this a bit more, and it seems I misinterpreted the situation:
the "no sparse file allowed" error message comes in fact from trying to _write_ grubenv. If I comment out the "save_env" commands in grub.cfg the message disappears.

Grub2 seems to _read_ the file just fine.

And that's also the reason why it doesn't show the menu: I still had a "next_entry=xxx" in there.
Background: the system crashed on resume (seems to be a VirtualBox problem), and  so the next_entry didn't get removed by the resume script.

I left it in there because I thought the file cannot be read anyway, and I couldn't reproduce the error message when I removed next_entry manually.
I did at least set it to an invalid value by overwriting all characters with 'x', but apparently grub2 still hides the menu in that case.

So, at least in my case, this seems to be just a duplicate of bug#856391.
I'm marking it as such, we won't be able to find out the exact cause of the OP's issue any more anyway.

Sorry for the noise!

*** This bug has been marked as a duplicate of bug 856391 ***