Bug 331685

Summary: grub won't boot after upgrade + various
Product: [openSUSE] openSUSE 10.3 Reporter: Henryk Hecht <nvbugs>
Component: BootloaderAssignee: Torsten Duwe <duwe>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: jplack, jsrain
Version: Final   
Target Milestone: ---   
Hardware: i586   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast-generated menu.lst
hwinfo all output
/var/log/YaST2

Description Henryk Hecht 2007-10-08 00:44:12 UTC
Created attachment 176693 [details]
yast-generated menu.lst

I upgraded a machine from 10.2 to 10.3.  After installing the packages and rebooting, I'm left with a grub shell (no menu, graphical or otherwise).

Tried so far:
root (hd0,4) works
a subsequent "kernel" command causes the machine to immediately reboot

Booting into the rescue system with the DVD and then running grub, then
root (hd0,4)
setup (hd0)

appears to work, but still just boots to a grub shell.  The above fix was necessary on two other systems upgraded from 10.2 to 10.3, but obviously doesn't work here.  Attempting to boot into a repair install from the CD just gives a yast curses screen saying something like "An error occured during installation".  Attempting to start a normal install and then selecting "repair install" as the installation type reboots the system.  The system was previously running 10.2 without incident for some time.  There is presently no way to boot the system.

I will attach "hwinfo all" output and menu.lst.

Differences between this system and the other two mentioned above:
* newer hardware
* no boot partition
* root is on a logical partition
* root is xfs
* disk is large (but BIOS supports LBA48, or claims to)
* kubuntu is also installed (bootloader never installed, though)
Comment 1 Henryk Hecht 2007-10-08 00:45:15 UTC
Created attachment 176695 [details]
hwinfo all output
Comment 2 Martin Mrazik 2007-10-23 10:06:06 UTC
Could you please try if commenting out the gfxmenu option will help?
Comment 3 Henryk Hecht 2007-11-01 06:54:47 UTC
Didn't help.  Running grub setup (or install), the grub-install script, yast bootloader, reinstalling the grub package, much tinkering with menu.lst, and many other things didn't help.  What finally did work was:
cp /usr/lib/grub/stage2 /boot/grub
Which makes sense when you look at the symptoms (it can read the filesystem, but can't load the menu or the kernel), but it's usually easier in hindsight.  Don't know if you want to close this bug or not-my problem is fixed, but the actual bug is that the stage2 wasn't copied to /boot/grub properly on upgrade-I'm not sure at this point if it was corrupted or if the 10.2 stage2 was just left in place.  Either way, the result was rather difficult to fix.
Comment 4 Martin Mrazik 2007-11-01 09:00:45 UTC
Could you please attach YaST2 logs? It might be a yast-bootloader problem.
Comment 5 Martin Mrazik 2007-11-01 09:01:09 UTC
(In reply to comment #4 from Martin Mrazik)
> Could you please attach YaST2 logs? It might be a yast-bootloader problem.
If in doubt follow:
http://en.opensuse.org/Bugs/YaST

Comment 6 Henryk Hecht 2007-11-02 02:08:08 UTC
Created attachment 181743 [details]
/var/log/YaST2
Comment 8 Jiri Srain 2008-05-21 09:00:46 UTC
Was there any error report on update? Could you, please, attach the logs from update (if still possible)? Perhaps it would explain the error of copying GRUB's stage2...
Comment 9 Henryk Hecht 2008-05-21 20:36:31 UTC
My recollection is that there was no error message (at least not a GUI-visible one) during the installation.  As this was seven months ago, I can't be completely sure about that.  Comment #6 above has a tarball of all of /var/log/YaST2 from the system in question.  If there is something missing from the tarball, I can make another, assuming the logs haven't rotated off or anything.  I can also supply the stage2 that was in place after installation if necessary, though deriving useful information from such a file is bound to be tedious or impossible.
Comment 10 Jiri Srain 2008-05-28 12:18:53 UTC
Looking at the logs, there seems to have been an error, see y2log_bootlaoder:

grub> setup --stage2=/boot/grub/stage2 (hd0) (hd0,4)

Error 21: Selected disk does not exist
grub> quit

The only explanation I found is following:

This error is returned if the device part of a device- or full file name refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.

My guess is that it is related to the fact that you rely on LBA48 (you can never relay on everything that BIOS claims). Also, as the only solution I can suggest to have a separate /boot partition somewhere at the beginning of the disk.

Also note that you use XFS filesystem, which is not recommended for holding the /boot stuff.

I'm afraid that the problem is really in BIOS, and thus we cannot do anything about this issue - unless you find out what to do to make the system boot properly again on your own.
Comment 11 Henryk Hecht 2008-05-28 19:34:41 UTC
The system boots fine, and has since the time of comment #2.  As noted there, all that was required was to copy /usr/lib/grub/stage2 to /boot/grub.  There is no problem with the BIOS, nor with using XFS to store /boot (which seems to worked fine on the versions of suse that shipped with XFS support).  I do not think LBA48, BIOS, or filesystem types have anything directly to do with the wrong stage2 image being present in /boot/grub, as the latter is presumably a matter of cp(1).  The above error is probably caused by an incorrect device.map, which is something I've seen several times with 10.3.  Moreover, the error mentioned in comment #10 cannot be responsible for the situation either, as by the time the setup command is run the correct stage2 should already be in place.

I tried unsuccessfully to find out where the stage2 that was in /boot/grub after installation came from: it clearly isn't the 10.3 release one, nor is it the 10.2 release or update.  It might be a corrupted copy, but it is unclear how to determine if that is the case without disassembly.  There have been no filesystem corruption issues on the machine prior or subsequently, however, and it is clean in the SMART sense.
Comment 12 Jozef Uhliarik 2008-06-12 13:02:36 UTC
If there was missing file stage2 it is GRUB problem. reassing the bug to Torsten

Comment 13 Torsten Duwe 2008-07-01 14:46:31 UTC

*** This bug has been marked as a duplicate of bug 223773 ***