[How to] Zorin and Secure Boot

What is Secure Boot?
Secure Boot is a measure to secure the boot process against tampering.

How is it set up?
Zorin supports Secure Boot enrollment during installation. Make sure to set Secure Boot as enabled in the UEFI before starting the installation.
If you run into any problems, reset the UEFI and/or Secure Boot to factory defaults/clear any keys, and disable & re-enable Secure Boot. Make sure to enable the Microsoft certificate.

During the installation wizard, you'll be asked to provide a Secure Boot password, it needs to be 8-16 characters. It does not need to be complex or stored for a long time, however during the first reboot after installation you'll be greeted with a blue screen. After 10-15 seconds the machine might or might not continue booting, so it is important to 'catch' it in time.
The second option should read 'Enroll MOK', press Enter.
The first option should read 'view key 0', press Enter.
Here you can see the details about the key. Pressing Enter again brings you back to the previous screen.
The second option should read 'Continue', press Enter and confirm enrolling with [yes].
Type in the previously set password. After this, the password can be discarded.
Press [Reboot] and start using Zorin!

You can check the status of Secure Boot while logged in, by running mokutil --sb-state. It should return:
SecureBoot enabled
After enabling Secure Boot and finishing up your installation, make sure to disable booting from an external USB, and locking down the UEFI with a strong password to further reduce the attack surface.

2 Likes

Is this still correct?

I've installed Zorin on two devices, moving away from Windows, and have never seen an option to provide a Secure Boot password during installation.

I also couldn't find any documents on secure boot in the 'Zorin OS Desktop Guide' documentation.

1 Like

Hi and Welcome. For a good extensive look at Secure Boot I recommend reading this post:

and as Zorin 17_is based on Ubuntu 22.04:

1 Like

Secure boot is a Microsoft feature, and is not necessary or required for Linux, unless your operating a high security computer in the government sector. For a person who just operates a computer from home, all Secure Boot will do, is cause you loads of problems, where you will be pulling your hair out.


5 Likes

Much agreed with StarTreker - just to see if I could do it, I got it working with my laptop but.. every Nvidia update needed a password and then booting into the secure boot to proceed with the install and it was just an absolute headache..

Home users - definitely would suggest leaving SecureBoot off; it only causes more troubles than it helps.

5 Likes

The problem to the Secure Boot password not appearing during Zorin install was that, on boot, I booted from 'USB - [manufacturer]', instead of 'UEFI: [manufacturer], Partition 1'.

Once I booted using the UEFI option, the option to enter a Secure Boot password on Zorin install appeared.

Posters after me were right, though, in that I asked how to do this, not should I do this. All a part of the learning experience. Special thanks to @swarfendor437; the first link on EFI boot loaders was really educational.

2 Likes

I'm sorry but I'm pretty saddened that this myth is still doing its rounds.
Secure Boot is not a Microsoft feature. It is a general feature, Linux was just late to the game and there isn't any distro that has implemented it entirely yet. Zorin is very close, but no cigar at this point.

Everyone and their mother should use Secure Boot, (as well as Measured Boot, otherwise it is still incomplete and thus insecure), since a Linux desktop without it, is much less secure than any Windows installation, even with Full Disk Encryption enabled. This is because without SB&MB, it is trivial to infect the kernel and install a keylogger, which scoops up the FDE passphrase the next time the legitimate user boots the system. Yes, this requires at least physical access once, staying unnoticed, to the machine to manipulate it.

But with the advent of Artificial Intelligence, those kind of attacks are steadily moving from "knowledgeable hacker" to "script kiddie" and now lowering further to "random university dorm creep".
To my opinion, these attacks have never really been only reserved for nation state attackers. Especially with certain professions, like doctors, psychologists, lawyers or security researches, just using FDE is in my opinion insufficient, because it could be that a person is an interesting enough of a target to warrant such an attack. And as I mentioned, I only see the possibility of that increasing since it's becoming more and more available to the average person to execute such an attack.

Yes, Microsoft has a very strong foothold on SecureBoot, since hardware manufacturers basically only ship TPM-hardware with Microsoft keys by default. That is all. But Secure Boot is not Microsoft-exclusive, as Zorin proves this with very reliable MOK enrollment.

This kind of understanding and opinions on these security measures will keep Linux from achieving its full potential. I simply refuse to use an OS that is less secure than Windows, and I'm a nobody. I can already expect comments "you're not interesting enough, you don't need that".

Thank you for your opinion, but I lay those comments beside me. To my opinion, those statements also strongly undermine active Linux development to become an actually safe and mature desktop OS that is as secure, if not more secure than Windows. Because you directly or indirectly tell others, users and developers, that there is no need desire to have Secure Boot/Measured Boot on Linux, which has led to the situation where we are right now;

Linux is still 10 years behind Windows and Mac, while all the tools and methods are available to achieve this. It's just that no distro has fully implemented this, outside of Arch Linux maybe, if someone chooses to set it up that way. (I played around with Arch, and achieved Secure Boot + Measured Boot but I like a Debian-based distro more).

Zorin just needs to implement UKI, then it's basically there. I made a thread in the feedback section: Zorin is really good; it's only missing a Unified Kernel Image

Some closing remarks.

  • I'm aiming mainly for personal/professional desktop(laptop)/office use. If Zorin wants to become the Windows alternative for small and medium business, or local governments, this should be implemented. If not yet, I expect any CISO worth their salt to require this today or tomorrow.
  • Gaming for me is totally out of scope related to this security requirement. I know that makes a lot of stuff more difficult, but you can just game on a separate game PC with Windows or Bazzite or use a game console.
  • Same with Dual Boot or other requirements that make it more difficult to achieve.

MOK should be made password-less maybe though, to simplify software updates. Other than that, having to run another MOK enrollment, even once a month, after an update, is not a problem to me.

2 Likes

I am new to Linux but, I have to say I find a lot of helpful information on this blog and others . Thank you all . :+1:

I would also like to add that I needed to turn Secure Boot off in BIOS to install Zorin 18 as having it on crashed during install.

After installing Zorin OS 18, I turned Secure Boot Back on.

Verified Secure Boot was on with command: mokutil --sb-state

Now at this point my Secure boot certificates were not enrolled in the MOK.

Perform the following steps after turning secure boot on:

1.) Check if Secure Boot certs are already on computer:

ls -lah /var/lib/shim-signed/mok/ ----> Directory listing secure boot key folder

There should be 3 files:
-rw-r--r-- 1 root root  919 Feb 13 08:30 MOK.der
-rw------- 1 root root 1.7K Feb 13 08:30 MOK.priv
-rw------- 1 root root 1.0K Feb 13 08:30 .rnd

If they are there (above 3 files) proceed to Step 3 otherwise you will need to generate secure boot certs in Step 2:

2.) Generate Secure Boot Certs:

update-secureboot-policy --new-key     ----> Generate new secure-boot key

Now Repeat step #1 and check that there are 3 files: MOK.der, MOK.prov and .rnd

3.) Check and see if Secure Boot Certs are enrolled in MOK.

sudo mokutil --test-key /var/lib/shim-signed/mok/MOK.der    -----> See if Secure Boot Key is enrolled

If the output says: 
/var/lib/shim-signed/mok/MOK.der is already enrolled 

If the output says "already enrolled" You are done and secure boot is setup. 
If not then proceed to Step #4.

4.) Enroll Secure Boot certs/keys in MOK:

mokutil --import /var/lib/shim-signed/mok/MOK.der   

After running the command above it will prompt for a passwsord... Enter a password... 
I used my account/sudo password as it's easy to remember!

5.) After completing Step #4 you will need to reboot.

On rebooting you will see the MOK Utility come up immediatly after POST (The BIOS Power on Self Test when first powering up) 

You will need to answer the MOK quickly as it has a 8 - 10 second or so timer and will flash on by if you are not paying attention!

6.) Enrolling Secure Boot Certs/Keys on Bootup/Startup:

You will see the MOK Manager... It is blue and looks like an old Commodore 64 screen... heheh

Be quick and select 'ENROLL MOK'

At this point you will see 'VIEW KEY 0' and 'CONTINUE' You can select VIEW KEY if desired to verify the start and expiration date(s) 
and the expiration date is good for a 100 years... Wow better than Winblows Secure Boot Cert shelf life... Hehehe

After viewing the Certificate you can press enter to get back to the main MOK Mananger Screen

7.) Select 'Continue' in the MOK Mananger.

After selecting 'Continue' you will see 'Enroll the Key'
Select 'Yes' and you will be prompted for a password. 
Enter the same password you used in Step #4.

8.) After entering the password you will be prompted to 'Reboot'
Make sure 'Reboot is highlighted and hit enter to reboot.

9.) ** After booting back up to the desktop you can verify the Secure Boot Keys are
enrolled by typeing at the terminal:

   $ sudo mokutil --test-key /var/lib/shim-signed/mok/MOK.der
	[sudo] password for scott:         
	/var/lib/shim-signed/mok/MOK.der is already enrolled

** If Step #9 was successful then Congtatulations! You have setup your Secure Boot Keys.

Note:

There is a Youtube video that I used to help me setup and enroll my Secure Boot Keys.
I also referenced the Youtube video to help in writing up these instructions.

  Here is the link to that Youtube Video:
  
  https://www.youtube.com/watch?v=O_aqPJ72p3E&t=1s
1 Like

Thanks alot for these instructions, not so difficult as it first appears for a Linux newbie.

Because I dual boot which seems to be the system most at risk I and because I'm impatient I decided to follow you instructions. Also I read online that Ubuntu won't be pushing new certificates until October, whether true or not I don't know, very little info out there.

Differences and mistake I made-

At number 4 I need to add sudo to the command otherwise it failed.

After rebooting and entering password which contained numbers, I was getting invalid password length. Now don't laugh I was entering the numbers using numeric keypad and I hadn't noticed the number lock wasn't on.

anyway all's well that ends well.

user1@Yoga:~$ sudo mokutil --test-key /var/lib/shim-signed/mok/MOK.der
[sudo] password for user1:
/var/lib/shim-signed/mok/MOK.der is already enrolled
user1@Yoga:~$

1 Like

The problem is that Microsoft started all this at the outset of Windows 8. The problem lies in the fact that Microsoft, a corporation, not an independent entity, is responsible for certifying SB keys (SBAT).

It has been shown that GNU/Linux had to circumvent the Secure Boot issue by writing shims (efi.32-bit, efi.64-bit) that could be accepted by Secure Boot. I think Fedora was the first with Ubuntu following behind which caused a lot of dismay in the GNU/Linux community, as it was seen as kowtowing to Microsoft's Security beck and call. However, if such moves had not been made we would not be able to be running GNU/Linux today, but the shims do pose a security risk.

All that will change on 24.06.2026 when Microsoft will issue a new Certificate and will 'blacklist' all Linux shims as it has also been proven that there are security risks with these shims, as they were a workaround. Basically, shims are a band aid in order for GNU/Linux to boot - a bit like a puncture repair kit - it will be fine for so long, but eventually you will need to replace the damaged inner tube with a new one.

This is all because one corporation wants to not only dominate the world market, it wants you to think like them too, and to make sure you do, it will gather information on what you are using your computer for, which is none of their business.

There are attempts being made with LibreBoot, but as to how ready that is, or ever will be is cause for another discussion.

If people are concerned about Secure Boot shutting them out, then perhaps it is time to upgrade to GNU/Linux hardware and leave Windows on its own devices to rot.

Clearly, LibreBoot is not for the faint-hearted (I include myself in this group!):

And for those interested on how LibreBoot deals with TPM2.0:

"Libreboot is a free, open-source boot firmware based on coreboot that replaces proprietary BIOS/UEFI on specific Intel/AMD x86 and ARM devices, with recent updates (late 2024/early 2025) significantly enhancing TPM 2.0 support.

  • GRUB Integration : Recent Libreboot releases have integrated upstream GRUB fixes that add robust TPM 2.0 key protector support, including NV index handling, PCR dumping, and key unsealing capabilities, although this feature is not yet enabled by default in all configurations.

  • Hardware Compatibility : On specific hardware like the HP EliteBook 820 G2 , the onboard SLB 9660 TPM chip supports TPM 1.2 natively but can be upgraded to TPM 2.0 via firmware flashing; however, this requires careful handling to avoid bricking the device, as the stock firmware is incompatible with the upgrade.

  • Measured Boot : Libreboot supports measured boot chains using coreboot for hardware initialization and GRUB or SeaBIOS as payloads, allowing for integrity verification of the boot process via TPM 2.0 PCRs, particularly for non-UEFI-aware systems.

  • Open Source TPM Development : While Libreboot itself does not manufacture TPM chips, the ecosystem benefits from broader open-source initiatives, such as Google’s work on an open-source TPM 2.0 implementation for Chromebooks using Cortex-M3 cores and open hardware.

AI-generated answer. Please verify critical facts."

And ...

" How to enable TPM 2.0 key protector in Libreboot?

Finished

To enable the TPM 2.0 key protector in Libreboot , you must configure the GRUB payload (included in recent Libreboot releases) to unseal a disk encryption key stored in the TPM. This process involves sealing the key externally using grub-protect or tpm2_tools and adding specific commands to your grub.cfg .

1. Prerequisites and Sealing the Key

Before booting, you must seal your LUKS key (or other disk key) to the TPM's Platform Configuration Registers (PCRs). This is typically done using the grub-protect utility from a running Linux system with TPM 2.0 tools installed.

You can seal the key to a file or directly to a TPM NV Index . The NV Index method is often preferred in Libreboot environments to avoid storing a sealed key file on the EFI partition.

Example: Sealing to an NV Index Use grub-protect to seal the key (e.g., luks.key ) to NV index 0x1000000 , binding it to specific PCRs (e.g., 0, 2, 4, 7 which measure the boot process):

grub-protect --protector=tpm2 \
  --action=add \
  --tpm2key \
  --tpm2-bank=sha256 \
  --tpm2-pcrs=0,2,4,7 \
  --tpm2-keyfile=luks.key \
  --tpm2-nvindex=0x1000000

Note: Ensure the TPM is enabled in your Libreboot/SeaBIOS configuration. Recent Libreboot releases (late 2024/early 2025) have fixed TPM initialization issues on some boards, but on others (like the T480), TPM may be disabled by default in SeaBIOS payloads to prevent boot hangs."

If in doubt, DON'T!

3 Likes

Good deal & glad my instructions on enrolling SB Certs in the MOK worked for you!

There has been some discussion about Secure Boot on a local forum. Secure Boot was not a Microsoft thing to begin with, it was developed to increase security because of poor BIOS security:

https://www.sheffieldforum.co.uk/topic/501746-anyone-dual-booting-windows-with-gnulinux-needs-to-take-steps-before-24062026/#findComment-9068664

2 Likes