Enabling Secure Boot in MX Linux

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Message
Author
User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: Enabling Secure Boot in MX Linux

#11 Post by fehlix »

Perhaps, you "still" might not know, we have a nice Chroot-Rescue-Scan available from the Whisker menu.
Suggest, to provide MX-Recipes with using MX Tools, no need to extra install tools, which are already available.

In addition, for anyone who just wants to try secure boot out, the procedure provided might create non-bootable menu entries, for other installed systems. Mainly due to the fact that the os-prober used by MX was adjusted to allow the generation of valid Manjaro Grub-menu-entries. So you would either need also to "downgrade" os-prober, which would give you unbootable manjaro entries - or manual adjust the generated invalid menu-entries.
:puppy:

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: Enabling Secure Boot in MX Linux

#12 Post by Head_on_a_Stick »

fehlix wrote: Fri Jun 05, 2020 12:26 pmSuggest, to provide MX-Recipes with using MX Tools, no need to extra install tools, which are already available.
I'm not sure how the Chroot-Rescue-Scan tool would be useful for enabling Secure Boot :confused:

The guide originally advised using arch-chroot(1) from the live system but that was only because I copy&pasted it from a thread wherein the user could not boot their system at all. I've since modified it to work without that step.
fehlix wrote: Fri Jun 05, 2020 12:26 pmfor anyone who just wants to try secure boot out, the procedure provided might create non-bootable menu entries, for other installed systems. Mainly due to the fact that the os-prober used by MX was adjusted to allow the generation of valid Manjaro Grub-menu-entries.
My guide does not change the installed version of the os-prober package so workable Arch-based menu entries should still be present (AFAICT).

That problem is currently being worked on upstream: https://bugs.debian.org/cgi-bin/bugrepo ... bug=820838
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: Enabling Secure Boot in MX Linux

#13 Post by fehlix »

Head_on_a_Stick wrote: Fri Jun 05, 2020 12:54 pm
fehlix wrote: Fri Jun 05, 2020 12:26 pmfor anyone who just wants to try secure boot out, the procedure provided might create non-bootable menu entries, for other installed systems. Mainly due to the fact that the os-prober used by MX was adjusted to allow the generation of valid Manjaro Grub-menu-entries.
My guide does not change the installed version of the os-prober package so workable Arch-based menu entries should still be present (AFAICT).
[/code]
I have only tested with manjaro, and our mx-osprober works closely with mx-grub.
Head_on_a_Stick wrote: Fri Jun 05, 2020 12:54 pm That problem is currently being worked on upstream: https://bugs.debian.org/cgi-bin/bugrepo ... bug=820838
Well, early-initrd's are already officially supported by grub2.04, but only debian seems not to have it adjusted, accordingly, yet.
It works with MX-grub/os-prober already.

User avatar
Stevo
Developer
Posts: 14452
Joined: Fri Dec 15, 2006 7:07 pm

Re: Enabling Secure Boot in MX Linux

#14 Post by Stevo »

The virtualbox in the repo is fully open source, not proprietary, so is it just that its modules don't get signed anyway after building? What about other open DKMS drivers, such as ZFS?

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: Enabling Secure Boot in MX Linux

#15 Post by Head_on_a_Stick »

Stevo wrote: Fri Jun 05, 2020 11:17 pmThe virtualbox in the repo is fully open source, not proprietary, so is it just that its modules don't get signed anyway after building?
Yes, that is correct.
Stevo wrote: Fri Jun 05, 2020 11:17 pm What about other open DKMS drivers, such as ZFS?
No, ZFS won't work in Debian with Secure Boot enabled. I tried it already :frown:
fehlix wrote: Fri Jun 05, 2020 12:26 pmthe os-prober used by MX was adjusted to allow the generation of valid Manjaro Grub-menu-entries
I have some good news and some bad news about that...

On the up side my suggested changes do not break MX's os-prober modifications and the system will still generate bootable entries for Arch-based systems with the CPU µcode package installed.

The bad news is that MX's os-prober modifications *do not* create a boot entry that actually loads the CPU µcode and so any Arch-based systems booted from MX's GRUB will not be loading the µcode.

A correct Arch-based boot entry would look like this (example shows an AMD system):

Code: Select all

echo 'Loading initial ramdisk'
initrd /boot/amd-ucode.img /boot/initramfs-linux.img
https://wiki.archlinux.org/index.php/Microcode#GRUB

But MX generates an entry like this:

Code: Select all

echo 'Loading initial ramdisk'
initrd /boot/initramfs-linux.img
^ That is wrong.
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: Enabling Secure Boot in MX Linux

#16 Post by fehlix »

Head_on_a_Stick wrote: Sat Jun 06, 2020 6:36 am But MX generates an entry like this:

Code: Select all

echo 'Loading initial ramdisk'
initrd /boot/initramfs-linux.img
^ That is wrong.
Yes, with having installed buster's grub-common, it will have overwritten

Code: Select all

/etc/grub.d/30_os-prober
So you might adjust your receipt by adding this post-install procedure, after having installed
buster secure-boot enabled grub's:

Code: Select all

cp /usr/local/share/live-files/files/etc/grub.d/30_os-prober /etc/grub.d/30_os-prober
And in case os-prober have been also "downgraded" to buster's version one would need restore this file:

Code: Select all

/usr/lib/linux-boot-probes/mounted/40grub2
from MX provided os-prober version ( 1.77mx19+1)
which shall then generate proper grub entry for arch special early-initrd handling.
Or alternatively, as a pre-procedure, backup-both files and restore after secure-boot installation.
HTH
:puppy:

User avatar
Head_on_a_Stick
Posts: 919
Joined: Sun Mar 17, 2019 3:37 pm

Re: Enabling Secure Boot in MX Linux

#17 Post by Head_on_a_Stick »

fehlix wrote: Sat Jun 06, 2020 7:47 amwith having installed buster's grub-common, it will have overwritten
No, you misunderstand.

I have tested MX-19's os-prober by installing both MX-19 and Arch on the same (virtual) disk, the quoted incorrect menuentry was generated by the stock MX-19 system. I had not made any changes to that system at all.
mod note: Signature removed, please read the forum rules

User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: Enabling Secure Boot in MX Linux

#18 Post by fehlix »

Head_on_a_Stick wrote: Sat Jun 06, 2020 8:10 am
fehlix wrote: Sat Jun 06, 2020 7:47 amwith having installed buster's grub-common, it will have overwritten
No, you misunderstand.

I have tested MX-19's os-prober by installing both MX-19 and Arch on the same (virtual) disk, the quoted incorrect menuentry was generated by the stock MX-19 system. I had not made any changes to that system at all.
Oh, that would be another thread :footinmouth: . I have tested with Manjaro. Will check what arch does differently.

User avatar
asqwerth
Developer
Posts: 7782
Joined: Sun May 27, 2007 5:37 am

Re: Enabling Secure Boot in MX Linux

#19 Post by asqwerth »

I don't know if this is relevant, but Manjaro itself has modified its grub package, so that it's not using the same grub that Arch does.

https://forum.manjaro.org/t/call-for-te ... lla/100190

Users who don't want Manjaro's grub package and prefer the "normal" one that Arch uses, have to replace it with grub-vanilla package.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
fehlix
Developer
Posts: 12626
Joined: Wed Apr 11, 2018 5:09 pm

Re: Enabling Secure Boot in MX Linux

#20 Post by fehlix »

asqwerth wrote: Sat Jun 06, 2020 10:08 am I don't know if this is relevant, but Manjaro itself has modified its grub package, so that it's not using the same grub that Arch does.

https://forum.manjaro.org/t/call-for-te ... lla/100190

Users who don't want Manjaro's grub package and prefer the "normal" one that Arch uses, have to replace it with grub-vanilla package.
Thanks. That's probably easier to test using manjaro with vanilla grub.

Post Reply

Return to “Tips & Tricks by users”