Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GRUB Legacy and UUID

311 views
Skip to first unread message

ArameFarpado

unread,
Jan 11, 2011, 5:11:29 PM1/11/11
to
Hi

I have my fstab adressing my partitions by UUID and it's working great, but
somehow i can't do the same with GRUB; i got "kernel panic - can't mount
root partition" every time i try it.

I've been googling for this and can't get a confirmation on this:
Does GRUB Legacy work with UUID or it must be GRUB 2 ?

or

Since i compile my own kernel, could that be something i have in a kernel
module and not in the kernel itself? (i can't find anythig related to uuid
in the kernel configuration...)

Thanks a lot
ArameFarpado

David W. Hodgins

unread,
Jan 11, 2011, 5:40:16 PM1/11/11
to
On Tue, 11 Jan 2011 17:11:29 -0500, ArameFarpado <a-farpa...@netcabo.pt> wrote:

> Does GRUB Legacy work with UUID or it must be GRUB 2 ?

Depends on the age of it. On my Mandriva system, using
"rpm -q --changelog grub|less" and searching on uuid gets ...

* Mon Jan 12 2009 Pixel <pi...@mandriva.com> 0.97-25mdv2009.1
+ Revision: 328578
- add patches from ubuntu:
o add support for "uuid xxx" instead of "root (hdX,Y)"

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)

ArameFarpado

unread,
Jan 11, 2011, 6:43:05 PM1/11/11
to
Em Terça 11 Janeiro 2011 22:40, David W. Hodgins escreveu:

> On Tue, 11 Jan 2011 17:11:29 -0500, ArameFarpado
> <a-farpa...@netcabo.pt> wrote:
>
>> Does GRUB Legacy work with UUID or it must be GRUB 2 ?
>
> Depends on the age of it. On my Mandriva system, using
> "rpm -q --changelog grub|less" and searching on uuid gets ...
>
> * Mon Jan 12 2009 Pixel <pi...@mandriva.com> 0.97-25mdv2009.1
> + Revision: 328578
> - add patches from ubuntu:
> o add support for "uuid xxx" instead of "root (hdX,Y)"

i'm using Debian Sid, a sistem with dayly updates and i'm also using grub
0.97 and consulting the changelog "looks" like suporte for uuid was added :)

but it isn't working here... maybe i'm missing something on the kernel or
maybe this is all due to a somewhat diferent hardware configuration:
2 IDE disks a 1 Sata, sata is sda and the 2 IDEs are sdb and sdc, the
machine is booting with the MBR of sdb (1st ide) and the system is on sdc1.
This is the result of been changing my hardware all over the years without
ever reinstalling the system.


eventualy, i'll evolve to GRUB 2 and then will be one possibility remove
from the problem.

thanks a lot

>
> Regards, Dave Hodgins
>
Regards
ArameFarpado

Bit Twister

unread,
Jan 11, 2011, 7:07:45 PM1/11/11
to
On Tue, 11 Jan 2011 22:11:29 +0000, ArameFarpado wrote:
> Hi
>
> I have my fstab adressing my partitions by UUID and it's working great, but

Yes, but just you wait until you reformat a partition and see what
happens. :(

I labeled my partitions and converted fstab labels.
$ head -3 /etc/fstab
LABEL=2010_2_64 / ext4 acl,relatime 1 1
LABEL=2010_2 /2010_2 ext4 user,noauto,acl,relatime 1 2
LABEL=accounts /accounts ext4 acl,relatime 1 2

> somehow i can't do the same with GRUB; i got "kernel panic - can't mount
> root partition" every time i try it.
>
> I've been googling for this and can't get a confirmation on this:
> Does GRUB Legacy work with UUID or it must be GRUB 2 ?

Like David I also run Mandriva. If you have something like
root=UUID=afdreve45 it should work. Since I use labels mine looks like

title 2010_2_64
kernel (hd0,10)/boot/vmlinuz BOOT_IMAGE=2010_2_64 root=LABEL=2010_2_64
initrd (hd0,10)/boot/initrd.img

Hopping grub2 will not need (hd0,10) syntax.

David W. Hodgins

unread,
Jan 11, 2011, 7:28:07 PM1/11/11
to
On Tue, 11 Jan 2011 18:43:05 -0500, ArameFarpado <a-farpa...@netcabo.pt> wrote:

> i'm using Debian Sid, a sistem with dayly updates and i'm also using grub
> 0.97 and consulting the changelog "looks" like suporte for uuid was added :)
>
> but it isn't working here... maybe i'm missing something on the kernel or

Also 0.97 here. I'm using labels instead of uuids, my currently
running system was started with

title desktop 2.6.36.2-2
kernel (hd0,13)/boot/vmlinuz-2.6.36.2-desktop-2mnb BOOT_IMAGE=desktop_2.6.36.2-2 root=LABEL=91-root edd=off resume=LABEL=SWAP9QG3LQWV radeon.modeset=1 vmalloc=256M security=none vga=794
initrd (hd0,13)/boot/initrd-2.6.36.2-desktop-2mnb.img

To use a uuid, use UUID=????... instead of LABEL

ArameFarpado

unread,
Jan 11, 2011, 8:33:29 PM1/11/11
to
Em Quarta 12 Janeiro 2011 00:28, David W. Hodgins escreveu:

> On Tue, 11 Jan 2011 18:43:05 -0500, ArameFarpado
> <a-farpa...@netcabo.pt> wrote:
>
>> i'm using Debian Sid, a sistem with dayly updates and i'm also using grub
>> 0.97 and consulting the changelog "looks" like suporte for uuid was added
>> :)
>>
>> but it isn't working here... maybe i'm missing something on the kernel or
>
> Also 0.97 here. I'm using labels instead of uuids, my currently
> running system was started with
>
> title desktop 2.6.36.2-2
> kernel (hd0,13)/boot/vmlinuz-2.6.36.2-desktop-2mnb
> BOOT_IMAGE=desktop_2.6.36.2-2 root=LABEL=91-root edd=off
> resume=LABEL=SWAP9QG3LQWV radeon.modeset=1 vmalloc=256M security=none
> vga=794 initrd (hd0,13)/boot/initrd-2.6.36.2-desktop-2mnb.img
>
> To use a uuid, use UUID=????... instead of LABEL
>
> Regards, Dave Hodgins
>


I believe i found my problem:
acording to this (same problem as mine)
https://bbs.archlinux.org/viewtopic.php?pid=465538

i need to use an initramfs, which i am not...

it does have logic; those uuid links are created by udev and i'm trying to
adress a partition by uuid before udev is loaded... and for LABEL it would
be the same shit. no udev, no alternate names.

best regards
ArameFarpado

ArameFarpado

unread,
Jan 11, 2011, 8:38:50 PM1/11/11
to
Em Quarta 12 Janeiro 2011 00:07, Bit Twister escreveu:

> On Tue, 11 Jan 2011 22:11:29 +0000, ArameFarpado wrote:
>> Hi
>>
>> I have my fstab adressing my partitions by UUID and it's working great,
>> but
>
> Yes, but just you wait until you reformat a partition and see what
> happens. :(

never done that in this machine



> I labeled my partitions and converted fstab labels.
> $ head -3 /etc/fstab
> LABEL=2010_2_64 / ext4 acl,relatime 1 1
> LABEL=2010_2 /2010_2 ext4 user,noauto,acl,relatime 1 2
> LABEL=accounts /accounts ext4 acl,relatime 1 2
>
>> somehow i can't do the same with GRUB; i got "kernel panic - can't mount
>> root partition" every time i try it.
>>
>> I've been googling for this and can't get a confirmation on this:
>> Does GRUB Legacy work with UUID or it must be GRUB 2 ?
>
> Like David I also run Mandriva. If you have something like
> root=UUID=afdreve45 it should work. Since I use labels mine looks like
>
> title 2010_2_64
> kernel (hd0,10)/boot/vmlinuz BOOT_IMAGE=2010_2_64 root=LABEL=2010_2_64
> initrd (hd0,10)/boot/initrd.img

initrd... i don't use one and that's the problem
(see the other reply)

>
> Hopping grub2 will not need (hd0,10) syntax.

it needs, but it's diferent. those numbers will not start by zero any more
but one, so in GRUB 2

(hd0,10) will be (hd1,11)
notice that i've read about this once and it maybe not be exactly like i
sayd.

regards
ArameFarpado

Pascal Hambourg

unread,
Jan 12, 2011, 4:16:16 AM1/12/11
to
Hello,

ArameFarpado a écrit :


>
> I have my fstab adressing my partitions by UUID and it's working great, but
> somehow i can't do the same with GRUB; i got "kernel panic - can't mount
> root partition" every time i try it.
>
> I've been googling for this and can't get a confirmation on this:
> Does GRUB Legacy work with UUID or it must be GRUB 2 ?

This issue has nothing to do with grub. The job of grub is to launch the
kernel, which it does, otherwise you wouldn't get this message. Mounting
the root filesystem is the job of the kernel. However the kernel does
not understand UUIDs nor labels, so you need an initramfs or initrd to
associate the UUIDs and labels with the real device names.

ArameFarpado

unread,
Jan 15, 2011, 3:09:34 PM1/15/11
to

yes, thanks

0 new messages