Wren Linux

wren-linux / docs / bios.md (as plain text)

Setting up the BIOS (UEFI firmware)

The BIOS, on any computer from the last ten years really UEFI firmware, is what runs before any operating system: it decides what may start, from which disk, and which devices exist at all.

Wren Linux can't change these settings from inside; you set them once, by hand. This page says which ones matter for installing Wren Linux, and which make any computer harder to tamper with.

Every maker names and places these settings differently. The words below are the common ones; look for something close. When unsure, leave a setting as it is: none of them is worth a computer that won't start.

Getting into it

Restart and press the setup key over and over as the maker's logo shows: usually F2 or Del; F1 or Enter on Lenovo, Esc then F10 on HP, F2 on Dell.

A second key opens a one-time boot menu (often F12, F9, F11 or Esc) to start from a USB stick once, without changing the boot order.

If Windows is installed, Fast Startup can skip the keys: hold Shift while choosing Restart, then Troubleshoot > UEFI Firmware Settings.

For a Wren Linux install

In this order:

  1. Update the firmware first, from the maker's support page for your exact model. Updates fix security holes that no operating system can, and a later update can reset your settings, so do it before the rest. (After the install Debian's fwupd can update many computers; not all makers support it.)

  2. Boot mode: UEFI only. Switch off "CSM", "Legacy" or "Legacy boot support". Debian's installer, and Wren Linux's install stick, start in either mode, but Secure Boot needs UEFI, and so does the rest of this list.

  3. Secure Boot: on, with the maker's own keys ("Standard" or "Factory" keys, not "Setup mode" or "Custom"). Debian's boot loader and kernel are signed for it, and Wren Linux uses them unchanged, so it starts as Debian does.

    A kernel module built on your computer (DKMS: some Wi-Fi drivers, NVIDIA's own driver) won't load with it on until you enroll a key for it (mokutil); Wren Linux's own scripts need none.

  4. Storage: AHCI, not "RAID" or "Intel RST/VMD". With RST the installer often can't see the disk at all. (On a computer that also runs Windows, changing this makes Windows fail to start until it is set up for AHCI.)

  5. Virtualization: on. "Intel VT-x" or "AMD-V" (sometimes "SVM"), and "VT-d" or "AMD-Vi"/"IOMMU". The first lets claude-vm, whonix and other virtual machines run; the second lets the kernel keep devices from reading memory they weren't given (see Thunderbolt below).

  6. Fast Boot: off, at least for the install: with it on, many computers skip the USB ports and the keyboard before the boot loader, so the stick and the setup key go unseen.

  7. Start from the stick with the one-time boot menu (choose the entry starting with "UEFI:"), and install.

  8. Afterwards, back in the BIOS: put the internal disk first, switch off booting from USB and from the network, and set the supervisor password (below). From then on, starting from a stick needs that password.

Check from Wren Linux, in a terminal:

[ -d /sys/firmware/efi ] && echo "started with UEFI"
sudo dmesg | grep -i 'secure boot'      # "Secure boot enabled" when it is on
grep -cE 'vmx|svm' /proc/cpuinfo         # above 0: the CPU can run VMs
ls /dev/kvm                              # exists: virtualization is switched on

For security, on any computer

Passwords

What may start

Devices you don't use: off in the firmware

The firmware's switch makes the device absent: nothing running on the computer can switch it back on, unlike Wren Linux's microphone and webcam switches, which are software (see THREAT-MODEL.md).

Common ones: the webcam, the microphone, Bluetooth, a mobile broadband (WWAN) card, the fingerprint reader, the SD card reader, Wake on LAN, and Thunderbolt if you never use it. Unused USB ports can go too, where the firmware offers it.

Where to look: on ThinkPads these switches are under Security → I/O Port Access (microphone, webcam, Bluetooth, WWAN, fingerprint reader, memory card slot, Thunderbolt and others); other makers use other names, often under "Security", "Advanced" or "Onboard devices".

Be aware that on some computers, switching the microphone off also hides the whole audio controller, speakers and headphone jack included, because they are one device. If sound disappears after you do, that is why: look for a separate "Audio" entry, or use a USB or Bluetooth headset. Wren Linux then sees no sound hardware and shows no microphone switch, which is correct: there is nothing to mute.

Thunderbolt and other ports that can read memory

A Thunderbolt (or USB4) device can ask to read the computer's memory directly.

If you use the port, set its security to "User Authorization" or "Secure Connect" rather than "No security", and switch on "Kernel DMA protection" or "Pre-boot DMA protection" with the IOMMU (VT-d/AMD-Vi, above). parts/boot-hardening.sh then has Linux use the IOMMU in its strict mode.

Wren Linux already blocks FireWire, the older port that could do the same.

Remote management and tracking agents

Tamper signs

A checklist

SettingWren Linux installNotes
Firmware updatedfirstfrom the maker, for this model
Boot modeUEFI onlyCSM / Legacy off
Secure Bootonfactory keys
Storage modeAHCInot RAID / RST
VT-x / AMD-V, VT-d / IOMMUonVMs; DMA protection
Fast Bootoffthe stick and keys are seen
Boot orderinternal disk firstUSB and network boot off after the install
Supervisor passwordsetwritten down, kept safe
BIOS updatespassword-protectedrollback protection on
ThunderboltUser Authorization, or offKernel DMA protection on
Unused devicesoffwebcam, mic, Bluetooth, WWAN, ...
Intel AMT, Absoluteoff
Wake on LANoff
Chassis intrusiononwhere there is one

What this doesn't protect

More on the physical side, and the rest: opsec.md.