1

How can I properly set a volume setting on a boot option in 'refind.conf' by using an GUID of it's partition?

My current setting is but 'refind' fails telling me that the specified file was not found and I'm sure that this is not true:

timeout 5

#scanfor manual

#scanfor internal


menuentry "openSUSE_bs_ld" {
    icon EFI/Tools/rEFIt/icons/os_linux.png         #os_suse.png

    ostype Linux

    #openSUSE partition GUID

    volume {cd55b59a-ed82-4883-89ad-b02bc505e117}

    loader /boot/vmlinuz-3.16.7-7-desktop

    initrd /boot/initrd-3.16.7-7-desktop

    options "ro root=UUID=cd55b59a-ed82-4883-89ad-b02bc505e117"
}

I also tried:

volume cd55b59a-ed82-4883-89ad-b02bc505e117

but without luck also.

  • What's the actual error message you're seeing? I'm pretty sure the volume definition needs to come before the icon, loader, initrd, etc . . . – ernie Mar 10 '15 at 22:15
3

It should work without the braces ({}). I just double-checked on a test system running Arch Linux, and the following worked for me:

menuentry "Test" {
    icon \EFI\refind_test\icons\os_arch.png
    volume 904404F8-B481-440C-A1E3-11A5A954E601
    loader vmlinuz-linux
    options "initrd=initramfs-linux.img root=/dev/sda2"
}

Most likely you're specifying the wrong GUID value. Currently, rEFInd supports partition GUID values for this entry, not filesystem UUID values. Also, the GUID must be the unique GUID, not the GUID that's used as a type code. You can learn the GUID value with gdisk or sgdisk, as in:

$ sudo sgdisk -i 2 /dev/sda
Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
Partition unique GUID: 904404F8-B481-440C-A1E3-11A5A954E601
First sector: 512040 (at 250.0 MiB)
Last sector: 79656926 (at 38.0 GiB)
Partition size: 79144887 sectors (37.7 GiB)
Attribute flags: 0000000000000000
Partition name: 'Linux filesystem'

Note that the value of the Partition unique GUID line in this output matches the value I used in my example stanza.

Oh, and the volume specification should come after any declarations that rely on files on other volumes. In my case, I put it after the icon line because I loaded an icon from the ESP (the same volume on which rEFInd resides), but before the loader line that identified the kernel. If you wanted to load an icon from the same volume as the boot loader, the volume line should come first.

FWIW, and speaking as rEFInd's developer, it's confusions like this that make me advise people to not use manual boot stanzas unless they have a compelling cause. I don't see anything in your example, sasho648, that can't be handled by rEFInd's auto-detection mechanisms, in conjunction with a /boot/refind_linux.conf file and perhaps any of several ways of setting a specific icon if you don't like what you get by default. In fact, you wouldn't even need /boot/refind_linux.conf to get pretty close to what you've got, since rEFInd can get the root= specification from /etc/fstab if /boot is a directory on the root (/) filesystem. Of course, if you simply presented a stripped-down example and you intend to expand on that in some unusual way, that's another matter. For the most part, though, some people -- particularly those who are familiar with manually configuring LILO or GRUB Legacy -- seem to gravitate toward manual boot stanzas unnecessarily. (This isn't a dig or a knock; I fell into the same mental trap when I first forked rEFInd from rEFIt. Then I realized there was a better way to do it and I wrote the auto-detection code.)

  • Shouldn't I specify hard-disk GUID too somewhere? – Nemo759 Mar 11 '15 at 8:36
  • No, the partition GUID is sufficient. – Rod Smith Mar 11 '15 at 13:15
  • And by the way I'm using static boot options because the automated search takes expensive boot time. – Nemo759 Mar 11 '15 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.