drakkar-lig / debootstick

Generate a bootable live image from any Debian/Ubuntu filesystem tree.
62 stars 18 forks source link

secureboot supported? #33

Closed khimaros closed 2 years ago

khimaros commented 3 years ago

can debootstick be used to generate images which will boot successfully with secureboot enabled bios? i am particularly interested using this for debian bullseye images.

eduble commented 3 years ago

Hello, Currently no. I am not familiar with secureboot procedure, so a contribution on this would be very welcome.

Debootstick images are able to boot on UEFI and BIOS systems, and they allow patterns where other systems will not work. For instance, the following scenario would work: 1) boot image on a BIOS system 2) apply software updates, including kernel 3) boot image on a UEFI system

Official images fail at step 2, because boot files are read-only (and not handled by the package manager); whereas the OS installed on a debootstick image is installed the same way as it would be installed on a disk. And a trick is used to allow booting on both UEFI and BIOS (because you cannot install both UEFI and BIOS grub packages on the same OS, they conflict).

It works as follows:

This allows to share the configuration file managed by grub-pc package to both boot methods (thus to boot an updated kernel for instance).

Since secureboot is tied to UEFI booting, I wonder if it would not be possible to reverse this trick: install UEFI grub package in OS (instead of grub-pc), with added files to allow secureboot; and have a static BIOS grub installation which would load /boot/grub/grub.cfg on the OS partition).

eduble commented 3 years ago

@khimaros I have updated debootstick boot management and Secure-Boot should be working now. This update is not in master branch yet: if you want to test it, use branch secure-boot. Thanks Etienne