You are not logged in.
Pages: 1
I thought that things might be tidier if I used the include functionality of rEFInd rather than having all of my manual stanzas in the main file. At the same time, I tried using the drivers functionality to load the fs driver for ext4 and therefore use the default kernel on /boot rather than the copied over versions on the ESP.
I thought this seemed straightforward enough but on rebooting, the stanzas from my included file are not recognised at all. (However, the ext4 driver stuff definitely works - rEFInd offers me options from /boot. Unfortunately, these aren't bootable as is because it obviously doesn't pick up custom kernel parameters needed to decrypt root etc.)
Here's a diff showing the ways in which my customised refind.conf differs from the standard default:
$ diff -Naur /usr/lib/refind/config/refind.conf /boot/efi/EFI/arch_refind/refind.conf
--- /usr/lib/refind/config/refind.conf 2013-01-22 11:24:49.000000000 +0000
+++ /boot/efi/EFI/arch_refind/refind.conf 2013-01-23 20:36:52.000000000 +0000
@@ -93,6 +93,7 @@
#
#resolution 1024 768
#resolution 3
+resolution 1024 768
# Launch specified OSes in graphics mode. By default, rEFInd switches
# to text mode and displays basic pre-launch information when launching
@@ -129,6 +130,7 @@
# Default is shell,apple_recovery,mok_tool,about,shutdown,reboot
#
#showtools shell, mok_tool, about, reboot, exit
+showtools shell, about, reboot, shutdown, exit
# Directories in which to search for EFI drivers. These drivers can
# provide filesystem support, give access to hard disks on plug-in
@@ -156,6 +158,7 @@
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
#
#scanfor internal,external,optical,manual
+scanfor manual,internal,external,optical,hdbios,biosexternal,cd
# Delay for the specified number of seconds before scanning disks.
# This can help some users who find that some of their disks
@@ -203,6 +206,7 @@
# other volumes.
#
#dont_scan_dirs ESP:/EFI/boot,EFI/Dell
+dont_scan_dirs EFI/boot,EFI/arch
# Files that should NOT be included as EFI boot loaders (on the
# first line of the display). If you're using a boot loader that
@@ -250,6 +254,7 @@
# (usually the OS's name or boot loader's path).
#
#default_selection 1
+default_selection "Arch Linux"
# Include a secondary configuration file within this one. This secondary
# file is loaded as if its options appeared at the point of the "include"
@@ -307,7 +312,7 @@
# specification. Also note that a leading slash is optional in file
# specifications.
menuentry Linux {
- icon EFI/refind/icons/os_linux.icns
+ icon EFI/arch_refind/icons/os_linux.icns
volume KERNELS
loader bzImage-3.3.0-rc7
initrd initrd-3.3.0.img
@@ -344,7 +349,7 @@
# could initialize hardware and then launch an OS, or it could
# do something entirely different.
menuentry "Windows via shell script" {
- icon \EFI\refind\icons\os_win.icns
+ icon \EFI\arch_refind\icons\os_win.icns
loader \EFI\tools\shell.efi
options "fs0:\EFI\tools\launch_windows.nsh"
disabled
@@ -357,8 +362,12 @@
# certainly need to change the "volume" line for this example
# to work.
menuentry "My Mac OS X" {
- icon \EFI\refind\icons\os_mac.icns
+ icon \EFI\arch_refind\icons\os_mac.icns
volume "OS X boot"
loader \System\Library\CoreServices\boot.efi
disabled
}
+
+# cfr
+
+include cfr.conf
And here is my custom config file although I'm pretty sure this is just being ignored:
$ cat /boot/efi/EFI/arch_refind/cfr.conf
# cfr.conf
menuentry "Arch Linux" {
icon EFI/arch_refind/icons/os_arch.icns
volume boot-ext4
loader vmlinuz-linux
initrd initramfs-linux.img
options "root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/XXX:lvm resume=/dev/vgroup-cfr/swap pcie_aspm=force i915.i915_enable_rc6=-1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 add_efi_memmap"
submenuentry "CLI" {
add_options "systemd.unit=multi-user.target"
}
submenuentry "Fallback" {
initrd initramfs-linux-fallback.img
}
submenuentry "Fallback CLI" {
initrd initramfs-linux-fallback.img
add_options "systemd.unit=multi-user.target"
}
submenuentry "Rescue" {
initrd initramfs-linux-fallback.img
options "root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/XXX:lvm systemd.unit=rescue.target"
}
}
menuentry "Arch Linux LTS" {
icon EFI/arch_refind/icons/os_arch.icns
volume boot-ext4
loader vmlinuz-linux-lts
initrd initramfs-linux-lts.img
options "root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/XXX:lvm resume=/dev/vgroup-cfr/swap pcie_aspm=force i915.i915_enable_rc6=-1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 add_efi_memmap"
submenuentry "CLI" {
add_options "systemd.unit=multi-user.target"
}
submenuentry "Fallback" {
initrd initramfs-linux-lts-fallback.img
}
submenuentry "Fallback CLI" {
initrd initramfs-linux-lts-fallback.img
add_options "systemd.unit=multi-user.target"
}
submenuentry "Rescue" {
initrd initramfs-linux-lts-fallback.img
options "root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/XXX:lvm systemd.unit=rescue.target"
}
}
menuentry "Escape" {
icon EFI/arch_refind/icons/os_arch.icns
loader EFI/arch/vmlinuz-arch
initrd EFI/arch/initramfs-arch.img
options "root=/dev/vgroup-cfr/arch ro rootfstype=ext4 cryptdevice=/dev/disk/by-uuid/XXX:lvm resume=/dev/vgroup-cfr/swap pcie_aspm=force i915.i915_enable_rc6=-1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 add_efi_memmap"
}
Since I get no entry for any of these stanzas, I assume it is not being included. What am I missing?
Last edited by cfr (2013-01-31 01:14:24)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I "solved" this by including the stanzas directly in refind.conf. But I would still like to know where I went wrong.
Also, I found that just doing that meant that the os_arch.icns was ignored and it just used a default icon - even though the icon spec comes after the volume spec. What I'm now trying is have a copy of that icon in /boot/arch_refind/icons/os_arch.icns and putting the icon spec (sans EFI/) after the volume spec. But I don't know why this is necessary, even assuming it works, as I thought the volume spec only affected lines following it - not lines preceding it. So it is all quite confusing.
Clearly I don't really understand how this stuff all works - how it "thinks"...
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I "solved" this by including the stanzas directly in refind.conf. But I would still like to know where I went wrong.
You didn't; I did. There's a bug in rEFInd that prevents it from loading manual boot stanzas from included files. I'm working on it now, and it should be fixed in the next release. I've collected a few fixes, so I'll probably make a release in the next day or two just to get the fixes out there....
Offline
Thanks for letting me know - and for rEFInd.
Is the volume spec. in a stanza supposed to affect the whole stanza and not just what follows it? That wasn't such a big deal, obviously, as it didn't stop me booting but I would still like to know if there's a way of using an icon from the default directory in a stanza with a volume declaration which points elsewhere. (Obviously I've no idea if this would be technically difficult so I will be more than happy with "no, it doesn't work like that" as an answer.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I've got a preliminary fix for this problem. The source code is in git, and you can get a binary here:
http://www.rodsbooks.com/refind-bin-0.6.5.5.zip
I haven't yet tested it extensively, but manual boot stanzas should ignore the "volume" specification from outside of those stanzas and instead default to the rEFInd volume. If you include a "volume" specification within the manual boot stanza, it should affect all the options that follow it within that boot stanza, but not subsequent boot stanzas. (Of course, some options aren't volume-specific and so are unaffected by a "volume" token.) Thus, yes, you should be able to use an icon from the rEFInd volume in a stanza that boots from another volume -- just put the "icon" token before the "volume" token. (In fact, in theory it should be possible to use an icon from a third volume; you'd need two "volume" specifications in the boot stanza.)
Offline
Thanks for responding to this so quickly. I'm afraid I've been much slower but was planning to try this out. I noticed, though, that rEFInd just got updated. Does that include the fixes? I got an icon when I rebooted but I'm not sure if this is because I'd copied the icon to /boot or not. If it should be fixed, I can retry having the manual stanzas in an external config file although I've forgotten why this seemed such a good idea at the time! I think I was thinking that it might make updates easier...
I've currently got version 0.6.6-1 which looks later than 0.6.5.5 but I'd like to be sure it should work before experimenting with boot again. (It isn't a huge deal but it means an unclean shutdown to escape from rescue which I'd rather avoid. Unless there's a cleaner way to get out of that.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Yes, 0.6.6 includes all the fixes in the 0.6.5.5 test version.
Offline
This all now works as I expected it to - thanks very much for fixing it so quickly!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Pages: 1