Compare commits

..

4 commits

Author SHA1 Message Date
ItsDrike eefda2047d
Update secure boot docs 2024-06-23 17:06:01 +02:00
ItsDrike 4f5aa6c33d
Add e2fsprogs cli pkg 2024-06-23 16:54:46 +02:00
ItsDrike 8254d6ee63
Fix typo in secure boot docs 2024-06-23 16:54:17 +02:00
ItsDrike d1ec187cba
Fix typo in bootctl command (docs) 2024-06-23 16:35:21 +02:00
2 changed files with 18 additions and 8 deletions

View file

@ -12,7 +12,7 @@ As a first step, you will want to confirm that you really are on a UEFI system.
this is very likely the case. Nevertheless, let's check and make sure: this is very likely the case. Nevertheless, let's check and make sure:
```shell ```shell
bootctl info bootctl status
``` ```
Make sure the `Firmware` is reported as `UEFI`. Make sure the `Firmware` is reported as `UEFI`.
@ -36,8 +36,9 @@ boot.
> fact, if someone is able to get a hold of your machine, they can simply pull out the CMOS battery, which usually > fact, if someone is able to get a hold of your machine, they can simply pull out the CMOS battery, which usually
> resets the UEFI. That means turning off Secure Boot, and getting rid of the BIOS password. > resets the UEFI. That means turning off Secure Boot, and getting rid of the BIOS password.
> >
> While UEFI is generally a good extra measure to have, it is by no means a reliable way to really prevent others from > While Secure Boot is generally a good extra measure to have, it is by no means a reliable way to really prevent
> ever being able to boot untrusted systems, unless you use a specialized motherboard, which persists the UEFI state. > others from ever being able to boot untrusted systems, unless you use a specialized motherboard, which persists the
> UEFI state.
## Create your keys ## Create your keys
@ -60,8 +61,8 @@ permissions of the secret key so that only root can read it.
## lanzaboote ## lanzaboote
`lanzaboote` is a tool to help you set up secure boot in NixOS. To install it, you can add `lanzaboote` is a tool to help you set up secure boot in NixOS. To install it, you can add it as an input for your
it as an input for your flake: flake:
```nix ```nix
lanzaboote = { lanzaboote = {
@ -110,7 +111,8 @@ Note that you shouldn't really need to use this.
## Enabling secure boot ## Enabling secure boot
Now that NixOS is ready for secure-boot, we will set up firmware. At the end of this section, Secure Boot will be enabled on your system and your firmware will only boot binaries that are signed with your keys. Now that NixOS is ready for secure-boot, we will set up firmware. At the end of this section, Secure Boot will be
enabled on your system and your firmware will only boot binaries that are signed with your keys.
### Enter Setup mode ### Enter Setup mode
@ -137,11 +139,18 @@ You will now have to enroll your new keys to activate Secure Boot.
sudo sbctl enroll-keys -m sudo sbctl enroll-keys -m
``` ```
> [!NOTE] > [!WARNING]
> The `-m` option (also known as `--microsoft`) will make sure to also include the Microsoft > The `-m` option (also known as `--microsoft`) will make sure to also include the Microsoft
> signing keys. This is required by most motherboards, not using it could brick your device. > signing keys. This is required by most motherboards, not using it could brick your device.
This should automatically enable secure boot in user mode for you. You can now reboot the system. > [!NOTE]
> If you encounter "File is immutable" warnings after running sbctl, it should be safe to simply add the `-i` (or
> `--ignore-immutable`) flag, which will run `chattr` and remove the immutable flags from these files for you.
>
> If you still encounter errors even with this flag, it means you have probably done something wrong when entering the
> setup mode. Try looking for a option like "Reset keys" in your UEFI, then try this again.
This should automatically enable secure boot in user mode for you. You can now **reboot the system**.
### Make sure it worked ### Make sure it worked

View file

@ -23,6 +23,7 @@
curl # CLI tool for transfering data with URLs curl # CLI tool for transfering data with URLs
lm_sensors # tools for reading hw sensors lm_sensors # tools for reading hw sensors
p7zip # 7zip fork with some improvements p7zip # 7zip fork with some improvements
e2fsprogs # tools for creating and checking ext filesystems
# Rust replacements # Rust replacements
procs # better ps procs # better ps