Yast2 overwrites /boot/grub/menu.lst

p, li { white-space: pre-wrap; } I am dual booting Vista and opensuse - Vista is on one SATA hard disk (sdb) and opensuse is on another SATA disk (sdc)

Grub is installed to the MBR (sdb).

I had to change the line in /boot/grub/menu.lst

from:

###Don’t change this comment - YaST2 identifier: Original name: windows 2###
title Windows Vista Ultimate
rootnoverify (hd1,1)
chainloader (hd0,0)+1

to:

###Don’t change this comment - YaST2 identifier: Original name: windows 2###
title Windows Vista Ultimate
rootnoverify (hd0,0)
chainloader (hd0,0)+1

to make grub boot to Vista properly. All works ok,.

The problem is that every time I open the bootloader settings from Yast2 it overwrites the menu.lst file with the former entry. I have to modify the file using nano to fix it again. Even if I try to modify the menu.lst from Yast2, it still overwrites it.

Anyone know what might be the issue? Is it a bug in Yast2 or is it just me?

every time I open the bootloader settings from Yast2 it overwrites the menu.lst

Not possible. Just by opening the bootloader section it will make no changes unless you make some and the apply them.

So you installed grub to sdb (the Vista drive)

What about sda?
And what boot priority are the drives in - in BIOS?
sdb should be first

If you post the results of

fdisk -l

and your /etc/fstab

we may be able to help further

You are correct, I have to apply for something to change, but the thing is, that if I open the bootloader in Yast2, and don’t change anything, then my menu.lst still gets the rootnoverify entry overwritten.

I am booting to sdb first in the BIOS - as I say, everything works fine if I modify the menu.lst file myself, but if I make any changes in Yast2 (for eg. changing the order of the menu) then the rootnoverify line gets changed for me…

/dev/sda is an NTFS Data drive
/dev/sdb is my Vista drive that I would like to boot to
/dev/sdc is the drive that I have opensuse 11.0 installed on

BIOS boot order is

CD
Floppy
sdb
sda
sdc

# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8832b2f8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60802   488384512    7  HPFS/NTFS

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       38914   312568832    7  HPFS/NTFS

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00024bb9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         262     2104483+  82  Linux swap / Solaris
/dev/sdc2             263       30401   242091517+  83  Linux
$ cat /etc/fstab

/dev/disk/by-id/scsi-SATA_SAMSUNG_SP2504CS09QJ1TP256968-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_SP2504CS09QJ1TP256968-part2 /                    ext3       acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

I am confused by this

You are correct, I have to apply for something to change,
and then

if I open the bootloader in Yast2, and **don’t change **anything, then my menu.lst still gets the rootnoverify entry overwritten.

I cannot reconcile the above.

Anyway:

Nothing will be written to menu.lst unless you are making some changes in yast bootloader and apply them. Simply entering the bootloader section will not write anything, you actually have to be making some changes.

Let’s assume you are adjusting something there:

You are suggesting that it changes the windows boot info even though you might be doing something like just chaging the boot order in the menu.

Obviously this shouldn’t happen. I can’t just think why it is. I’ll check around and report back.

On another note:
Why have you no /home partition in your suse drive?

Hi
If the OP presses any button rather than Abort it may re-write?

Oh and I don’t have a home partition either :wink: I don’t update, just
make backups of my home directory then do a fresh install.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.1-default
up 0:34, 2 users, load average: 0.14, 0.26, 0.32
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

Hi Malcolmlewis,

Yes! - you understand what I am saying :slight_smile: Seems like a bug to me, but was wondering if its a setting somwhere… (hd1,1) is where my opensuse root partition lives - this is what the YAST2 Boot Loader GUI keeps changing my rootnoverify line to in my grub entry for windows… strange.

And regarding /home partition, I do exactly the same thing as you do… has been working for me for many years, aint changin now :slight_smile:

Hi
I’m no grub expert (I manually change mine with vi) but I wonder if it
may be the device map?

I imagine vista (grub?) is only checking that the drive has an active
partition, what happens if you enable the boot flag on the openSUSE
partition as well with fdisk?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.1-default
up 2:04, 1 user, load average: 0.41, 0.18, 0.19
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

I have never seen YaST actually update anything without Finish being clicked by the user. In any event, you probably have a misalignment in /boot/grub/device.map - post that file back here.

If appears that you have grub installed to the sdb MBR. Is that what you actually want? Usually it would be installed to the sdc MBR, sdc made the boot device, and grub chainloads from there to the sdb Vista boot sector.

Usually it would be installed to the sdc MBR, sdc made the boot device, and grub chainloads from there to the sdb Vista boot sector.

Exactly my thought

Hi mingus725,

Just to clarify, nothing changes if I dont click Finish in the Yast2 Boot Loader GUI.

The problem is that if I open the Yast2 Boot Loader GUI, and change something else ( eg the menu order, device mapping or anything) that the rootnoverify line in menu.lst is changed back to (hd1,1) for me.

Even if I just open Yast2 Boot Loader GUI, and change nothing, and click Finish, this line is changed anyway. I know this is not something that one would ordinarily do, but was just reporting it for completeness.

Regarding location of MBR - Yes I agree,it would have been better to have the MBR installed in /dev/sdc. I had Vista installed first on sdb, and when I ran the opensuse installation, I was not able to choose which disk’s MBR to install GRUB to. The checkbox for Install to MBR just had /dev/sdb in brackets and no choices.

Is there a way to tell the installer exactly which disk’s MBR to install GRUB to? It was possible in 10.x but doesnt seem to be available in 11.0.

So what you’re seeing with YaST Boot Loader is that certain basic data is updated any time you go through the process, if you Finish. By the way, you can change what the module is going to do by modifying the config files; click on Other (bottom right) and then click on Edit Configuration Files.

To get the rootnoverify line working as desired, you need to correct device.map so that it aligns with the bios boot sequence, and then reinstall grub. And yes, it appears that in 11.0 grub installation to the MBR goes to whichever drive was booted from and cannot be manually redirected (I don’t like the change, either). I suggest you change device.map to have (hd0) align to sdc and (hd1) to sdb, and then as root from the command line, run the grub shell and do this:

setup (hd0) (hd0,1)
quit

Now grub’s stage1 should be in the MBR of sdc with a pointer to grub’s stage2 in sdc2. Reboot, change the bios to boot from sdc. Back in openSUSE, as root edit the Vista stanza in menu.lst to this:


rootnoverify (hd1,0)
chainloader (hd1,0)+1

That should get everything right and you should not have the issue with YaST any more, either.