kernal update creates invalid grub menu.lst

Hi,
I recently changed hard drives. I since the name of the hd changed, I manually edited the menu.lst and to fix the partition names. Also, i am now booting on partition 1 hd(0,1) instead of hd(0,0)…all is good, this is my boot string:

title openSUSE 11.1 - 2.6.27.21-0.1 (default)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.27.21-0.1-default root=/dev/disk/by-id/scsi-SATA_SAMSUNG_SSD_RBXDFF160S904SE904A1708-part2 resume=/dev/disk/by-id/scsi-SATA_SAMSUNG_SSD_RBXDFF160S904SE904A1708-part1 splash=silent showopts vga=0x317
    initrd /boot/initrd-2.6.27.21-0.1-default

Now, there was a kernal update and when it applied, the menu.lst it created was wrong. It created this:

title openSUSE 11.1 - 2.6.27.21-0.1 (default)
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.27.21-0.1-default root=/dev/disk/by-id/scsi-SATA_SA
MSUNG_SSD_RBXDFF160S904SE904A1708-part2 resume=/dev/disk/by-id/ata-TOSHIBA_MK1637GSX_X7SYFCWAS-part2 splash=silent showopts vga=0x317
    initrd /boot/initrd-2.6.27.21-0.1-default

notice the hd(0,0) and although the root is right, the resume is the old hard drive. I edit the file and all is well again, but it makes me think that the name of the old hard drive is somewhere and I need to change it…also, why does it think hd(0,0) is the boot partion? they must be somewhere, can anyone clue me in?

thanks for your help!

what is the output of:

fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa42d04a3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2         262     2096482+  82  Linux swap / Solaris
/dev/sda2             263       15566   122929380   83  Linux

title openSUSE 11.1 - 2.6.27.21-0.1 (default)
root (hd0,1)
kernel /boot/vmlinuz-2.6.27.21-0.1-default root=/dev/disk/by-id/scsi-SATA_SAMSUNG_SSD_RBXDFF160S904SE904A1708-part2 resume=/dev/disk/by-id/scsi-SATA_SAMSUNG_SSD_RBXDFF160S904SE904A1708-part1 splash=silent showopts vga=0x317
initrd /boot/initrd-2.6.27.21-0.1-default

hd0,1
Looks correct as root is sda2
But it needs the bootable flag (*)
You can do this via Yast partitioner

h, thanks for the reply. I am in partitioner now, i do not see a way to flag as bootable…could you tell me where that is?

thanks again!

Umm.
Maybe use a utility disc like fdisk or parted magic

Actually. Maybe just go to bootloader and you can set it there, see shots

http://thumbnails16.imagebam.com/3223/3ae3e532227955.gif](http://www.imagebam.com/image/3ae3e532227955/) http://thumbnails14.imagebam.com/3223/1f88fc32227977.gif](http://www.imagebam.com/image/1f88fc32227977/)

Hi,
So, I am in the boot loader options, but the only disk option is the old disk that is not present any more…hummm

This doesn’t make sense to me, sorry.:\

ok, so I think I fixed part of my problem. I stumbled upon it by accident. I noticed that I had no swap activated. When I looked at my fstab I realized that the entry for my root and swap were still referencing the old hd. I changed both entries and rebooted. I had my swap back.
A couple of days ago, the .25 kernal update was pushed, and the grub menu.lst was rebuilt. Now, the ‘root=’ is built properly…unfortunately, the ‘resume=’ is still wrong. I will have to keep at it, but if anyone knows where the ‘resume=’ is built from, I would appreciate a post.

thanks

Earlier you were quoting:
resume=/dev/disk/by-id/scsi-SATA_SAMSUNG_SSD_RBXDFF160S904SE904A1708-part1 splash=silent showopts vga=0x317

the part /dev/disk…
is how suse identifies the partition.

You said:

I realized that the entry for my root and swap were still referencing the old hd. I changed both entries and rebooted

So have you changed it again? You may find there is menu.lst.old or a ~menu.lst which contains the info prior to the latest kernel update.

Of course this shouldn’t be happening! Something not quite right.

to be clear, after changing my fstab to referenece the new hd (for both swap and root), the menu.lst rebuilds the ‘root=’ properly now. It is still building the ‘resume=’ WRONG. I change it manually, but I would like to know where it pulls that from. it must be in some file somewhere.

I’m not sure. Sorry. Maybe a guru will see this and have intelligent input.:slight_smile:

caf4926 wrote:

>
> I’m not sure. Sorry. Maybe a guru will see this and have intelligent
> input.:slight_smile:
>
>

Try /etc/sysconfig/bootloader

I’ve been looking to effect the recreation of menu.lst myself and this
certainly looks like the place where some of the defaults and pattern
matching is done when menu.lst is being munged during a kernel update.

From what I’ve found so far, the package yast2-bootloader may be the place
where more info can be found (I’ve not tried to google it yet), as
/var/adm/fillup-templates/sysconfig.bootloader comes with yast2-bootloader
and the package has numerous html files associated with it in
/usr/share/doc/packages/yast2-bootloader/autodocs .

P.S. I’m no guru. I’ve only been using SUSE since 6.3. :wink:

FANTASTIC!!!

I think that was the place (for resume at least) my /etc/sysconfig/bootloader had the old hard drive. i made the change and when the next kernel is out, we will see.

thanks very much!!