openSUSE 13.1 GRUB2 with BTRFS error (don't load)

I have dual-boot install Windows7 and openSUSE 13.1 with btrfs filesystem(boot) in “/” .

Installation:
/dev/sda1 NTFS “win system reserved”
/dev/sda2 NTFS “Windows7”
/dev/sda3 Linux BTRFS “/” and BOOT
/dev/sda4 Extended
/dev/sda5 Linux swap
/dev/sda6 Linux EXT4 “/home”

Problem:
When I selected in menu option “LEAVE → RESTART → Reboot to Windows7”…
Was expected Start in Windows7 and on next boot to openSUSE again BUT…
I think the START failed to update the GRUB2 configuration file for some reason (read only) starting a boot-loop for Windows7 always showing the error message “error: spare file not allowed” !

Symptoms:

  • Error: spare file not allowed
  • Boot loop for last boot selected in “Restart menu to Leave -> <another OS>”

My solution (edit /boot/grub2/grubenv to defaults):
0 - Goto google and some problems with btrfs! :confused: “could be, but not in my case” :slight_smile: http://www.barryprice.co.uk/2012/05/04/fun-with-btrfs/

  1. Start system with "Live CD
    " or “Rescue Disk” 1. In Terminal use mount and chroot:

 $ mount -bind /dev /run/media/<path.mounted>/dev
 $ mount -bind /sys /run/media/<path.mounted>/sys
 $ mount -bind /proc /run/media/<path.mounted>/proc
 $ chroot /run/media/<path.mounted>/
 
 $ grub2-set-default
 $ reboot

Known problems:
https://bugzilla.novell.com/show_bug.cgi?id=849718
https://bugzilla.novell.com/show_bug.cgi?id=856391

That’s because GRUB2 doesn’t fully support btrfs yet. It cannot write to a btrfs partition and it cannot read sparse files apparently.
Either use an ext2 /boot partition or just don’t use KDE’s restart feature or grub2-reboot (and hibernate, as this has a similar problem).

My solution (edit /boot/grub2/grubenv to defaults):
0 - Goto google and some problems with btrfs! :confused: “could be, but not in my case” :slight_smile: http://www.barryprice.co.uk/2012/05/04/fun-with-btrfs/

  1. Start system with "Live CD
    " or “Rescue Disk” > 1. In Terminal use mount and chroot:

$ mount -bind /dev /run/media/<path.mounted>/dev
$ mount -bind /sys /run/media/<path.mounted>/sys
$ mount -bind /proc /run/media/<path.mounted>/proc
$ chroot /run/media/<path.mounted>/

$ grub2-set-default
$ reboot

Yes that works.
Or even easier: just mount your /boot partition (or /) and remove the file /boot/grub2/grubenv… :wink: