Strange grub problem

Hi Folks,

just did a fresh install of openSUSE 11.4, everything seems to work like a charme with ONE exception:

The root partition is not found during booting by grub.

I checked the device map , fstab and menu.lst, compared the contents with /dev/disk/by-id, everything just fine.

The relevant part of my kernel line in menu.lst reads like that:

root=/dev/disk/by-id/ata-Hitachi_BLABLABLA

Upon booting, the following error is displayed:

Waiting for device root=/dev/disk/b**x**-id/ata-Hitachi_BLABLABLA to appear..............

Note the x in the bx-id String!!!
There is no x in menu.lst it reads by-id there!

If I exit graphical grub-menu and edit the according kernel line in textmode, it still says by-id (but would again give bx-id in the error-message)

To test I deleted the y of by-id on the grub-shell and reinserted it.
Result:

Waiting for device root=/dev/disk/by**,**id/ata-Hitachi_BLABLABLA to appear..............

Now there is a colon instead of the dash.

I’m puzzeled, what else could I try?

Any help appreciated,

xyzolog

Look if the symlinks are there:

find /dev/disk/{by-id,by-uuid}

Try to replace

root=/dev/disk/by-id/ata-Hitachi_BLABLABLA

with

root=/dev/disk/by-uuid/12345678-1234-xxxxxxxx

You can get the UUID of your partition with the command blkid or with

cat /dev/.blkid.tab

or by using the halinfo script with the option -uV (which displays both disk ids and disk uuids).
Displaying partitions infos from hal daemon*

  • -uV actually queries udev, not hal (which might not be installed).

bx-id is probably a typo in the error message.

If the disk by-id is the correct name it does need the partition # after it. example below:

root=/dev/disk/by-id/ata-ST3250824A_5ND48PMX**-part2**

, be sure that /ect/ftab is also correct.

Hi again,

Thanks both of you for your input!

The problem is not the ID itself, it is correct and also the corresponding symlinks are present, the problem is within the string PREPENDING the ID on the kernel command-line.

Even for UUID, I see the same error:
“/dev/disk/by-uuid” is written in menu.lst but “/dev/disk/bx-uuid” is passed to the kernel.
Again the y in by gets replaced with an x.

BTW: I’m using grub-0.97-174.1.x86_64

Sound’s crazy indeed. A locale issue maybe? What locale are you using?

locale

What about this syntax:
instead of

root=/dev/disk/by-uuid/xxxxxx

try:

root=UUID=xxxxx

xxxxx beeing the uuid of your root partition.
The later is the notation used by default on Fedora, Ubuntu and other distros.

Do you also have a vga kernel option, like vga=0x31a ? If not, could you add one for testing purpose … or even replace 0x31a with 0y31a and see if it boots in vesa mode? :wink:

Hi please_try_again,

that’s my locale:

# locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

The root=uuid=xxxxxx is expanded to “/dev/root” which can not be found.
So this seems not to work.
Just tested grub form Factory and from openSUSE 11.2, same result, although I have several other machines running 11.2 with same syntax without problems.

But his can not be hardware can it?
Or might the kernel be the culrpit, not grub?

BTW: root=/dev/sda2 does also work without problems but I want to avoid this kind of notation for obvious reasons (usb-discs, …)

somehow lost,

xyzolog :wink:

That’s a cool idea…

replaced vga=0x346 with 0y346
and YES it’s booting in VESA.

This should be root=UUID=xxxxxx.

OK. The syntax is working then, just not on that computer.

I don’t know. Are the /dev/disk/by-id and /dev/disk/by-uuid wrong? That’s possible. Are the UUIDs missing in superblocks? Possible too. At this point, I guess you should really run halinfo -uV to show us how udev is dealing with your partitions.

Also take a look at the post I made here: How to fix the hard drive to /dev/sdax ?

Yes, I agree.

But I cannot explain that x/y problem.

What ?! That might just mit KMS and not the framebuffer. You should also add nomodeset to make sure.

please try again wrote:
> Sound’s crazy indeed. A locale issue maybe? What locale are you using?

I’m surprised nobody has suggested reinstalling grub from the DVD or net?

Sounds like you just did.

Still expanded to /dev/root
I used

root=UUID=72cd5ecf-d737-4077-abed-e8e944e5a065

my root partition is /dev/sda2 (at the moment)

ls -l /dev/disk/by-uuid/
....... 72cd5ecf-d737-4077-abed-e8e944e5a065 -> ../../sda2
ls -l /dev/disk/by-id/
.....  ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part2 -> ../../sda2

I guess you should really run halinfo -uV to show us how udev is dealing with your partitions.

That seems not to be available in opensuse 11.4 (at least not by default)
HAL is not even running here in favour of UDEV if I got the release notes right.

But I cannot explain that x/y problem.

Me neither :frowning:

Thanks for your input, I overlooked your reply, sorry.

For testing, I installed grub form Factory and from openSUSE 11.2 and finally back to the original (CD-) version.
Does not make any difference…

This is a script I wrote. It’s available here: Displaying partitions infos from hal daemon

That’s right. hal is not installed by default. But halinfo -uV queries udev while halinfo -hV queries hal.

But try to reinstall grub as djh-novell suggested and see if it makes a difference.

As I had no better idea so far I started playing around to see if I can guess the correct character.
This is what I did so far:

by-id is replaced to bx-id
bx-id remains bx-id
bk-id → bh-id
bh-id remains bh-id
yy-yy → yx-yy

I’m giving up for today…

Aah, I see.
Here is the output:

# halinfo -uV
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| dev  mount   fs       label          uuid                                     diskID                                                      start          size |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
| sda1         swap                    23af5ced-721e-4daf-9f0a-aa1b7e0facfa     ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part1             2048      16386 MB |
| sda2    *    ext4                    72cd5ecf-d737-4077-abed-e8e944e5a065     ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part2         33560576      91911 MB |
| sda3    *    ext4                    da7e3780-7963-430e-a52c-76bc40980a31     ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part3        221794304      61443 MB |
| sda4    *    ext4                    d825bbf3-5062-44f2-9124-dd2b1627dc05     ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part4        347629568     307199 MB |
| sdb1    *    ext4                    cd2f6afd-3df8-4192-bf54-8fd7827d9a9e     ata-Hitachi_HDT721064SLA360_STFD05MG1S7W2K-part1             2048     610479 MB |
| sdc1         ext4                    c3279022-212b-4044-b7bb-261756cf821e     ata-WDC_WD10EADS-65M2B0_WD-WCAV53921067-part1                2048     953868 MB |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|

But try to reinstall grub as djh-novell suggested and see if it makes a difference.

unfortunately it does not. Just reinstalled and restarted configuration from scratch.

That is my current menu.lst:


# Modified by YaST2. Last modification on Tue Mar 15 15:43:40 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
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 11.4
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.37.1-1.2-desktop root=/dev/disk/by-id/ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part2    resume=/dev/disk/by-id/ata-Hitachi_HDT725050VLA360_VFK401R42E1JKK-part1 splash=silent quiet showopts vga=0x346
    initrd /boot/initrd-2.6.37.1-1.2-desktop


At boot, press esc to leave the splash screen, select the entry in the boot menu and press ‘e’ (I guess) to edit. How does the entry look like regarding x/y ?

While editing the entry in grub, it looks perfectly normal as specified in menu.lst.
x/y is still correct at this stage.
As soon as I press “b” to boot, the resume partition is tried (also correct regarding x/y) and the the root partition is not found, x/y are exchanged.
After the timeout (waiting for /dev/disk/bx-id/xxxxx) Iam asked
Do you want me to fallback to /dev/disk/by-id/xxxxx ?
Here x/y is correct and I can answer YES and the boot resumes just normal.

???

xyzolog wrote:
> While editing the entry in grub, it looks perfectly normal as specified
> in menu.lst.
> x/y is still correct at this stage.
> As soon as I press “b” to boot, the resume partition is tried (also
> correct regarding x/y) and the the root partition is not found, x/y are
> exchanged.
> After the timeout (waiting for /dev/disk/bx-id/xxxxx) Iam asked
> Do you want me to fallback to /dev/disk/by-id/xxxxx ?
> Here x/y is corect and I can answer YES and the boot resumes just
> normal.
>
> ???

That is weird. :frowning:

OK, have you tried running memtest?

Or booting from the CD and then selecting boot from hard disk on its menu?

I’m thinking hardware, stuck bits maybe, since I can’t think of anything
else.