Skip to contentSkip to conversation

Question about menu.lst

DISCUSSION giggz 4 participants 6 messages May 4, 2008 – May 7, 2008

lore
Share & tools
lore

giggz

author
#0 lore raw

Hi,

Sorry If it isn't the right place to post...I don't find a grub users list...

I have several kernel on my laptop. Most of them are compiled by myself. But to compare the performance I have an official debian kernel (486). The problem is that official debian kernels are compiled with ide (so hd* device) and my personal jkernel with PATA support (so sd* device). So the root= option is not the same.

I would like to define a regle to set root=/dev/hda1 for all the *-486 kernels through the # kopt_*_486=root=/dev/hda1 ro option. But I want to keep the general regle : # kopt=root=/dev/sda1 ro
Is there a way to do that ?

Best regards,
Guillaume

#1 lore raw
Quoted 11 lines · giggz

Hi,

Sorry If it isn't the right place to post...I don't find a grub users list...

I have several kernel on my laptop. Most of them are compiled by myself. But to compare the performance I have an official debian kernel (486). The problem is that official debian kernels are compiled with ide (so hd* device) and my personal jkernel with PATA support (so sd* device). So the root= option is not the same.

Quoted 4 lines

I would like to define a regle to set root=/dev/hda1 for all the *-486 kernels through the # kopt_*_486=root=/dev/hda1 ro option. But I want to keep the general regle : # kopt=root=/dev/sda1 ro
Is there a way to do that ?

Actually, you might want to use UUID or LABEL of the file system instead of device file name.

You can get or set UUID or label with tune2fs like this:

# tune2fs -l /dev/sda1		(get information)
# tune2fs -L root-fs /dev/sda1	(set label)

And then set a kernel root parameter as follows:

root=LABEL=my-root-fs

Hope that helps.

Signature · 1 line
Lubomir Rintel (Was: Kundrak)
author
#2 lore raw
Quoted 20 lines · Lubomir Rintel
Quoted 11 lines · giggz

Hi,

Sorry If it isn't the right place to post...I don't find a grub users list...

I have several kernel on my laptop. Most of them are compiled by myself. But to compare the performance I have an official debian kernel (486). The problem is that official debian kernels are compiled with ide (so hd* device) and my personal jkernel with PATA support (so sd* device). So the root= option is not the same.

Quoted 4 lines

I would like to define a regle to set root=/dev/hda1 for all the *-486 kernels through the # kopt_*_486=root=/dev/hda1 ro option. But I want to keep the general regle : # kopt=root=/dev/sda1 ro
Is there a way to do that ?

Actually, you might want to use UUID or LABEL of the file system instead of device file name.

Quoted 9 lines

You can get or set UUID or label with tune2fs like this:

# tune2fs -l /dev/sda1		(get information)
# tune2fs -L root-fs /dev/sda1	(set label)

And then set a kernel root parameter as follows:

root=LABEL=my-root-fs

Hi,

thx for your quick answer. my /etc/fstab sill use it. But I have read that in order to use uuid in the grub menu.lst I must have an initrd...and in my self-compiled kernels I don't build any initrd...

Cheers

Quoted 2 lines

Hope that helps.

#3 lore raw
In reply to Lubomir Rintel
Quoted 7 lines · Lubomir Rintel

Actually, you might want to use UUID or LABEL of the file system instead of device file name.

You can get or set UUID or label with tune2fs like this:

# tune2fs -l /dev/sda1		(get information)
# tune2fs -L root-fs /dev/sda1	(set label)

Would be cool if we had some way to probe for this in GRUB's "search" command.

This would make a lot of the current device.map headache disappear.

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
#4 lore raw
Quoted 4 lines · Robert Millan
Quoted 3 lines · Lubomir Rintel

Actually, you might want to use UUID or LABEL of the file system instead of device file name.

Quoted 9 lines
Quoted 4 lines

You can get or set UUID or label with tune2fs like this:

# tune2fs -l /dev/sda1		(get information)
# tune2fs -L root-fs /dev/sda1	(set label)

Would be cool if we had some way to probe for this in GRUB's "search" command.

This would make a lot of the current device.map headache disappear.

I think labels are already supported :)

#5 lore raw
Quoted 10 lines · Vesa Jääskeläinen
Quoted 9 lines · Robert Millan
Quoted 7 lines · Lubomir Rintel

Actually, you might want to use UUID or LABEL of the file system instead of device file name.

You can get or set UUID or label with tune2fs like this:

# tune2fs -l /dev/sda1		(get information)
# tune2fs -L root-fs /dev/sda1	(set label)
Quoted 7 lines
Quoted 5 lines

Would be cool if we had some way to probe for this in GRUB's "search" command.

This would make a lot of the current device.map headache disappear.

I think labels are already supported :)

Sorry, I was confusing labels with UUIDs. The problem with labels is that they aren't garanteed to be unique; is that correct?

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)