Grub drive number disagreements

OK, so mildly complicated, and doing my head in :stuck_out_tongue:
The situation looks like this-
My server runs off an A8N-SLI motherboard, and has 8 disks at present. (4x SATA- Nvidia controller, 3x SATA- Integrated SIL3114 controller, 1x IDE- Nvidia controller)
I simply can’t get Grub to agree on the drive numbering. From the root grub prompt (Before the kernel is loaded), my OpenSUSE installation resides on hd0,1 (This is the IDE drive, and where Grub is installed to the MBR)
As soon as I load the kernel, Grub then sees it on hd6,1 and this is causing problems every time a kernel update gets pushed, as this then uses the ‘incorrect’ path.

I tried editing the device.map file to reverse hd0 and hd6, but when attempting to update Grub it then complains that partition hd0,1 doesn’t exist.

Anyone got a fix please? It’s just irritated me too far this time!

avoid mixing IDE and SATA controllers. Avoid using SDX notation reference by-ID or PATH or UUID. Mixing IDE and SATA can be totally inconsistent ie the drive order comes out one way on one boot and another on the next.

You need to set the order here
https://dl.dropbox.com/u/10573557/Bootloader%20HD%20Order/bootloader-main.png

https://dl.dropbox.com/u/10573557/Bootloader%20HD%20Order/bootloader-details2.png

gogalthorp wrote:
> avoid mixing IDE and SATA controllers.

Well that’s good advice when choosing hardware. But if you already have
hardware that has both, then it should work, and it generally does.

> Avoid using SDX notation
> reference by-ID or PATH or UUID. Mixing IDE and SATA can be totally
> inconsistent ie the drive order comes out one way on one boot and
> another on the next.

Indeed so, but none of those issues are relevant to the grub symptoms
that the OP describes.

I’m not a grub expert but leezer3, please post your menu.lst and
device.map. Please also post what you see on screen when booting (use a
photo if necessary).

On Wed, 27 Jun 2012 09:53:45 GMT, Dave Howorth
<djh-novell@no-mx.forums.opensuse.org> wrote:

>gogalthorp wrote:
>> avoid mixing IDE and SATA controllers.
>
>Well that’s good advice when choosing hardware. But if you already have
>hardware that has both, then it should work, and it generally does.

Not all that good. Even having USB drives can hose the system due to the
stupidities of GRUB. The BIOS interactions are inconsistent as well. If
i could deal with the goofiness of GRUB 2 i would switch. Maybe OP and i
should try a current version of LILO.
>
>> Avoid using SDX notation
>> reference by-ID or PATH or UUID. Mixing IDE and SATA can be totally
>> inconsistent ie the drive order comes out one way on one boot and
>> another on the next.
>
>Indeed so, but none of those issues are relevant to the grub symptoms
>that the OP describes.
>
>I’m not a grub expert but leezer3, please post your menu.lst and
>device.map. Please also post what you see on screen when booting (use a
>photo if necessary).

The error is a bog-standard Error 21: Selected disk does not exist
Quite obviously it doesn’t, there’s only one partition on hd6 :slight_smile:
menu.lst:
(Edited version so it boots)

# Modified by YaST2. Last modification on Mon Jun 25 21:20:58 BST 2012
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader

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

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 12.1 - 3.1.10-1.13
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.10-1.13-desktop root=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part2 resume=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.10-1.13-desktop

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1 - 3.1.10-1.13
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.10-1.13-desktop root=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part2 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-3.1.10-1.13-desktop

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 12.1 - 3.1.10-1.9
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.10-1.9-desktop root=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part2 resume=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.10-1.9-desktop

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 12.1 - 3.1.9-1.4
    root (hd0,1)
    kernel /boot/vmlinuz-3.1.9-1.4-desktop root=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part2 resume=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-3.1.9-1.4-desktop

###Don't change this comment - YaST2 identifier: Original name: linux###
title Desktop -- openSUSE 11.3 - 2.6.38-rc3-0.7 (desktop)
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.38-rc3-0.7-desktop root=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part2 resume=/dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471-part1 splash=silent quiet showopts vga=0x31a
    initrd /boot/initrd-2.6.38-rc3-0.7-desktop

device.map

(hd7)    /dev/disk/by-id/usb-ChipsBnk_SD_MMCReader_110074973765-0:0
(hd2)    /dev/disk/by-id/raid-sil_bgajagbiccdh
(hd1)    /dev/disk/by-id/raid-sil_bgajagbibhdd
(hd0)    /dev/disk/by-id/raid-nvidia_daeciafj
(hd6)    /dev/disk/by-id/ata-WDC_WD1600BB-22GUA0_WD-WCAL91668471
(hd5)    /dev/disk/by-id/ata-SAMSUNG_HD103UJ_S13PJ1KQ411492
(hd3)    /dev/disk/by-id/ata-SAMSUNG_HD501LJ_S0MUJ1KLC02578
(hd4)    /dev/disk/by-id/ata-SAMSUNG_HD154UI_S1Y6J1KS821385

The YasT edit seems to have worked, but I’m confused lol!
From backtracking what it did, it’s made exactly the same change to the device.map as I did, but isn’t throwing the same error when performing the grub update. Considering I used nano from a standard root terminal I’m mildly confused, but still.

You can use findgrub -M to test device.map and check drive numbers. It is not 100% reliable, but nothing is 100% reliable when you have several controllers and so many hard disks. Notice that I had to rewrite this function in the last version (3.8.1) because of the new udev version (which is not in openSUSE yet but certainly will sooner or later). See my last post here: http://forums.opensuse.org/english/other-forums/development/programming-scripting/447138-looking-grub-windows-bootloader-all-partitions-17.html#post2470603.

When you add/remove har disks, you should edit your device.map accordingly and you might have to reinstall the boot loader if the boot disk has changed.

leezer3 wrote:

>
> OK, so mildly complicated, and doing my head in :stuck_out_tongue:
> The situation looks like this-
> My server runs off an A8N-SLI motherboard, and has 8 disks at present.
> (4x SATA- Nvidia controller, 3x SATA- Integrated SIL3114 controller, 1x
> IDE- Nvidia controller)
> I simply can’t get Grub to agree on the drive numbering. From the root
> grub prompt (Before the kernel is loaded), my OpenSUSE installation
> resides on hd0,1 (This is the IDE drive, and where Grub is installed to
> the MBR)
> As soon as I load the kernel, Grub then sees it on hd6,1 and this is
> causing problems every time a kernel update gets pushed, as this then
> uses the ‘incorrect’ path.
>
> I tried editing the device.map file to reverse hd0 and hd6, but when
> attempting to update Grub it then complains that partition hd0,1 doesn’t
> exist.
>
> Anyone got a fix please? It’s just irritated me too far this time!
>
>
Have you looked in your computer bios to see which hard drive it’s booting
from?

OpenSuse