Most active commenters
  • ChocolateGod(5)
  • pbhjpbhj(3)

←back to thread

253 points pabs3 | 33 comments | | HN request time: 1.942s | source | bottom
1. saidinesh5 ◴[] No.44601960[source]
Just out of curiosity, how good is the secure boot experience these days?

I've had to disable it on all my installations because of either nvidia drivers or virtual box modules. In general Arch based distros didn't seem too friendly for secure boot set up.

replies(11): >>44602000 #>>44602120 #>>44602279 #>>44602520 #>>44602559 #>>44602593 #>>44602696 #>>44602761 #>>44602773 #>>44603004 #>>44607063 #
2. bravetraveler ◴[] No.44602000[source]
Signature maintenance for modules can be fully automated. Enrollment requires navigating a mildly-intimidating interface a single time to accept the new PKI.

Fine for systems you physically manage, anything remote in a datacenter I wouldn't bother (without external motivation)

replies(1): >>44602333 #
3. paulv ◴[] No.44602120[source]
My experience as a long time Linux user (since 1997, so admittedly stuck with some bad habits from when things were actually hard to get working) has been that things are kind of confusing if you deviate from the golden path, but if you are on the golden path you won't ever notice that it is turned on.

The laptops I have gotten from eg Dell with Linux pre installed have just worked. Machines I have upgraded through many versions of Ubuntu (lts versions of 16-24) were weirdly broken for a while when I first turned secure boot on while I figured it out, but that seemed reasonable for such a pathological case. Machines I have installed Debian on in the last few years have been fine, except for some problems when I was booting from a software raid array, but that is because I was using 2 identical drives and I kept getting them confused in the UEFI boot configuration.

I have not used them on machines with nvidia, vbox, or other out-of kernel-tree modules though.

4. pbhjpbhj ◴[] No.44602279[source]
Every couple of years MS do an update that messes up multi-boot/dual boot. I'm sure it's on purpose at this point, and relatively sure "Secure Boot" is how they achieve it.

Still on Windows only for kids games. Linux user since last millennium.

replies(2): >>44602385 #>>44602403 #
5. mormegil ◴[] No.44602333[source]
Which is strange because secure boot should be useful in _exactly_ the situation you don't have physical control of the HW, shouldn't it? I guess the threat model for a common not-that-important company does not include evil data center (and it's dubious if SecureBoot would protect you in reality), but wasn't that one of the motivations?
replies(3): >>44602388 #>>44602396 #>>44602630 #
6. blkhawk ◴[] No.44602385[source]
As a Linux-only gamer since 2019 I wonder what kids games you are talking about?
replies(2): >>44602555 #>>44604378 #
7. bravetraveler ◴[] No.44602388{3}[source]
Aye, though an evil maid has higher barriers and more paperwork in a DC.

I hesitate based on that mitigation and the untold operational pain. Sometimes it's worth it, other times it isn't.

8. ChocolateGod ◴[] No.44602396{3}[source]
Well you can tie it to TPM to store your encryption key which should only produce the key when the boot parameters match the key. This is what Windows already does but its not fully supported under Linux and somewhat insecure as you can't encrypt the initramfs (so someone can infect boot process there instead).
replies(2): >>44602912 #>>44603086 #
9. ChocolateGod ◴[] No.44602403[source]
> Every couple of years MS do an update that messes up multi-boot/dual boot

IIRC the last time this happened it was the fault of Linux distros not updating their packages, it was just a Microsoft update updating the security requirements that affected distros that were caught slacking.

replies(2): >>44603512 #>>44603534 #
10. chaz6 ◴[] No.44602520[source]
I use Fedora and have it enabled. Every time there is a kernel update I have to run a script to re-compile and sign the vmware drivers. I could probably figure out how to do it with dkms at some point. Every now and then, there's a kernel change big enough to make the vmware drivers stop working so I have to get a new patch.
11. repstosb ◴[] No.44602555{3}[source]
There are things like Roblox that are really only usable under Windows due to a perverse idea of what "anti-cheat" should look like.
replies(2): >>44602892 #>>44603121 #
12. michaelt ◴[] No.44602559[source]
I would rate the experience as 6.5/10

If you use a major distro like Ubuntu, you might find Secure Boot works out-of-the-box, with no need to dick about with 'machine owner keys' and suchlike.

Ubuntu has packages like "linux-modules-nvidia-550-generic" containing a version of nvidia's 550 drivers signed with canonical's keys. If the stars align and that package gets installed, you'll have nvidia drivers that work under secure boot.

They also have a second mechanism. You can set up a 'machine owner key' (MOK) then software updates will trigger automatically building new nvidia kernel modules, using 'dkms' then sign them with the MOK allowing them to work under secure boot.

The problem is this process can be a bit wonky. The MOK setup process involves rebooting and going through the "MOK Manager", an interface that looks like something from the 1980s. If you didn't know to expect it, or what it's there for, or you don't speak English, it's easy to hit the wrong thing and not set up your MOK. And it only shows up for a single boot, unless you know an arcane terminal command.

And if you run into any problems during the setup process - you're going to be researching the fix on your phone, because your PC isn't booting.

Meanwhile, the third option of just turning off secure boot is easy (assuming you know what the BIOS is) and it works every time. So a lot of 'how to set up nvidia drivers' guides just recommend doing that.

Although I complain about it, I find it impressive things like dynamically compiling and signing kernel modules works as well as it does - especially as so much of it is maintained by volunteers, selflessly giving up their free time when they could have simply turned off secure boot in their BIOS too.

replies(1): >>44622936 #
13. icar ◴[] No.44602593[source]
With Arch, I've been using SecureBoot since sbctl [0] was released with 0 issues. Granted, I don't use any Nvidia hardware.

[0] https://github.com/Foxboron/sbctl

14. michaelt ◴[] No.44602630{3}[source]
> Which is strange because secure boot should be useful in _exactly_ the situation you don't have physical control of the HW, shouldn't it?

One of the ways you can introduce your own signing key is as a Machine Owner Key, using the "MOK Manager"

But a design goal of this software was: We don't want malware with root to be able to introduce a MOK without the user's consent, as then the malware could sign itself. So "MOK Manager" was deliberately designed to require keyboard-and-mouse interaction, early in boot before the network has been brought up.

Of course if your server has a KVM attached, you can still do this remotely, I guess.

15. EnPissant ◴[] No.44602696[source]
UKI + secure boot works really well, but it is somewhat manual of a set up on Arch (what isnt).

If properly set up the only files you generate are:

- /efi/loader/random-seed

- /efi/EFI/Linux/arch-linux.efi

- /efi/EFI/Linux/arch-linux-fallback.efi

and the .efi are all automatically signed by hooks.

You can even skip a bootloader and boot the images directly.

replies(1): >>44611213 #
16. CoolCold ◴[] No.44602761[source]
just doublechecked with "Confirm-SecureBootUEFI" - says True on my laptop which used > 1 year. I'm pretty sure on the previous system which was used for 4 years it was on too - have not noticed any issues.

Windows 10 and then 11

17. jeroenhd ◴[] No.44602773[source]
It works pretty well out of the box unless you're trying to combine Linux with Nvidia hardware. Even with Nvidia hardware it doesn't take that much effort to make it work, but as usual, Nvidia requires taking extra steps.

What Linux is really lacking is a user-friendly method for enrolling your own keys, which would instantly solve all the Nvidia/firmware updater/custom bootloader problems. The command line tools are slowly getting easier to use, but there's no guided instruction flow.

18. blkhawk ◴[] No.44602892{4}[source]
ah, I almost mentioned roblox but checking protondb it has gold status. So it should work?
19. the8472 ◴[] No.44602912{4}[source]
With a UKI the initramfs gets signed too, doesn't it?
20. vbezhenar ◴[] No.44603004[source]
I'm using Arch and it was very easy to configure secure boot. I don't know why you think it's not friendly. I'm using UKI, so no bootloader at all, my UKI is signed by my own key which is installed into UEFI. Most of sign process is handled by systemd, so most of it is already integrated into the base system.
21. vbezhenar ◴[] No.44603086{4}[source]
There are ways to solve that issue. But I think that you're correct, pinpointing the core issue with popular Linux distributions. It doesn't have to be this way, though.

1. You can sign and verify initramfs, it's supported by bootloaders.

2. You can merge kernel and initramfs into UKI and sign the whole image.

I don't know why that's not implemented.

replies(1): >>44623428 #
22. 71bw ◴[] No.44603121{4}[source]
https://sober.vinegarhq.org/
replies(1): >>44604272 #
23. account42 ◴[] No.44603512{3}[source]
The idea that MS should be able make orders that distros then have to follow is insane. If MS breaks something it absolutely is their fault.
replies(1): >>44623400 #
24. noAnswer ◴[] No.44603534{3}[source]
So Windows installs something that brakes Linux boot. How are you supposed to boot Linux to install a fix? Am I expected to reboot into a different OS twice a day and check for updates? Am I slacking for not doing so?!
replies(1): >>44623412 #
25. pbhjpbhj ◴[] No.44604272{5}[source]
I can confirm Sober works really well, possibly slightly smoother than the Windows client.

I couldn't get it to run via Proton/Wine at all.

26. pbhjpbhj ◴[] No.44604378{3}[source]
I've stopped trying to fight to install things on Linux. Anything with kernel level anticheat it seems is torment. They okay Fortnite, and quite a bit of Marvel Rivals (which initially worked, then stopped, I see reports suggesting it's working again but I don't have time to be full-time support to keep things running smoothly).

We do use Kubuntu for games that run in it without drama - Risk of Rain, Roblox (via Sober), browser games, CS2.

They also are expected to use Microsoft Office for school (UK), it's possible to work that online, but the experience is worse, slower, more prone to issues it seems.

Fwiw, I've been a Linux distro user for decades and was Linux only until the first child got to highschool. Microsoft's "educational" policy works for them!

27. Avamander ◴[] No.44607063[source]
One checkbox during install when using Ubuntu with custom DKMS modules. That's it. For the past five or more years.
28. IHawkMike ◴[] No.44611213[source]
I just finished setting this up and it's definitely this easy. The hardest part was growing the ESP to dual boot with Windows but that is basically just copy/paste the files to a bigger partition and change the partition type GUIDs.

Most of the guides focus on creating the PK, KEK, and db certs for enrolling/updating certs from userspace with signed .auth files but that is kind of pointless and seriously over-complicates it. I just created a 20-year db key pair with openssl (and PK and KEK just to make sbctl happy due to a bug), then installed the public db cert into the UEFI manually via the ESP. Didn't even need to use setup mode, although I suspended BitLocker on the Windows partition to let it reseal its key with the new PCR 7 measurement after the db update.

To finish securing it I have a separate key for PK and KEK and have already installed Microsoft's 2023 UEFI certs in the db (and added the 2011 cert to dbx with the updated bootmgr).

replies(1): >>44613963 #
29. EnPissant ◴[] No.44613963{3}[source]
I just used sbctl to generate and install a platform key in setup mode. It worked well.
30. charcircuit ◴[] No.44622936[source]
Mok has a big problem where malware can get you to sign malicious code with it. Having the signing keys be accessible to the end user is dangerous.
31. ChocolateGod ◴[] No.44623400{4}[source]
No it's not. Microsoft has to disable outdated and vulnerable signed bootloaders to stop them being used for secure boot bypasses. Microsoft worked with RH to get things updated which they did, it's just distros for caught slacking and were shipping an outdated vulnerable boot loader.

I know it's the norm to bash Microsoft and they do a lot of crappy things, but in this case it was just certain distros not taking security updates seriously, which is why a lot never broke (such as Fedora)

32. ChocolateGod ◴[] No.44623412{4}[source]
No, Windows updated a UEFI component that disables outdated and vulnerable bootloaders to stop them being used as secure boot bypasses.
33. ChocolateGod ◴[] No.44623428{5}[source]
For UKI I imagine a big hurdle is the size of the images (given /boot/efi is usually only big enough for bootloaders, not kernels and initram) and custom kernel modules (e.g. Nvidia).

There was some systemd work on a spec for a boot partition to extend the efi partition for storing kernel images and initramfs, but I don't think any distro currently defaults to it on.

I think hibernation is currently also broken, since the hibernation file is stored unencrypted by default and thus can't be used with secure boot.