On Wednesday, 23 December 2020 05:37:01 GMT Walter Dnes wrote: > On Wed, Dec 23, 2020 at 04:16:46AM -0000, Grant Edwards wrote > > > Does the UEFI BIOS recognize that /dev/sda1 exists, but just isn't > > bootable? If yes, then it should be possible to install Grub on a USB > > key and boot a kernel on /dev/sda1. It might be simpler to just put > > the kernel and initrd on the USB key also. Though boot time might be > > slightly slower that way, it won't affect performance after that. > > The point of this excercise is to bypass UEFI BIOS as much as > possible. From what I've read in the interwebs Intel have been moving to UEFI Class-3 without the legacy BIOS Compatibility Support Module (CSM). Dell who are mostly a Wintel shop would be early adopters I imagine. With no CSM one has to use UEFI and an ESP partition to boot from. Any applications/drivers requiring 16-bit BIOS will no longer work on bare metal. I suppose they should work in QEMU with sgabios.bin as long as QEMU can emulate the interface to the hardware. As far as I know, Intel have not made Secure Boot mandatory, so no need to use Microsoft-RHL keys to sign your kernel images, but either way you will need to drop these in the ESP VFAT formatted partition under an EFI/ directory, or EFI// subdirectory. At some point in this /progress/ towards UEFI Class-3, Dell disabled booting internal drives with CSM. Only external drives/media can be booted if CSM is enabled - I think you need to press F12 to select the external bootable device. > The machine will happily automatically boot from the Gentoo > minimal install USB key, which I believe is grub, so that works. And > the minimal install does indeed recognize /dev/sda, which is why I was > able to install linux in the first place. What I'm looking for is the > grub "recipie" to automatically hand off control to /dev/sda1 at bootup. > This will require leaving a USB key permanently in one of the 6 USB > ports in the back of the machine. You could install GRUB to a USB device, you need to pass the '--removable' option to the grub-install command. > I've been using lilo for 20 years plus, so I don't have a clue about > grub and how it works. I generally have 2 kernels available on the lilo > boot menu, "production" and "experimental". I test the "expermental" > kernel for a while before copying it over the "production" kernel. My > menu normally waits up to 15 seconds. If no keypress, it defaults to > the "production" kernel. Grub would need to load one of > /boot/kernel.experimental or /boot/kernel.production. I could > re-arrange the layout if necessary. Here's my current /boot layout... > > [d531][waltdnes][~] ll /boot > total 18412 > drwxr-xr-x 2 root root 4096 Dec 22 21:42 . > drwxr-xr-x 21 root root 4096 Oct 24 12:14 .. > -rw-r--r-- 1 root root 0 Oct 11 19:55 .keep > -rw-r--r-- 1 root root 0 Oct 13 05:57 .keep_sys-boot_lilo-0 > -rw------- 1 root root 139264 Dec 22 21:42 .map > -rw-r--r-- 1 root root 2979997 Dec 21 19:31 System.map.experimental > -rw-r--r-- 1 root root 2991033 Oct 13 06:03 System.map.production > -rw-r--r-- 1 root root 512 Oct 13 06:04 boot.0800 > -rw-r--r-- 1 root root 90538 Dec 21 19:31 config.experimental > -rw-r--r-- 1 root root 90579 Oct 13 06:03 config.production > -rw-r--r-- 1 root root 6214192 Dec 21 19:31 kernel.experimental > -rw-r--r-- 1 root root 6271536 Oct 13 06:03 kernel.production GRUB will install its UEFI image grubx64.efi in the ESP partition and then boot with that any OS kernel images you have included in the ESP partition. GRUB will scan the ESP partition and create its grub.cfg file to include in its boot menu automagically any kernel/initramfs images, when you run update- grub. Alternatively, instead of booting a mini OS (UEFI firmware), to boot another mini OS (GRUB), to boot your intended OS (Gentoo), you can skip GRUB altogether and just use efibootmgr to manipulate the UEFI firmware boot menu for your kernel images in the ESP partition.