I dual boot Windows 8/openSUSE. In Yast bootloader option I changed the “boot sector” to Windows. However it doesn’t work. The default boot is still suse. Furthermore, when I edit the name from “windows 7 loader on sda” to “windows 8”, it also changes back after a few reboots.
Firstly, “Windows” is not the name of a boot sector.
Did you change the active partition? How did you change it?
What’s in “/etc/default/grub_installdevice” - please use code tags to post that.
Some system updates (new kernel, update to software that is used in the “initrd”) may require that “grub.cfg” be updated. And perhaps that is part of what you are seeing. The updating is done by running the command “grub2-mkconfig”. There is a warning “DO NOT EDIT THIS FILE” in that file. You are supposed to make changes elsewhere.
I’ve tried editing the grub2.conf which has the line “do not edit this file”, which doesn’t work.
I then tried Yast boot loader option, and changed the default boot section to “windows 7 loader on dev/sda1”. It doesn’t work either.
Anyway, I am re-installing the OS on my thinkpad, as it has several weird problem like I lose internet connection randomly after some time.
Don’t know why but the openSUSE on my usb drive is smooth and stable wherever I use it, while this dedicated oss installed on my laptop is problematic.
In my case, there is a line there “GRUB_DEFAULT=saved”. I think I can change that to
GRUB_DEFAULT=3
and then it will default to using line 3 of the menu (counting from zero). In my case, that is my Windows Vista.
Then you would need to run:
grub2-mkconfig -o /boot/grub2/grub.cfg
That is supposed to work. But you might need to have the text exactly right. And, again, you should make the change in “/etc/default/grub” so that it is not erased on an update that affects booting.
Better is to not use numbers - because they can change - but lookup UUID (string after $menuentry_id_option) in grub.cfg and use it. For submenus you need to give full path. I.e. for the case
submenu 'Advanced options for openSUSE 12.3' $menuentry_id_option 'gnulinux-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5' {
...
menuentry 'openSUSE 12.3, with Linux 3.7.10-1.1-desktop' --class 'opensuse-12-3' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.7.10-1.1-desktop-advanced-bf08b064-2753-45b5-9af1-4fab01c9cca5' {
Using explicit menu entry in GRUB_DEFAULT is not supported by YaST2 IIRC and conflicts with suspend to disk (where system sets default menu entry for resume and this currently works only when GRUB_DEFAULT == saved).