You are not logged in.

#1 2013-07-02 17:04:10

janni
Member
Registered: 2013-07-02
Posts: 1

[SOLVED] grub-reboot once dualboot

Hi,

i'm trying to get grub to boot windows once by doing 'sudo grub-reboot 2'.
grub-editenv list shows:

next_entry=2

So far so good, after rebooting the windows entry is selected and everything works.
But with the next boot the variable is not unset and the windows entry is still selected.

GRUB_DEFAULT is set to 0, so it should unset next_entry:
from /boot/grubgrub.cfg:

if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

Grub shows "err: sparse file not allowed" right before the menu, but boots fine.
It's installed on a ssd with btrfs root partition and GPT.

Maybe it has to do something with the compression of the fs (i use lzo)?
Any ideas how to solve or further investigate this?

edit:
After testing in the grub shell:

 save_env 

yields the "sparse file not allowed error"

Ok, seems like its a bug with btrfs/reiserfs and their grub2 implementation not being able to write to disk:
http://lists.gnu.org/archive/html/grub- … 00011.html
https://bugs.launchpad.net/ubuntu/+sour … bug/736743

if the error annoys you, use:

 sudo grub-editenv create 

that should empty the grubenv and prevent grub from trying to save_env.

I think the bug also implies that grubs savedefault does not work with btrfs root.

Last edited by janni (2013-07-04 09:22:46)

Offline

Board footer

Powered by FluxBB