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 BF7841382C5 for ; Wed, 26 May 2021 13:49:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22A8FE14D6; Wed, 26 May 2021 13:49:20 +0000 (UTC) Received: from mail-gw.thundermail.uk (mail-gw.thundermail.uk [149.255.60.74]) (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 9FB54E146C for ; Wed, 26 May 2021 13:49:19 +0000 (UTC) Received: from mailgw01.thundermail.uk (mail-gw.thundermail.uk [149.255.60.66]) by mail-gw.thundermail.uk (Postfix) with ESMTPS id 257C16007AA0 for ; Wed, 26 May 2021 14:49:17 +0100 (BST) X-ASG-Debug-ID: 1622036956-05541363bcac89f0001-LfjuLa Received: from cloud220.unlimitedwebhosting.co.uk (cloud220.unlimitedwebhosting.co.uk [149.255.60.183]) by mailgw01.thundermail.uk with ESMTP id ytJaYllCCHkvTJTL (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Wed, 26 May 2021 14:49:16 +0100 (BST) X-Barracuda-Envelope-From: confabulate@kintzios.com X-Barracuda-Effective-Source-IP: cloud220.unlimitedwebhosting.co.uk[149.255.60.183] X-Barracuda-Apparent-Source-IP: 149.255.60.183 Received: from lenovo.localdomain (230.3.169.217.in-addr.arpa [217.169.3.230]) by cloud220.unlimitedwebhosting.co.uk (Postfix) with ESMTPSA id 2803BC73D40 for ; Wed, 26 May 2021 14:49:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kintzios.com; s=default; t=1622036955; bh=f348PFNQc0b7qfikgIJrnPGRNXwxEFtv3DngPPptIso=; h=From:To:Subject; b=kIvztdEEjBqRh2NBEr9T92uA9B1Z7xLncXR/Ad7iSXS9oiNjS6Q9YiKdU1Z1HBC/k geYrGp9Ye6Uj6QnBpQrxdZQjIR9H97l2XgQFu5AMx5iAJwXfTXAW80Zo+iP/V9noLU bmp1vlH6HXlFnWgYrQ+dw7LdtCx1qUZ6Fkqc34HE= From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Dual booting with Windows 10 Date: Wed, 26 May 2021 14:49:01 +0100 X-ASG-Orig-Subj: Re: [gentoo-user] Dual booting with Windows 10 Message-ID: <3076758.aV6nBDHxoP@lenovo.localdomain> In-Reply-To: <2793411.e9J7NaK4W3@wstn> References: <1829103.taCxCBeP46@lenovo.localdomain> <2793411.e9J7NaK4W3@wstn> 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="nextPart2811011.VdNmn5OnKV"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <20210526134915.85506.83035@cloud220.unlimitedwebhosting.co.uk> X-PPP-Vhost: kintzios.com X-Barracuda-Connect: cloud220.unlimitedwebhosting.co.uk[149.255.60.183] X-Barracuda-Start-Time: 1622036956 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] Dual booting with Windows 10 X-Virus-Scanned: by bsmtpd at thundermail.uk X-Barracuda-Scan-Msg-Size: 9135 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.90208 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Archives-Salt: 06f554e1-db77-440d-9701-a448b6d2a167 X-Archives-Hash: d0ea57158573019b360a893ab8a80481 --nextPart2811011.VdNmn5OnKV Content-Transfer-Encoding: quoted-printable 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] Dual booting with Windows 10 Date: Wed, 26 May 2021 14:49:01 +0100 Message-ID: <3076758.aV6nBDHxoP@lenovo.localdomain> In-Reply-To: <2793411.e9J7NaK4W3@wstn> References: <1829103.taCxCBeP46@lenovo.localdomain> <2793411.e9J7NaK4W3@wstn> On Tuesday, 25 May 2021 16:23:01 BST Peter Humphrey wrote: > Thanks for the offer, Michael, but let me clear a few things up first. >=20 > 1. I don't use symlinks in /boot. This allows a simpler single boot partition (ESP) & filesystem set up (VFAT= ). > 2. I don't use grub, nor any other boot manager. =46rom what you've written below you have installed and now use systemd-boo= t. > 3. ...unless you count bootctl, from sys-boot/systemd-boot. OK, bootctl is a command interfacing with the UEFI firmware API, while=20 systemd-boot, once you install it, is a 3rd party boot manager as I've=20 mentioned in my previous message. Disambiguation: a) UEFI boot manager - the 'native' EEPROM based UEFI boot loader/manager. = It=20 scans all .efi executables, inc. Linux et al OS kernel images stored on the= =20 ESP; updates and stores a list of .efi executables in its database and;=20 presents them in the UEFI boot menu as manually selectable boot options. =20 Unless the user enters the UEFI boot menu at start up, by pressing a key li= ke=20 =462, the first .efi executable on the list will be loaded and run. The li= st of=20 executables can be manipulated using the efibootmgr command, or the UEFI me= nu=20 interface itself. b) efibootmgr - a userspace command interfacing with the UEFI firmware API,= =20 used to manipulated the UEFI executable applications listed in the UEFI=20 database. c) bootctl - a userspace command interfacing with the UEFI firmware API lik= e=20 efibootmgr and also with the systemd-boot boot manager (if installed). d) systemd-boot - a 3rd party boot manager (like GRUB, rEFInd, syslinux,=20 etc.). > 4. I have the existing ESP mounted on /boot. It belongs to Windows and > cannot be enlarged beyond 100MB. This should not be a problem per se, unless bootctl & systemd-boot, with it= s=20 own Boot Loader specification limitations, *must* be used as their develope= rs=20 intended (more below). For example, on this box I have: # du -s -h /boot/*/* 3.1M /boot/BOOT/boot.sdi 1.6M /boot/EFI/Boot 27M /boot/EFI/Gentoo 25M /boot/EFI/Microsoft My ESP is 273MB, but the MSWindows boot files plus Gentoo with two kernels = (no=20 initrd.gz) take up only 56.7M. I could add two more kernels in there and=20 still receive change from 100M - mind you some kernels are more frugally=20 configured than others. I notice you have /dev/nvme1n1p1 named as "boot". Is this a secondary boot= =20 partition? What is its mountpoint? What does it contain? > 5. I have a small second system on the Gentoo disk called Rescue, so I h= ave > a multiple-boot system. >=20 > # tree -L 3 /boot > /boot > =E2=94=9C=E2=94=80=E2=94=80 EFI > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 Boot > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 bootx64.efi > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 Linux > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 Microsoft > =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 Boot > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 Recovery > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 systemd > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 systemd-bootx64.efi > =E2=94=9C=E2=94=80=E2=94=80 System.map-5.10.27-gentoo > =E2=94=9C=E2=94=80=E2=94=80 System.map-5.10.27-gentoo-rescue > =E2=94=9C=E2=94=80=E2=94=80 amd-uc.img > =E2=94=9C=E2=94=80=E2=94=80 config-5.10.27-gentoo > =E2=94=9C=E2=94=80=E2=94=80 config-5.10.27-gentoo-rescue > =E2=94=9C=E2=94=80=E2=94=80 loader > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 entries > =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 08-gentoo-rescue-5.10= =2E27.conf > =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 09-gentoo-rescue-5.10= =2E27.nonet.conf > =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 30-gentoo-5.10.27.conf > =E2=94=82 =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 32-gentoo-5.10.27.nox= =2Econf > =E2=94=82 =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 34-gentoo-5.10.27.non= et.conf > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 loader.conf > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 random-seed > =E2=94=9C=E2=94=80=E2=94=80 vmlinuz-5.10.27-gentoo > =E2=94=94=E2=94=80=E2=94=80 vmlinuz-5.10.27-gentoo-rescue >=20 > # parted -l > [...] > Model: Samsung SSD 970 EVO Plus 250GB (nvme) > Disk /dev/nvme0n1: 250GB > Sector size (logical/physical): 512B/512B > Partition Table: gpt > Disk Flags: >=20 > Number Start End Size File system Name Flags > 1 1049kB 106MB 105MB fat32 EFI system partition boot, esp > 2 106MB 123MB 16.8MB Microsoft reserved partition = =20 > msftres=20 > 3 123MB 249GB 249GB ntfs Basic data partition msftdata > 4 249GB 250GB 580MB ntfs Basic data partition hidden, > diag >=20 > Model: Samsung SSD 970 EVO Plus 250GB (nvme) > Disk /dev/nvme1n1: 250GB > Sector size (logical/physical): 512B/512B > Partition Table: gpt > Disk Flags: >=20 > Number Start End Size File system Name Flags > 1 1049kB 269MB 268MB ext4 boot > 2 269MB 34.6GB 34.4GB linux-swap(v1) swap-1 swap > 3 34.6GB 51.8GB 17.2GB ext4 rescue > 4 51.8GB 86.2GB 34.4GB ext4 root > 5 86.2GB 90.5GB 4295MB ext4 local > 6 90.5GB 103GB 12.9GB ext4 home > 7 103GB 129GB 25.8GB ext4 common > [...] >=20 > I followed the installation handbook, boot-loader section, to create a UE= =46I > boot entry. I followed the syntax precisely, with several variations at > various attempts. In every case, the UEFI BIOS listed the new entry but > couldn't execute it. This should work to launch your systemd-boot: efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "systemd-boot" -- loader "\EFI\Boot\bootx64.efi" This would also work, if vmlinuz-5.10.27-gentoo, config-5.10.27-gentoo, and= =20 System.map-5.10.27-gentoo are stored on the ESP under the EFI/ directory, e= =2Eg.=20 in EFI/Linux/, to launch your current kernel directly: efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Gentoo-5.10.27" -- loader "\EFI\Linux\vmlinuz-5.10.27-gentoo" NOTE: According to its specification, the systemd-boot requires a boot=20 partition "... large enough (let=E2=80=99s say 250MB) ...". If it is small= er, "... a=20 new suitably sized (let=E2=80=99s say 500MB) XBOOTLDR partition ..." is mea= nt to be=20 created to be used as $BOOT. I suppose this is to allow enough space for t= he=20 devs of various Linux distributions to auto-drop their kernels in there=20 without running out of space. Other 3rd party boot managers are not as demanding. > I want to be shown a list of systems to boot immediately after the POST, > which I'm sure efibootmgr can't do,=20 Right, efibootmgr can be run in a console/terminal on an already up and=20 running Linux OS. Just like bootctl. Neither of them can run immediately= =20 after POST, because they are not efi applications. Typically, UEFI firmware do not present a list of efi applications to the u= ser=20 =2D unless you interrupt the boot process and get into the UEFI menu by pre= ssing=20 an appropriate key. The UEFI firmware will always load and execute the fir= st=20 item on its list, if left to its own devices. If the first item is=20 misconfigured/missing, it'll try to run the next one and so on. > so I ran 'bootctl install' to install > the code (where?) to give me the ability. The systemd-boot installs its efi executable in two places: a) EFI/systemd/systemd-bootx64.efi b) EFI/Boot/bootx64.efi <=3D=3D Default/fall back efi executable while at the same time it adds it as the first entry in the UEFI firmware b= oot=20 list, so it is loaded and executed first by the firmware. Once it is launch= ed=20 the systemd-boot will read its own loader configuration files and present a= =20 list to the user. > That works, though I do remove > the directory with the 32-hex-digit name, and install my own loader.conf. Sure, the systemd-boot loader configuration files can be edited and=20 overwritten. > The system seems to be stable now. Which is a good enough proof your configuration just works(TM). :-) If it suits your needs, then arguably you don't need to do anything else. = If=20 it doesn't suit your needs quite right, you could seek alternatives. I can= =20 think of 2 other options you may want to look into. 1. A minimalist option is to not use any 3rd party boot manager and stick w= ith=20 the MoBo's UEFI firmware. By default and without intervention, you will=20 always boot the first ordered entry in the UEFI boot menu, without delay. = =20 When you need an alternative kernel/OS, you will press the appropriate key= =20 during POST to enter the UEFI menu and select another entry from its boot m= enu=20 manually. The efibootmgr will have to be used every time you install a new= =20 kernel to update/configure the UEFI boot menu list. 2. Use some other better suited 3rd party boot manager (not systemd-boot). = =20 The principle is broadly the same as your present setup. Each boot manager= =20 has its own idiosyncrasies and commands of choice. GRUB is quite automated= ,=20 although you can overwrite its grub.conf menu and decline using update-grub= ,=20 or grub-mkconfig to generate it. Then again, why would you select such a=20 heavily automated and complicated piece of software, only to bypass the ver= y=20 functionality its devs wanted to offer? Contrastingly, syslinux is very=20 simple and lightweight, but you have to manually configure its also very=20 simple boot menu. PS. The UEFI firmware will scan more than a single VFAT partition marked a= s=20 ESP type, but as far as I know this will only work if the ESP is on the fir= st=20 disk - I haven't tried it. --nextPart2811011.VdNmn5OnKV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmCuUc0ACgkQseqq9sKV ZxlnvhAA46qA6ERCyhD2Rmz+MAPUO/Lh6Fd1HSFNTAywfMPg6WUnbANATzYv9dWY aLcaixGczBblzVqRt1h+QdKrACD7K7JBsiN08/zcFvyQQsrA+t1pTYfSpBI4JvAB 1MjmH1lpDc2dEwzI09xF9xsKukT2+npH9Q2nnVJy+4wFfvCXoGTRTNBrASIIYw0I xVgAVLczjXcVR+pCoopvDjzeAKXexll1T9IFxuC4rN9woOC+preV7mntxvfDydNc bP0jxY6QDQTrUurSa3m6GgnXboqAGW7KXSbPGHBRvEmyopeCn+/vo3uPKha7bbyE t4jkEiHCd8alVZvFCBfWWBxYjAoghHFyobY5uz6fTG8KvUJ15ynASpdqM7Uisb29 Lw4NbTV0Mnc7ErUrTuA0OJDkKUuuIbHdAiZ5EHlMPYzRxOxwtVzr9PPwc7EgOKbq qb2RuieGEYg+8RiUnum1YRj2wgn67C8qek6P9sVvlFMpi6b5urDg8YMidYBDh5N4 bdmT1xXsj9d9diazOHC76tDnQ4jao+TYxENj2R6f2v6MgFMcTvJht5MOPLpUEwCI 6r8G1rtG8OQm8MLYWyC3ZGxfSU5igXdI2BSgyVQxiknfostAD7927QxuOrq+Oory JclzBn5yNJqqXJNMY1xGRdJQt7jnsgbweRg/63iv74sf7fdLaag= =/hLI -----END PGP SIGNATURE----- --nextPart2811011.VdNmn5OnKV--