TinLethax

Signing GRUB for Lenovo Yoga Book with Secure Boot on.

Apr 10th, 2023
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. Temporary suspend BitLocker and Disable secure boot
  2. Legends $ = normal user, # = super user (sudo)
  3.  
  4. $ openssl req -newkey rsa:4096 -nodes -keyout MOK.key -new -x509 -sha256 -days 3650 -subj "/CN=my Machine Owner Key/" -out MOK.crt
  5. $ openssl x509 -outform DER -in MOK.crt -out MOK.cer
  6.  
  7. # mokutil --import MOK.cer // prompts for one-time password
  8. # mokutil --list-new // recheck your key will be prompted on next boot
  9.  
  10. //Before shutdown and boot for next MOK enrollment, you MUST use USB keyboard otherwise you can't type in anything.
  11.  
  12. showdown and Get into Novo Menu -> boot menu -> your debian boot media and continue the MOK enroll process
  13. It will reboot again to windows (in case you set windows at 1st boot priority like mine), GO disable Bitlocker again and shutdown
  14. Go to Novo menu and booot into debian and
  15.  
  16. # sbsign --key MOK.key --cert MOK.crt --output /boot/vmlinuz-linux /boot/vmlinuz-linux // kernel signing
  17. # sbsign --key MOK.key --cert MOK.crt --output esp/EFI/BOOT/grubx64.efi esp/EFI/BOOT/grubx64.efi // grub signing
  18. Then go to Novo menu and bios setting to turn the secure boot on, Save and exit and force shutdown
  19. Then go to Novo menu again and boot debian
  20.  
  21. # mokutil --enable-validation
  22. and reboot to debian again, you can check dmesg log for the secure boot status
  23.  
Advertisement
Add Comment
Please, Sign In to add comment