netbootxyz / netboot.xyz

Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE.
https://netboot.xyz
Apache License 2.0
8.95k stars 670 forks source link

Set clock before fetching https assets #1253

Open hcooper opened 1 year ago

hcooper commented 1 year ago

I'm working with devices which have no battery and hence loose track of time every reboot.

They expect the clock to be set each boot by ntp/chrony/etc.

This causes a problem using netboot.xyz as https certificate validation fails when fetching images files...

[ Try to run debian live image]
Creating /etc/hosts
Creating /etc/resolv.conf
Begin: Trying wget https://github.com/netboot/debian-squash/......
[...]
curl: (60) SSL certificate problem: certificate is not yet valid
[...]
 BOOT FAILED!

Would it be possible to run ntp/chrony before fetching assets?

I'm happy to try patching it myself - however I've searched around and can't find where to modify this boot process.

kaechele commented 1 year ago

Does passing fixrtc as an option to the kernel fix this? We could look at including it in the cmdline for Debian based distros if that works.

hcooper commented 1 year ago

No luck sorry! I set it in netboot.xyz menu and still get the same failure. (Also confirmed pid 1 in the loader is /bin/sh /init vmlinuz fixrtc)

antonym commented 1 year ago

iPXE currently run an ntp during the menu process but it doesn't appear to change the underlying clock:

https://ipxe.org/cmd/ntp