grub wont bot what I want

Hello,
I have a minor problem, but I would like to understand…
It’s pretty complicated, because I only have access to this computer every two weeks :slight_smile: for now until this evening.

I have on this computer three hard drives: one IDE; two SATA. I can only choose in the bios between boot ide or sata (not between the two satas).

I have many OS On this computer, but the two important are two openSUSE 11.3 installs. one is on sdb6, the other on sdb9 (so, same disk).

I don’t remember why I have this organisation (this is a computer I used most 6 month ago). The older and better fitted for me install is the one in sdb6, the last done is the one is sdb9.

The problem is that I cant boot with the sdb6 install, but only with the sdb9 one. When I boot I see the grub menu from sdb9, in this menu I have an entry for the sdb6 install. When I choose this one, I get the menu for the grub of this version (I keep them different to be able to recognise them :slight_smile: and boots perfectly.

I can edit any of the two menus from they respective YaST, but not change the boot order. I would like to boot directly from the sdb6 grub menu.

I tryed nearly anything from the sdb6 YaST (boot from extended - default -, from mbr, root, even choosing by hand a partition), neither of these tests changed anything on the boot sequence. Not even “grub --install-partition=/dev/sdb6 --config-file=/boot/grub/menu.lst --batch”

any idea what happen? the only thing I see is that the grub from the running distro don’t see the same drive as the booting grub. menu.lst uses :

root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-default

(similar hd0,8 on the other install)

idea?

thanks
jdd

From YaST, I can edit

to boot, the sdb9 menu.lst uses:

root (hd0,5)
configfile /boot/grub/menu.lst

If you’re mixing IDE and SATA drives - on some machines - you might not always be able to do what you want or even what you think you are doing.

From ArchWiki:
*
udev loads kernel modules by utilizing coding parallelism to provide a potential performance advantage versus loading these modules serially. The modules are therefore loaded asynchronously. The inherent disadvantage of this method is that udev does not always load modules in the same order on each boot. If the machine has multiple block devices, this may manifest itself in the form of device nodes changing designations randomly. For example, if the machine has two hard drives, /dev/sda may randomly become /dev/sdb. See below for more info on this. *

This is particularly true while mixing IDE and SATA hard disks.

The BIOS I have seen usually have two settings related to the primary boot devices: in one you choose the device type order: SATA/IDE/CDROM/FLOPPY/USB etc. In the other you choose which device of a given type has priority. If you have two sata drives, it is in this part that you choose which one will have priority, the second one will boot only if the first fail.

Perhaps you need to change this second setting, if you didn’t already.

I’m not entirely sure about this, but I think this is applicable if you choose to identify the drives by device (sda/sdb,etc.). Usually oS set the identification by disk-id (/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 in the case above) which is a unique identification, due to the drive serial number being included in the name.

Now, after moving drives around the device names may change, but the boot partition will not. Perhaps the OP could boot with a liveCD (partedmagic is great for these things) and check the drive names and contents.

Now I’m just guessing (wildly) here: is it possible that the op have two grub menus in different boot partitions and is looking at the wrong one? How can we determine which partition has the actual running boot code?

It’s probably some kind of this event. I tried to rebuild the device.map of the sdb6 (the most valid one) install, but it rebuild with the same map (sda=hd2, sdb=hd0, sdc=hd1).

I fact looks like the first stage of grub is not written where the bios first read :-(. What puzzle me is that the two menus where written with the same 11.3, may be one was by the install dvd, the other (the one I try to change) is surely by the running app (note the two installs are said to be run with brub in the extended partition, what is obviously wrong at least for one of them).

brunomcl wrote:
> jdd;2283074 Wrote:
>> I can only choose in the bios between boot ide or sata (not between the
>> two satas).
>
> The BIOS I have seen usually have two settings related to the primary
> boot devices: in one you choose the device type order:
> SATA/IDE/CDROM/FLOPPY/USB etc. In the other you choose which device of a
> given type has priority. If you have two sata drives, it is in this part
> that you choose which one will have priority, the second one will boot
> only if the first fail.

+1 and on my machine the two settings are on different pages, not together

> Perhaps you need to change this second setting, if you didn’t already.

Absolutely. IMHO using UUIDs (or labels) is even a bit better than using /dev/disk/by-id or /dev/disk/by-uuid as those get generated at boot time by the udev daemon. Anyway nobody wants to use device names anywhere, which for sure don’t always work as expected. When I read “one IDE, two SATA”, I couldn’t resist to say that it is generally a bad idea and definetly doesn’t help to clarify the situation.

Show use as root

fdisk - l

and both menu.lst files

I think on at least one you installed grub in the boot partition and not the MBR then are chaining to that partition.

I don’t find any second menu (HP computer/Compaq dc7100) - I will look again (that said the bios menu gives the color of the cable, I beg it think I will swap the cables :slight_smile:

still the problem is why one install of 11.3 found one disk an an other (seems to) find an other? the two ones are able to boot the other :slight_smile:

no. YaST shows install on extended for the two of them.

The problem is what I get as stage two grub menu. AFAIK this is done by the stage one grub (that don’t do anything else). If I can’t get the good menu iut’s because YaST do not write to the drive that is booted first by the bios. But How can I manage that??

With out seeing what I asked for no way to know

You can press escape at the gfxmenu and the press e (I guess) in the console Grub menu to take a closer look at the entry you are booting.
You can run findgrub to get a big picture of all the Grubs intalled
You can also get rid of the IDE before it drives you crazy (I know you won’t believe that).

I know pretty well the grub prompt, but there is no more problem when I get there. I can’t get rid of the ide drive, it holds windows versions I need :-(.

I have yet to try findgrub, may be it gives me what I search

I thought you knew that script already: Looking for Grub and Windows bootloader in all partitions.

Is that the script written by a fellow forum moderator? Do you have a link to the final version, the one I tried died without any message (and the thread is pages long…).

About menu.lst, I already published the relevant entries, same for fdisk, but I can give more, if you think usefull to fill the forum

fdisk -l

Disque /dev/sdb: 500.1 Go, 500107862016 octets
255 têtes, 63 secteurs/piste, 60801 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0xb283ec8b

Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 1 6528 52436128+ c W95 FAT32 (LBA)
/dev/sdb2 * 6529 60801 435947872+ f W95 Etendue (LBA)
/dev/sdb5 6529 6790 2104483+ 82 Linux swap / Solaris
/dev/sdb6 6791 9401 20972826 83 Linux
/dev/sdb7 9402 15929 52436128+ 83 Linux
/dev/sdb8 15930 55093 314576797 83 Linux
/dev/sdb9 55093 57703 20972826 83 Linux
/dev/sdb10 57704 60799 24868588+ 83 Linux

Disque /dev/sdc: 80.0 Go, 80026361856 octets
255 têtes, 63 secteurs/piste, 9729 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0xe39ae39a

Périphérique Amorce Début Fin Blocs Id Système
/dev/sdc1 * 1 9728 78140128+ 7 HPFS/NTFS

Disque /dev/sda: 123.5 Go, 123522416640 octets
255 têtes, 63 secteurs/piste, 15017 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identifiant de disque : 0x000a7104

Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 2422 19454683+ 7 HPFS/NTFS
/dev/sda2 2423 4972 20482875 5 Etendue
/dev/sda3 4973 15017 80686431 7 HPFS/NTFS
/dev/sda5 2423 2684 2104483+ 82 Linux swap / Solaris
/dev/sda6 2685 3651 7767396 83 Linux
/dev/sda7 3652 4972 10610901 83 Linux

menu.lst from the sdb6 (good) install

Modified by YaST2. Last modification on jeu. janv. 27 16:52:08 CET 2011

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

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

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

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3 (usuelle)
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-default

###Don’t change this comment - YaST2 identifier: Original name: openSUSE 11.3 (/dev/sda6)###
title openSUSE 11.3 (procyon linux /dev/sda6)
root (hd2,5)
configfile /boot/grub/menu.lst

###Don’t change this comment - YaST2 identifier: Original name: openSUSE 11.3 - 2.6.34-12 (/dev/sdb9)###
title openSUSE 11.3 - 2.6.34-12 (/dev/sdb9)
root (hd0,8)
configfile /boot/grub/menu.lst

###Don’t change this comment - YaST2 identifier: Original name: windows 1###
title windows 1 (XP usuel)
map (hd2) (hd0)
map (hd0) (hd2)
rootnoverify (hd2,0)
makeactive
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
map (hd2) (hd0)
map (hd0) (hd2)
rootnoverify (hd2,2)
makeactive
chainloader +1

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

###Don’t change this comment - YaST2 identifier: Original name: windows 4###
title windows 4
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
makeactive
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Disquette
rootnoverify (fd0)
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.3
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-default

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.5-desktop
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.5-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.5-desktop

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.7-default
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-default

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.7-pae
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-pae root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-pae

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.5-default
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.5-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.5-default

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.5-pae
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.5-pae root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.5-pae

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Kernel-2.6.34.7-0.7-desktop
root (hd0,5)
kernel /boot/vmlinuz-2.6.34.7-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part6 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-2.6.34.7-0.7-desktop

and the one from sdb9

Modified by YaST2. Last modification on jeu. janv. 27 14:44:04 CET 2011

THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader

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

default 2
timeout 3200
gfxmenu (hd0,8)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.3 - 2.6.34-12
root (hd0,8)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part9 resume=/dev/disk/by-id/ata-IC35L120AVV207-0_VNVD06G4D2PX4L-part5 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-2.6.34-12-default

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 11.3 - 2.6.34-12
root (hd0,8)
kernel /boot/vmlinuz-2.6.34-12-default root=/dev/disk/by-id/ata-WDC_WD5000BEVT-00ZAT0_WD-WXNY08N61636-part9 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-2.6.34-12-default

#title openSUSE 11.3 (/dev/sda6)

root (hd2,5)

configfile /boot/grub/menu.lst

###Don’t change this comment - YaST2 identifier: Original name: openSUSE 11.3 - 2.6.34.7-0.5 (ancienne, /dev/sdb6)###
title openSUSE 11.3 - 2.6.34.7-0.5 (ancienne) (/dev/sdb6)
root (hd0,5)
configfile /boot/grub/menu.lst

###Don’t change this comment - YaST2 identifier: Original name: windows 2###
title XP
map (hd2) (hd0)
map (hd0) (hd2)
rootnoverify (hd2,2)
makeactive
chainloader +1

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

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Disquette
rootnoverify (fd0)
chainloader +1

Thanks, but I was part of this thread at the moment and the script don’t work on my computer (it simply displays it’s name and ends: ./findgrub

Find Grub Version 2.2b - Written for openSUSE Forums
).

and my shell knowledge is not enough to be able to understand the script :frowning: