Hello, Michael. On Thu, Dec 19, 2024 at 10:59:54 +0000, Michael wrote: > On Wednesday 18 December 2024 21:31:42 GMT Alan Mackenzie wrote: > > On Wed, Dec 18, 2024 at 15:58:14 +0000, Michael wrote:
> > > On an OpenRC system without GRUB, rEFInd is a good choice, or for a > > > totally manual approach use the efibootmgr: > > > https://wiki.gentoo.org/wiki/Efibootmgr > > I got efibootmgr installed on one of my machines. Somebody (tm) should > > tell the maintainers that "File or directory not found" is an incomplete > > error message. It cost me around an hour till I figured out it was > > trying to access files on /dev/sda1 (which I don't have). > When you run efibootmgr with no options it accesses the UEFI BIOS menu stored > on the MoBo's EEPROM and displays its entries in the terminal. It does not > access the disk. When you create an entry it will verify the fs path and > kernel image you are adding on the boot menu actually exists on the fs - in > this case it will try to read the contents of the FAT32 fs on the disk, but > should only access the disk and partition you tell it to access when creating > EFI boot menu entries, e.g.: > efibootmgr --create --disk /dev/sda --part 1 ... > efibootmgr --create --disk /dev/nvme0n1 --part 3 ... > It is just a CLI tool to interact with the UEFI firmware API. It is the UEFI > firmware itself which is probing block devices, reading and writing on its > EEPROM. OK, I'm flogging a dead horse here, but the correct error message would have been along the lines: File or directory not found: /dev/sda1/EFI/whatever. The name of the file it couldn't find would have alerted me immediately to the error in my command line. > You'll have to copy your own kernel images on the FAT32 /efi or /boot > partition, or use 'make install'. Yes, understood. > > Also, none of the documentation was explicit in saying that with > > efibootmgr, you have to go into the BIOS setup to select the kernel you > > want to boot. Nothing wrong with that, but if I'd know first, I wouldn't > > have bothered getting it working. (Sorry, it's been a strenuous > > evening.) > Yes, you can enter the MoBos BIOS menu, if you prefer to, or you can > specify/ edit your own preferred order of the UEFI boot menu entries: > --bootorder 5,2,4 > or you can select which menu entry to boot next into before you reboot: > --bootnext 00005 Yes, I've got that, thanks. That means deciding which kernel to boot next before shutting down. That's too cumbersome for me. Anyhow, as I said, I got efibootmgr working satisfactorally in the end. > > rEFInd doesn't feel right, somehow. It seems to involve a graphics > > screen, and configuring icons in a config file. I just want want to get > > the system booted, with a choice of kernels at boot time, and not have > > all the overhead of graphics and "flexibility". > > I thought systemd-boot was OK, until it starting emptying my /boot > > partition, and booting from a partition other than the one I'd told it > > to. Don't we just love software which is clever? > > <Sigh>. It looks like I'm going to have to make some compromises, > > somewhere. It's a pity lilo isn't still going. > There is sys-boot/elilo available for UEFI systems, but it hasn't been > touched > for more than 10 years. I've never tried it, but this doesn't mean it won't > work as is. > There's also syslinux, but you'll need to use efibootmgr (once) to let the > UEFI firmware know about the syslinux image. Yes. I spent the morning getting syslinux working on my old machine, for which I did indeed need efibootmgr (actually more than once). I cleared out most of the debris from the BIOS's list of bootable things, leaving only (in order) my DVD drive, syslinux, and systemd-boot. I strongly suspect I will never be using the last of these again. I've also changed the partition type of my /dev/nvme1n1p2 from EFI System Partition to ordinary Linux file system. I was even getting twisted up myself between that partition and the proper /boot partition. Now it can't happen again. I amn't absolutely sure what started writing stuff onto /dev/nvme1n1p2, but I strongly suspect it was systemd-boot, still. I'm sure that on my old machine it was bootctl install that wrote the executable file onto the EFI partition that WASN'T mounted as /boot, or even mounted at all. Anyhow, syslinux appears to be running satisfactorally on my old machine (after I swapped out vesamenu.c32 for menu.c32 to eliminate the graphical slant of the former). But I worry a little that the syslinux project doesn't appear to be in its vigorous prime of life. It seems to be a project that was made to work properly, then the maintainers decided there was nothing more to be done, so they didn't do anything. (This is much better than the usual Microsoft strategy.) So I now have to get syslinux onto my new machine, now. It won't take me very long. Thanks for the help over the last two or three posts! Having two EFI System partitions probably is a bad idea. -- Alan Mackenzie (Nuremberg, Germany).