Bug 955075

Summary: yast2 bootloader crashes from missing grub_installdevice
Product: [openSUSE] openSUSE Tumbleweed Reporter: Bernhard Wiedemann <bwiedemann>
Component: BootloaderAssignee: Josef Reidinger <jreidinger>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P2 - High CC: bwiedemann, cobexer, kailed, snwint
Version: CurrentFlags: jreidinger: needinfo? (bwiedemann)
Target Milestone: ---   
Hardware: Other   
OS: openSUSE 42.1   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast2 logs

Description Bernhard Wiedemann 2015-11-15 09:06:40 UTC
Created attachment 655927 [details]
yast2 logs

/etc/default/grub_installdevice
was still referencing a nonexistent /dev/disk/by-id/wwn-0x50014ee2af1d729b-part6
(might be related to moving my rootfs from sda6 to sda2)

and then yast bootloader threw a fatal error
Comment 1 Steffen Winterfeldt 2015-11-16 10:08:29 UTC
Josef, can you check?
Comment 2 Josef Reidinger 2015-11-18 09:32:16 UTC
Bernhard - /etc/default/grub_installdevice is authoritative source for info where stage1 is installed. If device no longer exists, what you expect from bootloader? Auto detection for stage1 is very unreliably and this info is used also e.g. for updating grub2 itself, when new version release, so it cause problem not just in yast2 bootloader.
Comment 3 Josef Reidinger 2016-01-04 14:17:00 UTC
*** Bug 960292 has been marked as a duplicate of this bug. ***
Comment 4 Christoph Obexer 2016-03-02 06:58:46 UTC
Hi I just got a new notebook and restored a backup of my openSUSE installation onto the new disk, which made my Yast2-Bootloader crash upon opening (at first it displays an error, then it crashes with signal 11).

I expect that in case the grub install device can't be found that the module asks me what to do.

I opened Yast2-Bootloader to update the entry after all.

Also I hope that RPM updates of grub2 would fail if it can't actually update the installed bootloader stage 1...

Crashing is never an appropriate response to wrong/outdated configuration ;)

I guess that provides the needed info, thus I cleared the NEEDINFO flag

Br,
Christoph
Comment 5 Bernhard Wiedemann 2016-03-02 07:33:01 UTC
(In reply to Josef Reidinger from comment #2)
> Bernhard - /etc/default/grub_installdevice is authoritative source for info
> where stage1 is installed. If device no longer exists, what you expect from
> bootloader?

At least it should not crash, but give a message asking the user to
correct the value in /etc/default/grub_installdevice
or provide the yast UI to fix the value.
Comment 6 Josef Reidinger 2016-03-02 09:41:47 UTC
Well, my plan is to detect such stuff and if found offer user to repropose bootloader configuration or exit bootloader, but it need some changes in architecture, so it is not so easy fix, but I am working on it.
Comment 7 Josef Reidinger 2016-05-19 15:34:20 UTC
OK, it should be fixed in recent tumbleweed. If grub_installdevices is not found, it will use empty one ( meaning no generic boot, no activate and no device selected to install stage1 ). Is it OK for you?
Comment 8 Josef Reidinger 2016-10-06 07:50:19 UTC
no response, lets close