[Bug 804065] New: zypper up installed grub2, then reboot FAILED after next kernel upgrade
https://bugzilla.novell.com/show_bug.cgi?id=804065 https://bugzilla.novell.com/show_bug.cgi?id=804065#c0 Summary: zypper up installed grub2, then reboot FAILED after next kernel upgrade Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: VMWare OS/Version: openSUSE 12.2 Status: NEW Severity: Critical Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: archie@dellroad.org QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:18.0) Gecko/20100101 Firefox/18.0 I have an openSUSE 12.2 VMWare virtual system that has been working fine since 2012-10-25. Every so often, I do a "zypper up" to get the latest updates. Occasionally these updates include new kernels. When that happens, I do a reboot and things come back to life normally. After the most recent "zypper up" I got a kernel-default update from 3.4.11-2.16 to 3.4.28-2.20, and then rebooted as I normally would. After rebooting, the system would not boot! If I were just a "normal" user :) I would have been really stuck! But even though I happen to know how to edit a grub config, this is still a huge problem because this virtual machine is half-way across the country and I don't have remote console access to it. So I have to instruct a non-Linux person on how to fix the problem using the boot screen remotely via email. This is a major pain, not to mention the long downtime it causes. It turns out grub2 (?) was still looking for 3.4.11-2.16 instead of 3.4.28-2.20. After getting the system to boot by manually editing the boot script, I started to investigate. Here are the facts: 1. Somehow my system has both grub and grub2 installed. Is this normal?? $ rpm -qa|grep grub grub2-2.00-1.23.1.x86_64 grub-0.97-185.1.2.x86_64 2. The directory /boot/grub still exists, but there is no /boot/grub/menu.lst 3. /boot/grub2/grub.cfg still had "3.4.11-2.16" in it everywhere. 4. I inspected /var/log/zypp/history and last(1) to reconstruct the sequence of events. Here they are: 2012-12-19 reboot with 3.4.11-2.16 2013-01-10 reboot with 3.4.11-2.16 2013-01-24 grub2-2.00-1.23.1.x86_64.rpm installed ok 2013-01-24 reboot with 3.4.11-2.16 2013-01-30 reboot with 3.4.11-2.16 2013-02-14 kernel-default-3.4.28-2.20.1 installed ok 2013-02-14 reboot with 3.4.28-2.20 *** FAILS *** It is unknown to me whether the grub2 install on 2013-01-24 was the first install of grub2, or just an upgrade of it. 5. Not sure if this is related, but every time certain RPMs are updated (kernel-default, udev, etc.) I always get this warning: Perl-Bootloader: 2012-10-30 16:42:10 ERROR: Core::ReadFiles: Failed to open /boot/grub/menu.lst I've gotten used to it. Obviously, this error message can be explained by the fact that /boot/grub/menu.lst doesn't exist on this system. Reproducible: Always Steps to Reproduce: I have not tried to reproduce this problem. See description for how it happened. Actual Results: System does not boot after kernel upgrade. Expected Results: System boots after kernel upgrade. -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c1
--- Comment #1 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c2
Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c3
--- Comment #3 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c4
--- Comment #4 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c5
--- Comment #5 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c6
--- Comment #6 from Archie Cobbs
The bug is https://bugzilla.novell.com/show_bug.cgi?id=804065
Short-list for repair:
You wish to use Grub2:
1. uninstall 'grub' (rpm -e grub)
Done.
2. edit file: /etc/sysconfig/bootloader line LOADER_TYPE to LOADER_TYPE="grub2"
Done.
3. to make sure edit /boot/grub2/grub.cfg to match your kernel.
Done.
4. call "/sbin/update-bootloader --refresh" to make sure the config is active.
Fails with: Perl-Bootloader: 2013-02-15 16:35:48 ERROR: Core::ReadFiles: Failed to open /boot/grub2/device.map Can't use an undefined value as a HASH reference at /usr/lib/perl5/vendor_perl/5.16.0/Bootloader/Core/GRUB2.pm line 1105. The file /boot/grub2/device.map does in fact not exist on this system.
Just why the install of grub2 killed /boot/grub/menu.lst, but did not change LOADER_TYPE is a mystery to me.
It turns out that the grub2 upgrade did not cause the problem. The system was actually built in this broken state by SUSE Studio. I have the original image (as downloaded from SUSE Studio) lying around and am able to reproduce the problem in VMWare on my laptop and can see that it has /etc/sysconfig/bootloader configured wrong. I vaguely remember a bootloader selection in SUSE Studio but don't remember what I put there (if I could login to SUSE Studio I would examine how I had configured the virtual machine image, but SUSE Studio login is completely broken ATM...). Perhaps there is something about VMWare image builds that violates assumptions of the grub2 install? -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c7
--- Comment #7 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c8
--- Comment #8 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c9
--- Comment #9 from Archie Cobbs
What happens when you use YaST2 to set bootloader to GRUB2?
I reset the VMWare image and started over, then ran yast2. It showed GRUB (not GRUB2) as the boot loader. I changed that to GRUB2. After doing so, /etc/sysconfig/bootloader contained LOADER_TYPE="grub2" Then I rebooted. It booted OK with grub2, but the previous green themed boot screen was gone, and a simple black boot screen appeared instead. After that, I upgraded the kernel and rebooted and it booted OK with the new kernel. So this is all consistent with the original, root problem being that SUSE Studio produced an image that had LOADER_TYPE="grub" in /etc/sysconfig/bootloader, but no /boot/grub/menu.lst and GRUB2 actually installed on the (virtual) disk. -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c
Lukas Ocilka
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c10
--- Comment #10 from Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c11
--- Comment #11 from Michael Chang
What happens when you use YaST2 to set bootloader to GRUB2?
Then I rebooted. It booted OK with grub2, but the previous green themed boot screen was gone, and a simple black boot screen appeared instead.
FYI. This should have been addressed and fixed in bnc#775778. -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c12
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c13
Marcus Schaefer
From the image building site when kiwi builds the 12.2 image there is no code which adds LOADER_TYPE if grub2 is set as bootloader. the function setupBootLoaderGrub2() callled by kiwi only creates the config in /etc/default/grub and no LOADER_TYPE
thus something else might have added it: a) Studio config scripts ? b) The image used grub before and was switched to grub2 somehow c) some package installs/updates /etc/sysconfig/bootloader and prefers grub over grub2 after all it's hard to guess what happened -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c14
Marcus Schaefer
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c15
Archie Cobbs
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c18
Michael Chang
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c19
Jiri Srain
https://bugzilla.novell.com/show_bug.cgi?id=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c20
--- Comment #20 from Archie Cobbs
kiwi (or YaST) is only involved in the initial installation (or, in case of YaST, when you reconfigure bootloader via the module).
Yes but please see "PROBLEM #1" Step #6 .. kiwi installs BOTH grub and grub2 at the same time. This mistake seems to set up this whole problem. -- 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=804065
https://bugzilla.novell.com/show_bug.cgi?id=804065#c
Alberto Planas Dominguez
participants (1)
-
bugzilla_noreply@novell.com