Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2698 closed task (invalid)

Small update on the grub-page (8.4.)

Reported by: splotz90 Owned by: lfs-book@…
Priority: normal Milestone: 6.7
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

"The search lines are not meaningful for LFS systems as that command needs an initrd image for processing."

This is not true anymore ... It was a bug in GRUB that is already fixed ... (see http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg611969.html)

Change History (6)

comment:1 by bdubbs@…, 15 years ago

Resolution: invalid
Status: newclosed

Is this in the current version of grub-1.98?

In any case, even though grub may process a guid with the search line, the kernel doesn't recognize the guid. That's one thing initrd does.

Reopen the bug if you can actually use the search line without an initrd line.

comment:2 by splotz90, 15 years ago

I've tested it with GRUB 1.98 (without an initrd line) ... And I was able to boot the kernel. I can't say in which version this bug was actually fixed.

This guid is only used by GRUB to find the partition with the kernel (and the initrd, if used). The guid won't be passed to the initrd or the kernel.

PS: I wasn't able to reopen this ticket (no permissions)

comment:3 by bdubbs@…, 15 years ago

Resolution: invalid
Status: closedreopened

OK, reopened.

Please post the menu entry that uses search with LFS. For instance, a Ubuntu entry is:

menuentry "GNU/Linux, Linux 2.6.28-11-server" {
        insmod ext2
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 6b4c0339-5501-4a85-8351-e398e5252be8
        linux   /vmlinuz-2.6.28-11-server root=UUID=6b4c0339-5501-4a85-8351-e398e5252be8 ro
        initrd  /initrd.img-2.6.28-11-server
}

You can successfully boot LFS using a uuid without initrd?

comment:4 by splotz90, 15 years ago

Here is my menu entry:

menuentry "GNU/Linux, Linux 2.6.34" {
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 06910bbb-95ff-43f7-ac74-d44fe9caecf1
	linux	/boot/vmlinuz-2.6.34 root=/dev/sda1 ro quiet splash
}

I had no problems booting the system with this menu entry ...

The UUID in the linux-line is processed by the initrd (if used). If there's no initrd, sda1 (for example) will be added to linux-line.

The UUID in the search-line is only processed by GRUB.

comment:5 by bdubbs@…, 15 years ago

Resolution: invalid
Status: reopenedclosed

The search command does nothing for LFS. The root=/dev/sda1 specifies the kernel's root partition. To use UUID, it needs to be passed to the kernel, but the kernel needs initrd to find the partition using a UUID.

comment:6 by splotz90, 15 years ago

The search command does something for LFS ...

This command set the root-device for GRUB to hd0,1:

set root=(hd0,1)

After that GRUB will look for a partiton with the UUID 06910bbb-95ff-43f7-ac74-d44fe9caecf1:

search --no-floppy --fs-uuid --set 06910bbb-95ff-43f7-ac74-d44fe9caecf1

If there's no partition with this UUID, GRUB will use the device set before (hd0,1). If a partition with this UUID exists, GRUB will boot from this partiton. In the most cases the partition set with the first command will have the UUID in the search command.

This means: GRUB can boot if the device has changed (for example hd0,1 --> hd1,1) and if a new filesystem was created.

Note: See TracTickets for help on using tickets.