Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NixOs works but Windows boots to Bitlocker recovery #271

Open
Doosty opened this issue Dec 26, 2023 · 9 comments
Open

NixOs works but Windows boots to Bitlocker recovery #271

Doosty opened this issue Dec 26, 2023 · 9 comments

Comments

@Doosty
Copy link

Doosty commented Dec 26, 2023

On a Lenovo Thinkpad P14s i installed Nixos on a separate external drive, next to existing default Windows on the internal drive. I went through the quickstart guide and everything went smoothly, the only thing not described in the guide was that i needed to sudo chattr -i /sys/firmware/efi/efivars/* before i could sudo sbctl enroll-keys --microsoft. Well Nixos works with secure boot now, but Windows doesnt boot anymore. Is it possible to fix this or did i just lose data? Thanks for help.

@RaitoBezarius
Copy link
Member

I assume that you lose your default Windows bootable or something, can you be more explicit about how Windows doesn't boot anymore? What do you observe?

@Doosty
Copy link
Author

Doosty commented Dec 26, 2023

When i had secure boot on:

  • windows boot loader successfully booted into windows
  • nixos did not boot at all, just 1 second of black screen and back to boot selection menu

When i had secure boot off:

  • windows boot loader booted into bitlocker recovery screen
  • nixos successfully booted

After lanzaboote with secure boot on:

  • windows boot loader boots into bitlocker recovery screen, even after i used the 'enroll-leys --microsoft' command
  • nixos successfully boots and uses secure boot

@RaitoBezarius
Copy link
Member

Yes, that's expected, enrolling new keys will change the Secure Boot database and change the measurements for the boot.
You need to recover once the Bitlocker to move on.

@RaitoBezarius
Copy link
Member

This is unrelated to Secure Boot though.

@blitz
Copy link
Member

blitz commented Dec 26, 2023

I'm not sure what measurements Windows uses to seal the disk encryption key but what you describe in "After lanzaboote with secure boot on" sounds like what I would expect: You can boot Windows but Bitlocker is not happy because the PCRs have changed.

@RaitoBezarius Do you know off the top of your hat whether the above is expected behavior? If so we should add a warning around having your Bitlocker recovery key handy to the docs.

@Doosty Doosty changed the title NixOs works now, Windows doesnt NixOs works but Windows boots to Bitlocker recovery Dec 26, 2023
@Doosty
Copy link
Author

Doosty commented Dec 26, 2023

Yes, that's expected, enrolling new keys will change the Secure Boot database and change the measurements for the boot. You need to recover once the Bitlocker to move on.

Ok that worked, i didnt know microsoft stores the Bitlocker recovery keys online, i thought for sure i just bricked my windows laptop. Sorry for the panic everyone and thanks for the help.

@Doosty Doosty closed this as completed Dec 26, 2023
@blitz
Copy link
Member

blitz commented Jan 3, 2024

@RaitoBezarius Can we leave this open so we don't forget to add some warning to the documentation?

@RaitoBezarius RaitoBezarius reopened this Jan 3, 2024
@RaitoBezarius
Copy link
Member

@RaitoBezarius Can we leave this open so we don't forget to add some warning to the documentation?

Yes of course!

@dweee
Copy link
Contributor

dweee commented Apr 28, 2024

For info, at least on the only system I have currently set up (Framework 16), I have not needed to remove the immutable attribute on the EFI variables at /sys/firmware/efi/efivars/*.
If anyone has any issues with their Windows install always asking for the BitLocker recovery key on every boot up, you can add boot.lanzaboote.settings.reboot-for-bitlocker = true; to your configuration and it should resolve the issue. Anyways I believe this issue is resolved and can be closed :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants