From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5F5421382C5 for ; Wed, 23 Dec 2020 12:44:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E13B0E0A98; Wed, 23 Dec 2020 12:44:15 +0000 (UTC) Received: from mail-gw.thundermail.uk (mail-gw.thundermail.uk [149.255.60.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87F72E0A8D for ; Wed, 23 Dec 2020 12:44:15 +0000 (UTC) Received: from mailgw01.thundermail.uk (mail-gw.thundermail.uk [149.255.60.66]) by mail-gw.thundermail.uk (Postfix) with ESMTPS id 4BA7B606ACAE for ; Wed, 23 Dec 2020 12:44:13 +0000 (GMT) X-ASG-Debug-ID: 1608727452-0554130f66307c0a0001-LfjuLa Received: from cloud307.thundercloud.uk (cloud307.thundercloud.uk [149.255.58.40]) by mailgw01.thundermail.uk with ESMTP id h7DjgUqx5WCCHe9s (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 23 Dec 2020 12:44:12 +0000 (GMT) X-Barracuda-Envelope-From: confabulate@kintzios.com X-Barracuda-Effective-Source-IP: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Apparent-Source-IP: 149.255.58.40 Received: from lenovo.localdomain (230.3.169.217.in-addr.arpa [217.169.3.230]) by cloud307.thundercloud.uk (Postfix) with ESMTPSA id 7F2FDC004DA for ; Wed, 23 Dec 2020 12:44:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kintzios.com; s=default; t=1608727452; bh=BwC77e+p4vfJJ6o3bo6Ie7Y1TeVMYhVD+v6GjT33Iy4=; h=From:To:Subject; b=HF6VYos4peIaScDw2vr0pYXA3PSIKk8jiDYAjS48o3NA8XffxZDn2hVa+NZnDIBgs gMdst2MLogAfK1hqLQAbVOatslR8Wizo8kObfJl+tJ3/mMKYTesJWuX3T0PA9mpWTf 71PolDrZE55wFZX5VcyIF0RbhVIqmcGW0v68kalM= Authentication-Results: cloud307.thundercloud.uk; spf=pass (sender IP is 217.169.3.230) smtp.mailfrom=confabulate@kintzios.com smtp.helo=lenovo.localdomain Received-SPF: pass (cloud307.thundercloud.uk: connection is authenticated) From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible? Date: Wed, 23 Dec 2020 12:44:04 +0000 X-ASG-Orig-Subj: Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible? Message-ID: <3342283.iIbC2pHGDl@lenovo.localdomain> In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart8700499.CDJkKcVGEf"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <20201223124411.1912906.3593@cloud307.thundercloud.uk> X-PPP-Vhost: kintzios.com X-Barracuda-Connect: cloud307.thundercloud.uk[149.255.58.40] X-Barracuda-Start-Time: 1608727452 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://149.255.60.66:443/cgi-mod/mark.cgi X-ASG-Orig-Subj: Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible? X-Virus-Scanned: by bsmtpd at thundermail.uk X-Barracuda-Scan-Msg-Size: 4145 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1.9 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.86731 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Archives-Salt: 759b8e1d-6536-498e-a176-2192fdb33bf3 X-Archives-Hash: 90a13c32546bcd999e5d5422eb67cfec --nextPart8700499.CDJkKcVGEf Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Michael To: gentoo-user@lists.gentoo.org Reply-To: confabulate@kintzios.com Subject: Re: [gentoo-user] Re: Is a USB-key-to-hard-drive-tap-dance-boot possible? Date: Wed, 23 Dec 2020 12:44:04 +0000 Message-ID: <3342283.iIbC2pHGDl@lenovo.localdomain> In-Reply-To: References: 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. --nextPart8700499.CDJkKcVGEf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAl/jO5QACgkQseqq9sKV ZxnrORAAsJ21S3TcblFXAUwPULHlHgjv2/MB3R5T0KYgv+8MPjdBPRaqh8zyCi4f x6GEnWkEOSKm6FGCm3LnBKw6vKamerXUe6qwHZIi6bkLI59N7Pw6LEZ1RWUHFIDF B7Yes1soRKEEW5E7D/jOBhNx+HFMYoOV/NjEkbZRAIlUvvR7bIHKCugCrHnIZxGD HGG3zdRefbEwVSAp+psHXzdQ5VR+pC22NyUGCUYtS3hUmLXFZ01KvYkMH/jCSSIi mvxGbBPtSNKQjwx1b+IlFk+ov8AT/nQh+JvrGWF3plTqlohaqdQcTmv6rmbN7NqD 0sUGI8/sl+g8ZxfnpA9GAZkORqU0JhKyTH8gD2bf6Z56JORO66vMKZikivpWD03G 47NKc7chOvaFtFRQ52U5vsLu/tqx4Mjx38b0x281VBaH/mZujZGRrT76eRoZ5hHO rU57jlJxQvuoeCGxDn1gqt9QSxN9MWcOXyjNqZpiTA1KeDprigXiAAzfMWdFVClG 1ocEwGGhBpHsW0iuyEQgxt0IvteWEijaw+itCyZuNu9lSbnRl8EZ4lpymYMjt+y0 ot99PD9KurKMIc/RIVwQwTzQnYOn2vJjGuDdaJ2mmqYshfUmdhu4jow5vT2x/QfW QOqE+h7I9MmsvP3YtV6y1tPU321qjDH6eTFJn+n7njFFeGAecxo= =Kf4D -----END PGP SIGNATURE----- --nextPart8700499.CDJkKcVGEf--