reboot before grub menu appears, lilo is working

A very strange problem: lilo boots, but grub doesn’t, xfs partition, suse 11.0 x86_64.

After upgrading from 10.3 to 11.0 using the update function (all x86_64), the grub menu didn’t appeared at all, the computer beeped and rebooted without showing a single pixel/letter from the grub menu.

The first thing I did was installing the bootloader again (repair mode suse dvd). It showed: succesfully installed boot loader. Nothing had changed, I tried the rescue system.

*find /boot/grub/stage1
(hd0,1) (correct, /dev/sda2 is root partition)

*root (hd0,1)
Filesystem type is xfs, partition type 0x83

*setup (hd0)
Checking if “/boot/grub/stage1” exists… yes
Checking if “/boot/grub/stage2” exists… yes
Checking if “/boot/grub/xfs_stage1_5” exists… yes
Running “embed /boot/grub/xfs_stage1_5 (hd0)”… 18 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd0) (hd0)1+18 p (hd0,1)/boot/grub/stage2
/boot/grub/menu.lst”… succeeded
Done.

*quit

*fdisk /dev/sda print output
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 38913 310464157+ 83 Linux

Doesn’t change anything, the system doesn’t boot.

If I set using yast the bootloader to lilo and rebooted, it first didn’t work: ‘no boot signature in partition’. After the repair mode the computer booted from the lilo entry.

I would like to use grub, as the xen kernels are too big for lilo (or is there a way out?).

With suse 10.3 it worked all fine with grub.
Version now installed (11.0):
grub --version
grub (GNU GRUB 0.97)

I checked with google, grub2 should have fixed alot of problems this legacy version has, but I cannot find a suse package for grub2.

Somehow I cannot find an edit knob for the thread start, so I’m forced to put it in a new post.

I checked again the whole procedure as described above: with grub it’s instantaneously rebooting. Googling again shows that apparently grub not particularly likes XFS. The strange thing is then that it worked before. What options are there more, aside from writing it in the MBR?

What other possibilities are there? Make a partition active isn’t enough, is it?

I downloaded the grub 2 tarball, I do I make a clean install, i.e. how do I make a rpm for suse? (from slackware fakeroot alien etc, but I never did this for suse).

I have no idea the reason for the problem. However, if you want to try a different grub set up than installing to the MBR, in YaST under Boot Loader Installation select Install to Root Partition and under Options check “write generic code to MBR” and “set active flag”. That will remove grub from the MBR and put grub’s stage1 in the sda2 boot sector. At boot the generic code will pass control to the sda2 boot sector which will in turn call sda2/boot/grub/stage2.

I’m at the point of giving up: I splitted 100MB from the swap file, and created an ext3 boot partition.

I thought the problem should be solvable now, as grub doesn’t have any problems booting from ext3.

But the problem stays: no menu, immediately reboots.

Before making an ext3 boot partition I forced an older installation of grub (suse 10.3): it threw me in the grub prompt at boot time.

The same happened for grub2.

With a trick I’m booting now: I choose update in the suse installation, nothing is changed (all up to date etc), and with kexec the installation doesn’t do a hard reboot but a warm reboot: the system is up and running.

But I would still like to get grub up and running to use xen kernels.

With the new ext3 partition I didn’t check wether lilo is working if I choose it in yast2.

Below some output of the relevant files. The disk order is not ok, as I deleted the swap partition to make two new ones.

mingus725: I took your suggestion: but then it showed at boot time: boot from local hard disk, disk error no operating system (bios errors I pressume).

Who can solve this problem? What exact options should I choose in the yast boot loader section to be as compabible as possible with everything?

I’ve:
*boot from master boot record
*set active flag in partition table for boot partition

Output:
fdisk /dev/sda -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007bdac

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14 112423+ 83 Linux
/dev/sda2 263 38913 310464157+ 83 Linux
/dev/sda3 15 262 1992060 82 Linux swap / Solaris

Partition table entries are not in disk order

cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd0) (hd0,0)
quit

cat /boot/grub/menu.lst

Modified by YaST2. Last modification on Fri Aug 29 15:55:07 CEST 2008

default 0
timeout 8
##YaST - activate
gfxmenu (hd0,0)/message

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.0
root (hd0,0)
kernel /vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3320620AS_9QF3JQET-part2 resume=/dev/sda3 splash=silent showopts vga=0x31a
initrd /initrd-2.6.25.11-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.0
root (hd0,0)
kernel /vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3320620AS_9QF3JQET-part2 showopts ide=nodma apm=off acpi=off noresume edd=off x11failsafe vga=0x31a
initrd /initrd-2.6.25.11-0.1-default

###Don’t change this comment - YaST2 identifier: Original name: xen###
title XEN
root (hd0,0)
kernel /xen.gz
module /vmlinuz-2.6.25.11-0.1-xen root=/dev/disk/by-id/scsi-SATA_ST3320620AS_9QF3JQET-part2 resume=/dev/sda3 splash=silent showopts vga=0x31a
module /initrd-2.6.25.11-0.1-xen

cat /etc/fstab (only relevant ones)
/dev/sda1 /boot ext3 defaults 1 1
/dev/sda2 / xfs defaults 1 1
/dev/sda3 swap swap

cat /boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb

GRUB and XFS
XFS leaves no room for stage1 in the partition boot block. Therefore, do not specify an XFS partition as the location of the boot loader. This problem can be solved by creating a separate boot partition that is not formatted with XFS.

This is per SuSE help file.

Thanks, I’ve read that.

With 10.2 and 10.3 grub booted from XFS partitions.

After upgrading to 11.0 not anymore.

I did exactly as you described, I created an ext3 boot partition, but the problems stays.

You may have answered this already but, are you booting from the boot sector or the MBR?

Thanks for asking: MBR.

Maybe your question points towards some solution. Which situation (see output relevant files above) should 100% garanteed work to boot linux from grub, concerning mbr, boot sector, active flags etc etc??

This situation is really weird, what is wrong with grub?

Monday I’ll be able to check on site the suggestions.

Just for gng’s, try booting from the boot sector of of the boot partition instead of the MBR.

I tried the suggestion by mingus:

Install to Root Partition and under Options check “write generic code to MBR” and “set active flag”.

Didn’t work either, complained about missing operating system.

Or do you mean something else with booting from the boot sector of the partition?

What I have had to do in certain config’s is to actually creat a 100MB /boot partition(ext3 or reiserfs). Write the generic MBR if the MBR has been tried and didn’t work. And then tell grub or lilo to boot from the boot sector of the /boot partition.

I created also a 100mb ext3 boot partition. Selected only boot from boot partition (yast2, boot loader), no mbr, no generic code. Didn’t work, rebooted before menu appeared.

Also tried: root (hd0,0) (type ext3) and setup (hd0,0), also only rebooting.

I cannot believe it, its crazy that nothing seems to work!

If you have moved /boot to its own ext3 partition, then install grub to that partition (not the root partition). Also install the generic MBR code, and set the active flag. Your menu.lst should change if it has not already; a “/boot” needs to be inserted before the file names on the kernel and initrd lines. Also double check in a terminal with cfdisk that the active (bootable) flag is set to the /boot partition.

Now there is no grub in the MBR, and no pointer to any partition. The generic code will call the bootstrap in the boot sector of the /boot partition, which in turn will run the grub stage2 loader from that partition which in turn will call menu.lst and the kernel. This puts XFS completely out of the equation.

It’s not crazy. It’s that there are a number of variables and possible setups. But in any particular one, all the necessary pieces must be present and configured accordingly. This may be why it worked prev but not after installing 11.0. The other possibility is what is described in the bug reports (although it’s not a bug); the XFS problem is intermittent. Note, not random. It is a consequence of when several variables in the boot workflow are true.

Give the above a try.

CORRECTION: In my above post, “/boot” will not need to be inserted in menu.lst. That is incorrect. Sorry about that.

mingus725: thanks for your replies.

Please look one page back, what you describe is already the configuration I have. I would like to be sure of that, please read the output of the relevant files at the first page of this topic.

Actually, I also tried root (hd0,0) and both setup (hd0) and setup (hd0,0)

Always the same situation, rebooting before showing a menu.

Device Boot Start End Blocks Id System

/dev/sda3 15 262 1992060 82 Linux swap / Solaris

kernel /vmlinuz-2.6.25.11-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3320620AS_9QF3JQET-part2 resume=/dev/sda3 splash=silent

Anything amiss here?

I had looked. What I’m not sure I saw was this complete combination used at the same time. (I saw doing this with root partition, but not boot partition.)

  • install grub to sda1 boot sector
  • install generic code to mbr sda
  • set active flag on sda1

I assume you have a booting workaround for now. (A boot floppy is best for this as it takes the hard disk out of the equation altogether). I would flush grub from the MBR to be absolutely sure that YaST actually writes the generic code. Before that, create a backup of the MBR including the partition table. You can do this (very, very carefully) with:


dd if=/dev/sda of=mbrbackup bs=512 count=1   ##backs up MBR
 
dd if=/dev/zero of=/dev/sda bs=440 count=1   ##flushes boot code

Then boot. Assuming there isn’t another disk, the system should lock; you have confirmed the boot code is gone. Then boot SuSE and install the generic code to the MBR; make sure with cfdisk that the active flag is set for sda1. Boot. If it fails, you have isolated the problem to the sda1 boot sector or grub’s ability to find stage2 on sda2 or grub’s ability to load the kernel - the error message will help indicate which.

I had looked. What I’m not sure I saw was this complete combination used at the same time. (I saw doing this with root partition, but not boot partition.)

  • install grub to sda1 boot sector
  • install generic code to mbr sda
  • set active flag on sda1

I assume you have a booting workaround for now. (A boot floppy is best for this as it takes the hard disk out of the equation altogether). I would flush grub from the MBR to be absolutely sure that YaST actually writes the generic code. Before that, create a backup of the MBR including the partition table. You can do this (very, very carefully) with:


dd if=/dev/sda of=mbrbackup bs=512 count=1   ##backs up MBR
 
dd if=/dev/zero of=/dev/sda bs=440 count=1   ##flushes boot code

Then boot. Assuming there isn’t another disk, the system should lock; you have confirmed the boot code is gone. Then boot SuSE and install the generic code to the MBR; make sure with cfdisk that the active flag is set for sda1. Boot. If it fails, you have isolated the problem to the sda1 boot sector or grub stage1 being able to find stage2 on sda2 or grub stage2’s ability to load the kernel - the error message will help indicate which.

Sorry about the double-post. Been having line problems.

Hi!

have you any success? I have fixed the same Issue by reinstalling
another grub from my gentoo Partition. The Gentoo-installer says that the stage1 and stage2 files must be from the same Installation, mayby is this the Problem. In other words, this was my Problem.

bye Jan