[Bug 435183] New: grub %post script ignores errors silently
https://bugzilla.novell.com/show_bug.cgi?id=435183 Summary: grub %post script ignores errors silently Product: openSUSE 11.1 Version: Beta 2 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: suse-beta@cboltz.de QAContact: qa@suse.de Found By: Beta-Customer The grub %post script ignores errors silently. In my case this resulted in a totally broken bootloader because grub tried to install into my swap partition. Some background: My harddisk broke some weeks ago. I reinstalled with a different partitioning and then copied /etc back from the backup. This resulted in a wrong partition listed in /etc/grub.conf. Yesterday I updated to 11.1 beta2 with zypper dup. After reboot, the only thing I got was "GRUB " in the upper-left corner of the screen. The problem is this line in the grub %post script: [ -e /etc/grub.conf ] && /usr/sbin/grub --batch < /etc/grub.conf >/dev/null 2>&1 I don't say grub should automatically detect and fix this (it's too much a corner case) - but hiding all the error is a really bad idea. Please change the %post script - it should a) not hide any errors b) cause %post to fail, so that the user gets notified about failures (I have solved the problem in the meantime, but having %post failing would have been easier than fixing grub from the recovery system.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=435183
Michal Seben
https://bugzilla.novell.com/show_bug.cgi?id=435183
User duwe@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=435183#c1
Torsten Duwe
https://bugzilla.novell.com/show_bug.cgi?id=435183
Torsten Duwe
https://bugzilla.novell.com/show_bug.cgi?id=435183
User suse-beta@cboltz.de added comment
https://bugzilla.novell.com/show_bug.cgi?id=435183#c2
--- Comment #2 from Christian Boltz
This is a little difficult to do, because the grub shell does not exit on errors, and the "quit" command always succeeds.
I could however log the output to some temporary file for Yast (or whatever) to pick it up and parse it for errors. Does that sound reasonable?
Not really. Parsing output for errors is always error prone. IMHO the best solution would be to fix the grub shell - it should return an error code if something fails. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=435183
User duwe@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=435183#c3
Torsten Duwe
participants (1)
-
bugzilla_noreply@novell.com