GRUB chainloading removed Boot-flag

I had my BIOS complaing that there were no OS. (worked since releaseday of 11.2).

partition setup:

sda1 : primary : swap
sda2 : primary : ext3 : Kubuntu
sda3 : primary : ext3 : opensuse (flagged as bootable)
sda5 : logical
sda6 : logical

opensuses GRUB is primary and Kubuntus is chainloaded.

The problem occurred after I tried to boot kubuntu for the first time since I installed opensuse. Kubuntu didn’t boot. so I probably set up chainloading wrong. No big deal, this I can fix.

The big problem was that after trying to boot Kubuntu no OS was marked as “Boot” in MBR. This is VERY strange. somehow the boot-flag is removed!

After setting the boot-flag (with a live-CD) everything works again. I can reproduce this.

I’ve tried to find answers but could’nt find any.

Is GRUB supposed to remove the boot-flag when chainloading? have I found a bug? Am I a moron? :wink:

The openSUSE installer is not supposed to remove the boot flag. It can move the boot flag and often does if there are extended logical partitions on the drive.

This is the first occasion I’ve heard of the installer removing the boot flag and I’d be inclined to think of it as a mystery in this case. I don’t think you should report it as a bug, but keep your ears open in case you hear of another event like that, or a few, maybe then it could be investigated.

Anyway, welcome to the forums and have a good time with openSUSE.

Hi! thanks for your answer.

It is not the installer. The system have been stable, and is stable since the releaseday of 11.2. This is a problem with (I think) with the chainloader in Opensuse.

The boot-flag is removed every time I try to boot the second OS (kubuntu, installed before 11.2). The chainloading is not working, it’s not “chaining”! :wink: I might have set up the chainloader wrong, but is it really supposed to remove the boot-flag?

I do not care about chainloading, I can fix the dualboot. But it’s not ok that GRUB (or whatever it is) leaves me with an unbootable computer.

Anyway, Opensuse is very, very good. love it! lol!

Try re-installing SUSE grub to your MBR make sure the flag is on SUSE root. Which is (hd0,2) isn’t it. So change as necessary below.

If you have a Linux Live CD, boot from it and log in. Then open a console window and enter su and you will be at the command prompt with root powers and ready to proceed. If on the other hand you have the openSUSE install DVD, boot from it and on the first menu of options select the Rescue System option. That will start an elementary Linux Live operating system and bring you to the login prompt. Enter the username root and you will be at the command prompt with root powers and ready to proceed. Whichever way you started (the openSUSE install DVD or a Linux Live CD) when you are at the root command prompt, first you find the partition containing openSUSE’s bootloader. Then you reinstall Grub with a pointer to that partition. First find the openSUSE installation:

You enter this ---------------- grub
Computer returns like this ---- grub>
You enter this ---------------- find /boot/grub/menu.lst
Computer returns like this ---- (hd0,5)
Here, (hd0,5) is Grub’s pointer to my openSUSE installation. Your pointer will be different from my example (hd0,5). Substitute your values for my example (hd0,5). Now that you have the pointer, proceed like this:
You enter this ---------------- root (hd0,5)
Computer returns like this ---- Filesystem type is ext2fs, partition type 0x83
You enter this ---------------- setup (hd0)
You see several lines like this — Checking if /boot/grub/stage1 exists … yes Computer finally returns this-- Succeeded…Done
You enter this ---------------- quit
You enter this ---------------- reboot

Ok thanks! I will probably try this, though opensuse is booting fine. I just set the bootflag with a live-cd and cfdisk.after this Suse is booting again. when I try to boot Kunbuntu and it whipes the boot-flag again. (it is not a kubuntu thing, because it is not even getting to the kubuntu boot-menu.)

I can set up menu.lst for multibooting (without chainloading) manually, the problem is not to make multibooting work, it is understanding why it whipes my boot-flag!

I don’t see anything wrong in my menu.lst below.

Modified by YaST2. Last modification on Sun Nov 15 16:20:49 CET 2009

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

Configure custom boot parameters for updated kernels in /etc/sysconfig/bootloader

default 1
timeout 5
##YaST - generic_mbr
gfxmenu (hd0,2)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: other###
title kubuntu
rootnoverify (hd0,1)
makeactive
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Desktop – openSUSE 11.2 - 2.6.31.5-0.1
root (hd0,2)
kernel /boot/vmlinuz-2.6.31.5-0.1-desktop root=/dev/disk/by-id/ata-WDC_WD2500BEVS-08VAT2_WD-WXE509U36313-part3 resume=/dev/disk/by-id/ata-WDC_WD2500BEVS-08VAT2_WD-WXE509U36313-part1 splash=silent quiet showopts vga=0x367
initrd /boot/initrd-2.6.31.5-0.1-desktop

@swerdna
I did’nt see your welcome! Thanks! Though it is pretty strange. I got my account 2006, but I think that was for the Novell Enterprise editon (with XGL!! :slight_smile: anyway, same login!
Cheers!

@caf4926
Ok, that made it stop removing the boot-flag! Thanks! :slight_smile:
Must have been something strange with my setup.

Chainloading does’nt work. But I’ll go old school and set the thing up manually. Might the problem be that Kubuntu is using GRUB2?

Anyway,thanks again!

No worries man.
Forget the chainloading.

Have a look at @swerdna’s guide here. BUT! Remember ubuntu 9.10 uses grub 2 and it’s files are located differently and named differently:
HowTo Multiboot Ubuntu from openSUSE using the GRUB bootloader

This example he gives:

#Don’t change this comment - YaST2 identifier: Original name: none#
title Ubuntu 9.04 booting via symlinks
root (hd0,8)
kernel /vmlinuz root=/dev/sda9 ro quiet splash
initrd /initrd.img

Try that, change the details to match your system.

Two quick comments:

  1. I think this line is the problem that removes the flag: “makeactive”
  2. the symlinks method should work with grub2 in Ububtu because the symlinks are still there

I can chainload Grub from Grub2 and vice versa. I never use ‘makeactive’ to chainload another grub.
Try :

title Ubuntu Boot menu
root (hd0,1)
chainloader +1

It should chainload an Ubuntu’s Grub2 installed in the second primary partition.