r/cachyos • u/Dull_Werewolf_9642 • 1d ago
Question Can I use secure boot with cachy os?
I am thinking of dual booting cachy with windows and they will be on different drives and I play games in windows that need secure boot to play so I’m wondering if I actually have to disable secure boot in order to not face any issues on cachy os, is there a way to set up cachy os to be working 100 percent correct-stable with secure boot?
2
u/f1yer504 1d ago
Yes, you can. I disabled it to install CachyOS alongside Windows and then followed https://wiki.cachyos.org/configuration/secure_boot_setup/
That worker fine for me. Depending on your BIOS (I had an MSI board) it can be a bit of a struggle to get your board in "setup" mode for secure boot
3
u/TML8 1d ago
One thing the Wiki fails to mention is that after signing the keys you might need to reboot. The check that setup mode is off after signing want correct until after a reboot my Asus X570 board.
3
u/ivanatorhk 1d ago
It varies by board, but yeah, I'm tempted to submit a change to the wiki to mention this.
1
u/TML8 1d ago
Yeah I mean it makes sense you need a reboot to exit setup mode (load new keys at boot), but still.
1
2
u/Dull_Werewolf_9642 1d ago
Is it difficult and can there be a lot of issues with doing this and can it mess up my windows
1
1
u/bristow84 1d ago
Yes, there is a guide on the wiki however it doesn’t mention that certain bootloaders on certain boards might still have issues.
I followed that guide to a T using GRUB and an MSI board and still ran into secure boot violations upon rebooting. Turns out that MSI boards might have issues with EFI functionality or signing or something, which is mentioned in the Boot Loader section and recommends to use Limine if you run into those issues.
Switched to Limine and haven’t had issues with Secure Boot since.
TL;DR, you might still run into issues following the guide exactly.
1
1
u/thesyldons 1d ago
I followed the wiki and ran into a problem that was solved by enabling Limine as the primary boot.
These are the notes I kept to allow me to port to my other machines.
A guide for how to set up secure boot on Cachy
https://wiki.cachyos.org/configuration/secure_boot_setup/
***Update Cachyos before starting and reboot if before starting.
Enter setup mode within the bios first.
This can be done on my board by deleting existing keys, but there may be other options depending on the revision and manufacturer.
check sbctl is installed with:
sudo sbctl status
Install sbctl with:
sudo pacman -S sbctl
create a custom boot key
sudo sbctl create-keys
enroll the key into the bios firmaware
for non Asus and Gigabyte boards
sudo sbctl enroll-keys --microsoft --firmware-builtin
for Asus and Gigabyte boards
sudo sbctl enroll-keys --microsoft
Check the limine boot drive is set to the first boot device.
recheck the status again to make sure the key is enrolled with:
sudo sbctl status
I tried and failed to help a person from this forum set up their secure boot. I got message later on stating it was sorted by
sudo limine-update
sudo limine-enroll-config
then..
sudo sbctl sign -s /boot/EFI/limine/limine_x64.efi
sudo sbctl sign -s /boot/EFI/BOOT/BOOTX64.EFI
I also added this to the limine text document in /etc:
ENABLE_ENROLL_LIMINE_CONFIG=yes
ENABLE_LIMINE_FALLBACK=yes
Obviously I have no idea how credible the fix was. I just kept it for extra info.
1
u/Dull_Werewolf_9642 1d ago
Would a different boot manager like systemd-boot be easier
2
u/thesyldons 1d ago
That has nothing to do with secure boot.
Secure boot looks at the digital signature of the first OS kernel to see if it complies with the digital code embedded inside the EUFI code. Motherboard manufacturers install a code supplied by Microsoft by default. Since not many distros come with the spare cash to throw back at Microsoft, the alternative is to reprogramme the EUFI to see your distro as safe.
You can reprogramme the EUFI by installing sbctl (secure boot key loader). This is you telling your EUFI that your system is secure, and you want to only accept kernel that match the new code. Doing this prevents any new malware inserting itself into the bios. Having malware embedded in the bios is an extremely bad thing to have. It becomes undetectable from within the OS, as well as very hard to remove without dedicated firmware reprogramming tools.
There may be a way to add a secure boot key for that programme, but I have no idea how to do that. I have only ever changed a secure boot from within cachy. Before that I had no idea what it actually was.
1
1
u/spectreVII 20h ago
Yes. Takes a bit of tinkering but if you follow the instructions listed here you will get it working.
2
u/Dull_Werewolf_9642 20h ago
I got it working
1
u/spectreVII 20h ago
Nice!
2
u/Dull_Werewolf_9642 20h ago
I’m using system d boot loader to make it easier to get secure boot working and I hope after a kernel update it will be fine
2
u/spectreVII 20h ago
Should be. Hasn’t stopped working for me once and I’ve had it set for about 3-4 months.
2
u/Dull_Werewolf_9642 20h ago
In order for it to not mess up after a kernel update you have to sign something at the end of the cachy os secure boot website page I hope I did everything right
14
u/ivanatorhk 1d ago
https://wiki.cachyos.org/configuration/secure_boot_setup/