tsdadam wrote:Thanks. I'm reading but still finding it quite in depth, not really making much headway. I seem to have EFI folders in several places, and I'm just trying to figure out how they relate to one another.
e.g. there are efi files and folders in the ESP partition, in /, in /boot/efi and then under /boot/efi I've got even more subdirs: microsoft, linuxmint, refind, Boot. It's just knowing which one the computer and rEFInd are using, and which I need to rename in order to hide them (e.g. my rescue partition shows up at boot, I'd like to hide that for now).
As far as the EFI is concerned, all that normally matters is the EFI System Partition (ESP), which is usually mounted at /boot/efi in Linux. This partition holds a directory called EFI, which in turn holds various subdirectories -- BOOT for a default/fallback boot loader, Microsoft for Microsoft's boot loader, linuxmint for Mint's boot loader, etc. Thus, in Linux, you'll see directories like:
Code: Select all
/boot/efi/EFI/BOOT/
/boot/efi/EFI/Microsoft/
/boot/efi/EFI/linuxmint/
rEFInd scans the root directory of the ESP and the subdirectories of its EFI directory (hence /boot/efi/ and the /boot/efi/EFI/*/ directories in Linux) for boot loaders, excluding rEFInd's own directory and the EFI/tools directory. Files with names that end in .efi in these locations get picked up as boot loaders.
Note my use of the word "normally" a couple of paragraphs ago. Because rEFInd can load Linux kernels with EFI stub loaders, it's desirable for rEFInd to gain access to the Linux /boot directory. For this reason, rEFInd ships with filesystem drivers for ext2/3/4fs and ReiserFS, and rEFInd's install.sh installs whatever driver it needs to read Linux's /boot directory. This may give the EFI (and rEFInd) access to additional partitions, and because Linux stores its kernels in /boot, rEFInd adds that directory to the list of locations it scans on all partitions. If any of these non-ESP partitions happen to have .efi files in their root directories, in boot/, or in EFI/*/, rEFInd adds them to the boot list. If the "scan_all_linux_kernels" option is uncommented, files with names that begin with "vmlinuz" or "bzImage" but that don't end in .efi are also added.
This set of rules can sometimes result in duplicate or stray boot loaders being picked up. This is especially true if you use a separate /boot partition and the distribution includes a symbolic link called /boot/boot that points to /boot, or if it creates a symbolic link called /boot/vmlinuz that points to a specific kernel file. Sometimes there's also a /vmlinuz file that points to /boot/vmlinuz, which will be redundant or useless. You can trim back such unwanted entries in various ways:
- You can remove unnecessary drivers from the rEFInd drivers directory. For instance, if you use ext4fs on / and ext2fs on /boot, you could swap out the ext4fs driver for an ext2fs driver, thus keeping a /vmlinuz link from appearing as a non-functional boot entry.
- You can delete unnecessary boot loaders. These may accumulate if you experiment with boot loaders or create backups of boot loader directories.
- You can use the "dont_scan_volumes" option to remove specific filesystems from being scanned. This works best if you give the volume a label.
- You can use the "dont_scan_dirs" option to remove specific directories from the scan list.
- You can use the "dont_scan_files" option to remove specific filenames from the scan list.