Jump to content

Secure Boot/fr: Difference between revisions

From Official NixOS Wiki
FuzzyBot (talk | contribs)
Updating to match new version of source page
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
On NixOS, Secure Boot can be enabled via the project [https://github.com/nix-community/lanzaboote Lanzaboote].
[[Category:Security]]
Alternatively, by using the [[Limine]] project.
[[Category:Booting]]
</div>
</div>


Il est recommandé de définir un mot de passe BIOS et le chiffrement total du disque afin de se prémunir d'attaques contre l'UEFI et le démarrage sécurisé.
<div lang="en" dir="ltr" class="mw-content-ltr">
 
== Checking Secure Boot status ==
<div class="mw-translate-fuzzy">
The easiest way to check if your machine has Secure Boot enabled is through the use of [[Systemd]]'s <code>bootctl</code>. There is no need to be using [[Systemd/boot|systemd-boot]] as your bootloader for this command to work. <syntaxhighlight lang="console">
Lanzaboote dispose de deux composants: <code>lzbt</code> et <code>stub</code>.
</div>
 
<code>lzbt</code> est la ligne de commande qui signe et installe les fichiers de démarrage sur l'ESP. 
 
<code>stub</code> est une application UEFI qui charge le noyau et initrd depuis l'ESP. Elle diffère de systemd-stub, voir plus bas pour des précisions.
 
{{warning|Lanzaboote est en développement et nécessite de réunir des pré-requis et de prendre des précautions. Il est pour le moment uniquement disponible sur nixos-unstable. Pour plus d'informations, voir le dépôt GitHub ou le guide de démarrage rapide.}}
 
<span id="Requirements"></span>
<div class="mw-translate-fuzzy">
== Pré-requis ==
</div>
 
L'implémentation du démarrage sécurisé de Lanzaboote nécessite un système installé en mode UEFI avec systemd-boot activé. Ceci peut être vérifier en exécutant <code>bootctl status</code>:
 
<syntaxHighlight lang=console>
$ bootctl status
$ bootctl status
System:
System:
    Firmware: UEFI 2.70 (Lenovo 0.4720)
    Firmware: UEFI 2.80 (American Megatrends 5.25)
  Secure Boot: disabled (disabled)
    Firmware Arch: x64
TPM2 Support: yes
    Secure Boot: enabled (user)
Boot into FW: supported
    TPM2 Support: yes
 
    Measured UKI: yes
Current Boot Loader:
    Boot into FW: supported
      Product: systemd-boot 251.7
...
...
</syntaxHighlight>
</syntaxhighlight>The system above has secure boot enabled and enforced. Other values include <code>disabled (setup)</code> for Setup Mode, <code>disabled (disabled)</code> or <code>disabled (unsupported)</code>. The unsupported tag only appears if your device firmware does not support Secure Boot at all.
If you see <code>disabled (disabled)</code>, this means you will need to enable Secure Boot in your UEFI firmware settings before proceeding to use one of the projects outlined below.
</div>  


 
<div lang="en" dir="ltr" class="mw-content-ltr">
 
== Enabling Secure Boot on NixOS ==  
<span id="Setup"></span>
On NixOS, there are currently two main ways to enable Secure Boot, [[Lanzaboote]] and [[Limine]]. See their respective wiki pages for step by step instructions on each.
<div class="mw-translate-fuzzy">
== Installation ==
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Follow the instructions in the [https://github.com/nix-community/lanzaboote/blob/master/docs/QUICK_START.md Quick Start guide].
For Secure Boot to be most effective, there are certain conditions which should also be met. The most important are:
</div>
</div>


<div class="mw-translate-fuzzy">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Gestion des clés ==
# The UEFI firmware is protected by a strong password to prevent an untrusted drive from being booted or Secure Boot being disabled.
À ce jour, Lanzaboote offre seulement un stockage local du trousseau de clés. Sans cela, il est impossible de reconstruire le système et signer les nouveaux fichiers générés.
# Full disk encryption is enabled so that your drive cannot simply be read by putting it another another machine.
</div>
# Ideally, default OEM/third party keys are not in use as these have been shown to weaken the security of Secure Boot significantly.<ref>https://habr.com/ru/articles/446238/</ref> However, this may brick some devices which use Microsoft-signed OpROMS for certain hardware during the boot process, particularly some laptops, so you must be certain before removing them. It may be impossible to fix if, for example, the GPU relies on these OpROMS.
</div>  


Prochainement, Lanzaboote fournira deux nouveaux services de signature: la signature à distance (un serveur HTTP recevant des demandes de signature et renvoyant les signatures) et la signature basée sur PKCS#11 (en apportant un périphérique de type HSM tel qu'une YubiKey, NitroKey, etc).
<div lang="en" dir="ltr" class="mw-content-ltr">
== See Also ==
[https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot Arch Wiki/Secure Boot] Extensive information on Secure Boot including using UKIs.
</div>


{{Warning|La gestion des clés est un problème complexe qui sort du cadre du projet Lanzaboote. Malgré que de nombreuses solutions existent, aucune n'est parfaite. Afin d'obtenir une protection effective du démarrage, il est crucial de prendre le temps d'apprendre comment gérer ses clés et de définir le niveau adéquat de protection.}}
<references />
 
<div class="mw-translate-fuzzy">
== Différences avec `systemd-stub` ==
systemd et les distributions en amont ont une solution existante s'appelant `systemd-stub`, cependant cette solution n'est pas applicables à NixOS étant donné qu'il y a trop de générations sur un même système.
</div>
 
En utilisant `systemd-stub`, un noyau et un initrd doivent être dupliqués pour '''chaque génération'''. En utilisant le stub Lanzaboote, un noyau et un initrd peuvent être '''dé-dupliqués''' sans compromettre la sécurité.
 
<div lang="en" dir="ltr" class="mw-content-ltr">
Tracking the feature parity with `systemd-stub` can be done in this issue: https://github.com/nix-community/lanzaboote/issues/94.
[[Category:Security]]
[[Category:Booting]]
</div>

Latest revision as of 23:16, 9 December 2025

Le démarrage sécurisé est habituellement associé à la capacité d'un micrologiciel de plateforme de vérifier les composants de démarrage et de s'assurer que seul votre propre système peut démarrer.

Le démarrage sécurisé est implémenté de multiple façons. La plus connue est le démarrage sécurisé UEFI qui repose sur le micrologiciel de plateforme UEFI, mais d'autres implémentations existent sur les systèmes embarqués.

Checking Secure Boot status

The easiest way to check if your machine has Secure Boot enabled is through the use of Systemd's bootctl. There is no need to be using systemd-boot as your bootloader for this command to work.
$ bootctl status
System:
    Firmware: UEFI 2.80 (American Megatrends 5.25)
    Firmware Arch: x64
    Secure Boot: enabled (user)
    TPM2 Support: yes
    Measured UKI: yes
    Boot into FW: supported
...
The system above has secure boot enabled and enforced. Other values include disabled (setup) for Setup Mode, disabled (disabled) or disabled (unsupported). The unsupported tag only appears if your device firmware does not support Secure Boot at all.

If you see disabled (disabled), this means you will need to enable Secure Boot in your UEFI firmware settings before proceeding to use one of the projects outlined below.

Enabling Secure Boot on NixOS

On NixOS, there are currently two main ways to enable Secure Boot, Lanzaboote and Limine. See their respective wiki pages for step by step instructions on each.

For Secure Boot to be most effective, there are certain conditions which should also be met. The most important are:

  1. The UEFI firmware is protected by a strong password to prevent an untrusted drive from being booted or Secure Boot being disabled.
  2. Full disk encryption is enabled so that your drive cannot simply be read by putting it another another machine.
  3. Ideally, default OEM/third party keys are not in use as these have been shown to weaken the security of Secure Boot significantly.[1] However, this may brick some devices which use Microsoft-signed OpROMS for certain hardware during the boot process, particularly some laptops, so you must be certain before removing them. It may be impossible to fix if, for example, the GPU relies on these OpROMS.

See Also

Arch Wiki/Secure Boot Extensive information on Secure Boot including using UKIs.