Menu

[BUG] also_scan finds kernals to load but then menu shows repeated kernels instead of one for each

2023-02-25
2023-06-18
  • David Kebler

    David Kebler - 2023-02-25

    I have multiple btrfs root subvolumes I want to show up in the menu. For each I create a linux_refind.conf and then add them to also_scan_dirs. According to the log each subvolume boot is found and a menu entry is made but what the actual graphical menu shows is one repeated and the others missing. If I shuffle the order in the also_scan_dirs then I can get a different one to show (and repeat) with others missing.

    refind.conf

    timeout 6
    log_level 3
    enable_mouse
    showtools
    also_scan_dirs linux:seldon/@root/boot,linux:portable/@root/boot,linux:testing/@root/boot,linux:mint/@giskard/boot
    scan_all_linux_kernels true
    

    pertienent part of the log

    Beginning to scan directory 'seldon\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    05:40:31 - 'seldon\@root\boot\vmlinuz-6.1-x86_64' is a valid loader
    05:40:31 - Adding loader entry for 'seldon\@root\boot\vmlinuz-6.1-x86_64'
    05:40:31 - Loader path is 'seldon\@root\boot\vmlinuz-6.1-x86_64'
    05:40:31 - Finding loader defaults for 'Boot seldon\@root\boot\vmlinuz-6.1-x86_64 from linux '
    05:40:31 - Loading file 'seldon\@root\boot\vmlinuz-6.1-x86_64.png'
    05:40:31 - Loading file 'seldon\@root\boot\vmlinuz-6.1-x86_64.icns'
    05:40:32 - Loading file 'seldon\@root\boot\vmlinuz-6.1-x86_64.jpg'
    05:40:32 - Loading file 'seldon\@root\boot\vmlinuz-6.1-x86_64.jpeg'
    05:40:32 - Loading file 'seldon\@root\boot\vmlinuz-6.1-x86_64.bmp'
    05:40:32 - Searching for an initrd to match 'seldon\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is 'seldon\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Loading file 'icons\os_boot.png'
    05:40:32 - Loading file 'icons\os_boot.icns'
    05:40:32 - Loading file 'icons\os_boot.jpg'
    05:40:32 - Loading file 'icons\os_boot.jpeg'
    05:40:32 - Loading file 'icons\os_boot.bmp'
    05:40:32 - Loading file 'icons\os_linux.png'
    05:40:32 - Creating subscreen 'Boot Options for seldon\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Creating loader entry for 'Boot Options for seldon\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Searching for an initrd to match '\seldon\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is '\seldon\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Have successfully created menu entry for 'seldon\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Done scanning directory 'seldon\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    05:40:32 - Beginning to scan directory 'portable\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    05:40:32 - 'portable\@root\boot\vmlinuz-6.1-x86_64' is a valid loader
    05:40:32 - Adding loader entry for 'portable\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Loader path is 'portable\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Finding loader defaults for 'Boot portable\@root\boot\vmlinuz-6.1-x86_64 from linux '
    05:40:32 - Loading file 'portable\@root\boot\vmlinuz-6.1-x86_64.png'
    05:40:32 - Loading file 'portable\@root\boot\vmlinuz-6.1-x86_64.icns'
    05:40:32 - Loading file 'portable\@root\boot\vmlinuz-6.1-x86_64.jpg'
    05:40:32 - Loading file 'portable\@root\boot\vmlinuz-6.1-x86_64.jpeg'
    05:40:32 - Loading file 'portable\@root\boot\vmlinuz-6.1-x86_64.bmp'
    05:40:32 - Searching for an initrd to match 'portable\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is 'portable\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Loading file 'icons\os_boot.png'
    05:40:32 - Loading file 'icons\os_boot.icns'
    05:40:32 - Loading file 'icons\os_boot.jpg'
    05:40:32 - Loading file 'icons\os_boot.jpeg'
    05:40:32 - Loading file 'icons\os_boot.bmp'
    05:40:32 - Loading file 'icons\os_linux.png'
    05:40:32 - Creating subscreen 'Boot Options for portable\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Creating loader entry for 'Boot Options for portable\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Searching for an initrd to match '\portable\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is '\portable\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Have successfully created menu entry for 'portable\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Done scanning directory 'portable\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    05:40:32 - Beginning to scan directory 'testing\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    05:40:32 - 'testing\@root\boot\vmlinuz-6.1-x86_64' is a valid loader
    05:40:32 - Adding loader entry for 'testing\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Loader path is 'testing\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Finding loader defaults for 'Boot testing\@root\boot\vmlinuz-6.1-x86_64 from linux '
    05:40:32 - Loading file 'testing\@root\boot\vmlinuz-6.1-x86_64.png'
    05:40:32 - Loading file 'testing\@root\boot\vmlinuz-6.1-x86_64.icns'
    05:40:32 - Loading file 'testing\@root\boot\vmlinuz-6.1-x86_64.jpg'
    05:40:32 - Loading file 'testing\@root\boot\vmlinuz-6.1-x86_64.jpeg'
    05:40:32 - Loading file 'testing\@root\boot\vmlinuz-6.1-x86_64.bmp'
    05:40:32 - Searching for an initrd to match 'testing\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is 'testing\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Loading file 'icons\os_boot.png'
    05:40:32 - Loading file 'icons\os_boot.icns'
    05:40:32 - Loading file 'icons\os_boot.jpg'
    05:40:32 - Loading file 'icons\os_boot.jpeg'
    05:40:32 - Loading file 'icons\os_boot.bmp'
    05:40:32 - Loading file 'icons\os_linux.png'
    05:40:32 - Creating subscreen 'Boot Options for testing\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Creating loader entry for 'Boot Options for testing\@root\boot\vmlinuz-6.1-x86_64 on linux'
    05:40:32 - Searching for an initrd to match '\testing\@root\boot\vmlinuz-6.1-x86_64' on 'linux'
    05:40:32 - Kernel version string is '6.1-x86_64'
    05:40:32 - Located initrd is '\testing\@root\boot\initramfs-6.1-x86_64.img'
    05:40:32 - Have successfully created menu entry for 'testing\@root\boot\vmlinuz-6.1-x86_64'
    05:40:32 - Done scanning directory 'testing\@root\boot' for '*.efi,*.EFI,vmlinuz*,bzImage*,kernel*'
    
     
  • David Kebler

    David Kebler - 2023-02-25

    Here is a workaround. Put all three refind_linux.conf stanzas in one and the boot from a single menu entry. Then use the submenu to boot into the alternate roots

    "Boot seldon"  "root=UUID=24f8c5af-6d99-4039-9b3d-3f6710d7f92c rw rootflags=subvol=seldon/@root apparmor=1 security=apparmor udev.log_priority=3"
    "Boot seldon testing"  "root=UUID=24f8c5af-6d99-4039-9b3d-3f6710d7f92c rw rootflags=subvol=testing/@root apparmor=1 security=apparmor udev.log_priority=3"
    "Boot seldon portable"  "root=UUID=24f8c5af-6d99-4039-9b3d-3f6710d7f92c rw rootflags=subvol=portable/@root apparmor=1 security=apparmor udev.log_priority=3"
    

    also_scan_dirs linux:seldon/@root/boot

     
  • David Kebler

    David Kebler - 2023-02-25
     

    Last edit: David Kebler 2023-02-25
  • Roderick W. Smith

    Could you please try the latest pre-release version, available in the git repository (as source code) or here:

    https://www.rodsbooks.com/refind-bin-0.13.3.8.zip

    That should fix the problem.

    BTW, nice subvolume names. ;)

     
  • David Kebler

    David Kebler - 2023-02-28

    Rod, I'm travelling this week but I will eventually try it and report back.

    related:
    Maybe refind could have a limited set of places to check for /boot on btrfs partitions. It wouldn't take long to check them if there weren't too many.
    My suggestion would be

    @/boot, @root/boot,  */@/boot , */@root/boot,    
    

    Basically check one level only down for any /boot . For example

    testing/@root/boot

    This would allow multiple boots without having to add them all to also_scan_dirs albiet following some basic path convention as I stated. If that is too much for some then have option to only look for @/boot

     

    Last edit: David Kebler 2023-02-28
  • David Kebler

    David Kebler - 2023-03-08

    Rod,

    I loaded the latest 0.14.0.2 and the drivers as well.

    I add additional boot scan entries it works with two but if I add three requests refind hangs (never completes scanning)

    so for example

    also_scan_dirs linux:seldon/@root/boot,linux:portable/@root/boot,linux:testing/@root/boot,boot

    hangs but

    also_scan_dirs linux:seldon/@root/boot,linux:testing/@root/boot,boot
    or
    also_scan_dirs linux:seldon/@root/boot,linux:portable/@root/boot,boot

    work as expected.

    it doesn't matter which /boot I put in the line. In other words it's not the kernel causing the problem, just whether there are two or three btrfs scan requests

    I'll post some logs

     
  • David Kebler

    David Kebler - 2023-03-08

    Yup according to logs it loads the second but then the log ends (i.e. refind hangs) when it starts to scan the third one.

    17:54:50 - Done scanning directory 'portable\@root\boot' for '.efi,.EFI,vmlinuz,bzImage,kernel'
    17:54:50 - Beginning to scan directory 'testing\@root\boot' for '
    .efi,.EFI,vmlinuz,bzImage,kernel'

    Was this fix only in 13.3.8 and not the 14.0.2 release?

     
  • dakanji

    dakanji - 2023-06-18

    it loads the second but then the log ends (i.e. refind hangs) when it starts to scan the third one.

    Can you temporarily rename your rEFInd efi file and drop the RefindPlus efi in instead (rename to match the original rEFInd efi name) to see whether this issue exists there as well?

    https://github.com/dakanji/RefindPlus#installation

     

    Last edit: dakanji 2023-06-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.