Menu

Feature request : Extra "scan for" option

andy
2014-07-15
2014-08-11
  • andy

    andy - 2014-07-15

    This is a great project and my primary USB EFI bootloader. I had a few ideas for some extra features if they aren't too hard to incorporate.

    1: I often run into secureboot. I can bypass it fine as refind is signed, but if in the "scanfor" stanza i have csm options it pauses. I get around this by using the default scanfor options, and then chainboot another refind.efi and refind.conf that simply uses...

    scanfor optical,cd,hdbios,biosexternal,external,internal,manual
    include /efi/boot/refind.conf

    ...if i ever want to enable legacy support, should the bios allow it. I was wondering if it was possible to add an extra stanza for the ability to add a secondary "scanfor" if i press (as an example) f5. Or an alternative would to be exchange the pause with a 5 second timeout.

    2: Some things work with secureboot, some don't. If there is a flag (variable) that can easily detect secureboot, it would be great to have the option to hide non-secureboot capable bootloaders with a "disableONLYsecureboot" in the manual stanzas.

    3: With grub2s manual entries there is the ability to hide non-existant menu entries. In my particular case i have some entries that point to an ntfs partition that aren't there if secureboot is enabled and the drive is invisible (no ntfs.efi loaded). Grub2 uses the following, is there anything like in in refind?

    if test -f (hd1,1)/isolinux/vmlinuz0 -a -f (hd1,1)/isolinux/initrd0.img; then
    menuentry '(hd1,1) test' {
    set root='(hd1,1)'
    linux (${root})/isolinux/vmlinuz0
    initrd (${root})/isolinux/initrd0.img
    }
    fi

    4: A small cosmetic request for submenus. The main icon is used for all submenu entries. Is it possible to have the icon change as you select submenuentry 1, 2, etc.

    5: The NTFS driver you are working on. That would be excellent and i look forward to it.

    Keep up the good work.

     

    Last edit: andy 2014-07-15
  • Roderick W. Smith

    I'll think about adding a secondary scanfor option, but my initial reaction is that implementing this would be more trouble than it's worth. You can easily achieve the effect you want by providing either a secondary rEFInd installation or a manual boot stanza to boot the primary rEFInd installation with an option to load a secondary configuration file. Either method will add a menu option that you might not want to see, but it will get the job done without extra code in the program.

    The problem with disabling options that don't provide Secure Boot support is that I know of no existing EFI function to test for this support without actually trying to launch a program. Thus, I'd need to write a function that would look for the Secure Boot signatures at the end of each file and determine their validity. Not only is that a lot of code, but to do it right, I'd need to read the entirety each and every boot loader, which is a potentially time-consuming operation, particularly on some computers and with some filesystems drivers. It can take several seconds to read a Linux kernel from some filesystems on some computers. If such a computer has several kernels, this could add half a minute or more to the rEFInd launch time, which is completely unacceptable.

    Rather than make a more complex manual boot stanza to hide non-existent boot loaders, I recommend you rely on rEFInd's auto-detection.

     

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.