I have an issue restoring a Debian installation: After restoring, the PC fails to boot with a SecureBoot violation warning.
Steps to reproduce
On a new or factory-reset PC, enable SecureBoot, install Debian 10.9.0 Nothing special from what I can tell.
Create image. I use boot parameters to automate this step: ocs_live_run="ocs-sr -q2 -j2 -z1p -i 4096 -sfsck -scs -senc -p poweroff savedisk os-image sda"
On a new or factory-reset PC, enable SecureBoot, restore from image. Again using boot parameters: ocs_live_run="ocs-sr -e2 -e -g auto -icds -ssnf -j2 -scr -srel -ps -p choose restoredisk os-image sda"
Reboot into restored system. SecureBoot fails with a big red warning.
I'm using a thumb drive created from clonezilla-live-2.7.2-39-amd64.zip.
Note that at least for my PC a BIOS-level reset is not enough in steps 1 and 3. Instead I have to perform a CMOS reset (using a jumper) or use a new PC.
Analysis of the problem
Apparently CloneZilla does not restore the boot entries in NVRAM as expected. These are the contents of efi-nvram.dat in the image folder:
Entries 2 and 3 are not important, they existed in NVRAM because CloneZilla was booted from a thumb drive in step 2. During step 3, only one boot entry is created in NVRAM:
As grub is not signed for SecureBoot, grubx64.efi cannot be run while SecureBoot is enabled.
Expected behavior
All NVRAM boot entries are recreated according to efi-nvram.dat. Alternatively, they are added to existing boot entries, keeping the order of the entries in efi-nvram.dat intact.
Workaround
I've added the following boot parameter to fix the issue temporarily:
Hi,
I have an issue restoring a Debian installation: After restoring, the PC fails to boot with a SecureBoot violation warning.
Steps to reproduce
ocs_live_run="ocs-sr -q2 -j2 -z1p -i 4096 -sfsck -scs -senc -p poweroff savedisk os-image sda"ocs_live_run="ocs-sr -e2 -e -g auto -icds -ssnf -j2 -scr -srel -ps -p choose restoredisk os-image sda"I'm using a thumb drive created from clonezilla-live-2.7.2-39-amd64.zip.
Note that at least for my PC a BIOS-level reset is not enough in steps 1 and 3. Instead I have to perform a CMOS reset (using a jumper) or use a new PC.
Analysis of the problem
Apparently CloneZilla does not restore the boot entries in NVRAM as expected. These are the contents of efi-nvram.dat in the image folder:
Entries 2 and 3 are not important, they existed in NVRAM because CloneZilla was booted from a thumb drive in step 2. During step 3, only one boot entry is created in NVRAM:
As grub is not signed for SecureBoot, grubx64.efi cannot be run while SecureBoot is enabled.
Expected behavior
All NVRAM boot entries are recreated according to efi-nvram.dat. Alternatively, they are added to existing boot entries, keeping the order of the entries in efi-nvram.dat intact.
Workaround
I've added the following boot parameter to fix the issue temporarily:
Last edit: Jonas Deitmerg 2021-07-08
Thanks for reporting this. Yes, shimx64.efi was missing since it used to be shim.efi only.
We have add it:
https://gitlab.com/stevenshiau/clonezilla/-/commit/d45bde4388450fcf8b58f3c753fc91205be65e56
It will be used in the next testing Clonezilla live release.
Steven