First of all, I want to mention that your dotfiles was a great source of learning for me a few years back, so thank you! I still check it once in a while to discover something new :)
I've used arch-secure-boot in the past without any issues. I recently needed to setup everything again, have followed the same process as before, indicated in your read me (setting bios password, clearing keys) -- but enrolling no longer works due to the following errors:
Enrolling Secure Boot keys...
chattr: Invalid argument while trying to stat /sys/firmware/efi/efivars/PK*
chattr: Invalid argument while trying to stat /sys/firmware/efi/efivars/KEK*
chattr: Invalid argument while trying to stat /sys/firmware/efi/efivars/db*
The files do not exist until sbkeysync is executed.
After digging around I was able to do the following to get the db/KEK enrolled (no chattr required), from wiki:
# sbkeysync --keystore /etc/secureboot/keys --verbose
Though after running sbkeysync --keystore /etc/secureboot/keys --verbose --pk I get the following error:
....
Inserting key update /etc/secureboot/keys/PK/PK.auth into PK
Error writing key update: Permission denied
Error syncing keystore file /etc/secureboot/keys/PK/PK.auth
I then tried manually running these:
# chattr -i /sys/firmware/efi/efivars/PK*
# efi-updatevar -f /etc/secureboot/keys/PK/PK.auth PK
But the following error indicates that perhaps chattr is no longer necessary and perhaps problematic:
Cannot write to PK, wrong filesystem permissions
Once I do reset the file permissions back with chattr +i I get the error:
Failed to update PK: Operation not permitted
This last error, and enrolling the PK key, isn't related to your script... I have tried several things:
- using KeyTool (get error 26 "security violation")
- using
cert-to-efi-sig-list and sign-efi-sig-list as on the wiki...
- following the tips on the wiki regarding the password issue... and no luck
I think chattr is perhaps no longer needed.
Any ideas why I cannot enroll PK? I would greatly appreciate any advice/guidance. I'm on a Thinkpad X1 Gen 9, and again had no issue before... but now I'm stuck and have spent several hours trying to figure this out.
Thank you in advance.
First of all, I want to mention that your dotfiles was a great source of learning for me a few years back, so thank you! I still check it once in a while to discover something new :)
I've used
arch-secure-bootin the past without any issues. I recently needed to setup everything again, have followed the same process as before, indicated in your read me (setting bios password, clearing keys) -- but enrolling no longer works due to the following errors:The files do not exist until
sbkeysyncis executed.After digging around I was able to do the following to get the db/KEK enrolled (no chattr required), from wiki:
Though after running
sbkeysync --keystore /etc/secureboot/keys --verbose --pkI get the following error:I then tried manually running these:
But the following error indicates that perhaps
chattris no longer necessary and perhaps problematic:Once I do reset the file permissions back with
chattr +iI get the error:This last error, and enrolling the PK key, isn't related to your script... I have tried several things:
cert-to-efi-sig-listandsign-efi-sig-listas on the wiki...I think
chattris perhaps no longer needed.Any ideas why I cannot enroll PK? I would greatly appreciate any advice/guidance. I'm on a Thinkpad X1 Gen 9, and again had no issue before... but now I'm stuck and have spent several hours trying to figure this out.
Thank you in advance.