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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 70DB6158013 for ; Wed, 6 Dec 2023 16:50:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33FE92BC026; Wed, 6 Dec 2023 16:49:57 +0000 (UTC) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C58712BC019 for ; Wed, 6 Dec 2023 16:49:56 +0000 (UTC) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2c9f9db9567so48156301fa.3 for ; Wed, 06 Dec 2023 08:49:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701881395; x=1702486195; darn=lists.gentoo.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=5T2lXLitsIgiZJmayH14eZNLyJb9q1i0JWlO01QaPHA=; b=VVHYHcZ3PGqLAXbTdbmCJau5TW3YcZxP4T0GDnI65gdRH1RisUg4So7gUK3YSUHqh+ JV4KK+Cd2yLLTLfmP++zarkwYw44E8q/AqjcFcoA4xCz449HtfZVuokrFBe1r0nz909B 9z1YpkxnUw/Nf4qBoeLzDlmaJbpfB0KQPr9a6GiFpWmZYGfoaUFn1ZtuXXNuAb/CE6cH MyQl8GPmGomvKXyJe3AdsJPMvANaq9G42WAzZ8VGMdMaIVZWNwLlrO7yqOSbFWv2TC2J BN7D/5vr9GhyxXb4p/bMfQGtIVQwMQ1P8m22SqFezCvkCUrjXH/qMtphVEcFZXwZcWzd LpQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701881395; x=1702486195; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5T2lXLitsIgiZJmayH14eZNLyJb9q1i0JWlO01QaPHA=; b=RIPYGk0qNss0rX91k2qcVTwYGBlBd76q85DwME18ZgsAy+eeWgjKhomkYp8GnF3zJF h15HqQ16Q8Jju4tEKxn+4oR5A/ACSyJ4HDBTbGEEt50ZraZ8EsAkIGFlQn7ke8UKQzxA ch6waZxedEc27BIUF9fy8Cd3mMhInAk8uEOWZQU69VxDxkExXSv2SE5uSv7tViP9Dx6O jgJotuKdiqdoodPAYKuCd12UJXjWmu877BoZYqyDvfc1PsLFC0LA4ZIhWQZV0OOhdwe/ Jp1+VEaFHiYh6u03+19VbuGtDJp11TsL2MBEgFI0ALH0mGxN9Iogpjd5qLrCZZac8mkQ 4U6A== X-Gm-Message-State: AOJu0Yzkx9kQGq4jdylvcHgoqkhcqMm/KYlH23NSypMsokT43EhzyYjP 3dk1UZ1k2N3ifSC31BEGJa8iIWoBi7ZxB/ObeqSCbzqKocrMgQ== X-Google-Smtp-Source: AGHT+IHwkgzH6iw7IyC8GbFEcLNEOiZA72hNJMYyahYBeil76nFYLAdSg0OsRYiGMpex+k+8TAaor7Wt/9zRLu33bEc= X-Received: by 2002:a2e:a177:0:b0:2ca:61c:d0d5 with SMTP id u23-20020a2ea177000000b002ca061cd0d5mr762313ljl.102.1701881394892; Wed, 06 Dec 2023 08:49:54 -0800 (PST) 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 References: <10383704.nUPlyArG6x@wstn> In-Reply-To: <10383704.nUPlyArG6x@wstn> From: Victor Ivanov Date: Wed, 6 Dec 2023 16:49:43 +0000 Message-ID: Subject: Re: [gentoo-user] Boot and EFI partitions To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: f0b54dd8-1c8b-43a7-83d4-b37648e01854 X-Archives-Hash: 41a904e323678b71c32b20c4bf7e1b40 On Wed, 6 Dec 2023 at 15:32, Peter Humphreey wrote: > > I want to use bootctl from systemd-boot, as usual, to give me a > boot menu without that grub monster. > As a disclaimer, I do not and have not used systemd-boot specifically. That said... > In particular, the Gentoo wiki says I must have an EFI partition of type esp > [1] - not a directory in, say, /boot, as my other machines have. All right so > far, but the Gentoo systemd-boot page says I need a /boot partition as well, > of type XBOOTLDR [2]. So now I seem to need /efi on /dev/nvme0n1p1 and /boot on > /dev/nvme0n1p2, both with FAT32 file systems. > This is indeed my understanding as well. Irrespective of systemd-boot ESP is required for EFI bootloader executables to be stored into. This is part of the GPT and UEFI standard, so this should be of type ESP and formatted as FAT32, and is usually the first partition on the boot drive when using GPT. Not required for BIOS/Legacy boot, as the guide already mentions. Moving on to "/boot", it has long been recommended (but not always required) to have "/boot" as a separate partition. In practice, it would often be the case (especially with GRUB) that "/boot" could simply be a directory on your root partition. But sometimes, e.g. with LVM and/or encrypted root, "/boot" has to be separated out so that the kernel image could be read and booted by the boot loader before rootfs could be unlocked. This could be any filesystem recognised by the boot loader of choice. So, a typical GPT set up, especially when having encrypted rootfs, would look something like: /dev/nvme0n1p1: ESP, GPT type 0xEF00, FAT32, usually mounted under /efi (preferred) or /boot/efi (legacy) /dev/nvme0n1p2: boot, GPT type 0x8300, ext3/ext4/etc, usually mounted under /boot /dev/nvme0n1p3: rootfs - GPT type 0x8308 if using LUKS, 0x8300 for standard rootfs So, without knowing much about systemd-boot from the guide linked it seems to me that its implementation doesn't differ too much from this reasonably well established model, except for a few additional constraints which, based on my understanding, are: 1. You _must_ have an XBOOTLDR partition (functionally equivalent to "boot" above) _in addition to_ the ESP and cannot simply use "/boot" under your rootfs partition 2. XBOOTLDR partition _must_ be of GPT type 0xEA00 3. XBOOTLDR partition _must_ have GUID set to "bc13c2ff-59e6-4262-a352-b275fd6f7172" 4. XBOOTLDR partition _must_ be formatted with a filesystem supported by your EFI BIOS with FAT32 being universally supported, though your particular EFI BIOS _might_ support others I say "must" as it appears to be from the guide like this is the requirement for systemd-boot, the actual Boot Loader Specification page appears to suggest that an XBOOTLDR partition is optional. So there may be a viable configuration without it. Mount point recommendations seem consistent with previously established conventions re EFI ESP and /boot. Hope this helps. I'm happy to be corrected in case I misunderstood anything specific to systemd-boot. Best Regards, Victor