Aggiornamento del bootloader

bootupd

L’aggiornamento del bootloader non è attualmente automatico. Il progetto [bootupd](https://github.com/coreos/bootupd/) è incluso in Fedora CoreOS e può essere utilizzato per aggiornamenti manuali.

Questo è generalmente rilevante solo in scenari di metallo nudo o su hypervisor virtualizzati che supportano il Secure Boot. Un esempio di motivo per aggiornare il bootloader è la [vulnerabilità BootHole](https://eclypsium.com/2020/07/29/theres-a-hole-in-the-boot/).

Al momento, solo la partizione di sistema EFI (e non il BIOS MBR) può essere aggiornata da bootupd.

Verifica lo stato del sistema:

# bootupctl status
Component EFI
  Installed: grub2-efi-x64-1:2.04-31.fc33.x86_64,shim-x64-15-8.x86_64
  Update: At latest version
#

If an update is available, use bootupctl update to apply it; the change will take effect for the next reboot.

# bootupctl update
...
Updated: grub2-efi-x64-1:2.04-31.fc33.x86_64,shim-x64-15-8.x86_64
#
Example systemd unit to automate bootupd updates
variant: fcos
version: 1.6.0
systemd:
  units:
    - name: custom-bootupd-auto.service
      enabled: true
      contents: |
        [Unit]
        Description=Bootupd automatic update

        [Service]
        ExecStart=/usr/bin/bootupctl update
        RemainAfterExit=yes

        [Install]
        WantedBy=multi-user.target

Using images that predate bootupd

Older CoreOS images that predate the existence of bootupd need an explicit "adoption" phase. If bootupctl status says the component is Adoptable, perform the adoption with bootupctl adopt-and-update.

# bootupctl adopt-and-update
...
Updated: grub2-efi-x64-1:2.04-31.fc33.x86_64,shim-x64-15-8.x86_64
#

Future versions may default to automatic updates

It is possible that future Fedora CoreOS versions may default to automating bootloader updates similar to the above.