lamw / ghettoVCB

ghettoVCB
MIT License
1.27k stars 363 forks source link

How can cronjobs made persistent during a reboot with UEFI secure boot enabled #303

Closed DVTrast closed 8 months ago

DVTrast commented 11 months ago

Hello. Do make the backup automatically, it make sense to create a cronjob for it (as described). But with ESX8 and UEFI secure boot enabled, I´m unable to make the cronjob (in /var/spool/cron/crontabs/root) persistent - is there a was to do it?

In the file "/etc/rc.local.d/local.sh" the following is present: Note: This script will not be run when UEFI secure boot is enabled.

Thank you

Best regards

Stefan Rapp

lamw commented 11 months ago

No. This is the expected behavior if you've got Secure Boot enabled (see https://williamlam.com/2018/06/using-esxi-kickstart-firstboot-with-secure-boot.html for more details)

Your options are either disable Secure Boot (not ideal) or schedule the invocation remotely rather than directly on the ESXi host

DVTrast commented 11 months ago

@lamw Ok - Thank you for your answer :-)

Giga-Pudding commented 8 months ago

Hi,

i don't know if ESXi uses Systemd, but if yes, you could use Systemd timers.

BR, Giga-Pudding

DVTrast commented 8 months ago

@Giga-Pudding thank´s I´ve build an workaround and trigger the script from an other server via ssh.