OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
282 stars 142 forks source link

Fix set_disk_password() to really add the password to grub.cfg. #2544

Closed wfeldt closed 2 months ago

wfeldt commented 2 months ago

Problem

The SL-Micro -6.0 encrypted images - when built with latest KIWI 10.0 - ask the user for a decryption password during initial boot.

The reason is that usually the password is stored in grub.cfg and passed to grub's cryptomount.

But KIWI 10.0 fails to create grub.cfg correctly. KIWI 9.25 works.

Solution

Since commit 8aa517eb7 it is necessary to call _mount_device_and_volumes() in methods that want to modify the grub setup to ensure the current boot files are mounted.

Also, raise an error if the config file could not be modified.

schaefi commented 2 months ago

good catch, thanks for finding and fixing. You did not update the unit tests for the change, thus it fails there. Let me know if you want help for fixing those. Thanks

wfeldt commented 2 months ago

Uhm, I see this involves some mock-ups I'm not familiar with in KIWI, so it'd be great if you could adjust the tests. :-)

schaefi commented 2 months ago

Uhm, I see this involves some mock-ups I'm not familiar with in KIWI, so it'd be great if you could adjust the tests. :-)

ok I will. I think I cannot push to your fork. I'll move your change into a branch. btw I added you with write permissions to the project so you can create PRs based on branches :)

schaefi commented 2 months ago

continue work on #2546

wfeldt commented 2 months ago

Thanks! Let's hope I won't need it. :-)