iPXE discussion forum
Date Time - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Date Time (/showthread.php?tid=12824)



Date Time - brownjl - 2018-08-15 14:34

Hello,

Is there anyway I can set the system date and time via script in IPXE?

I can get the correct time via NTP which ipxe will then use. But I really need to use this to then set the date time of the system.

I essentially chainboot a linux image to install linux, the first thing this does is pull down a preseed/kickstart file over https and then fails due to incorrect time.

Thanks

James


RE: Date Time - NiKiZe - 2018-08-15 16:44

Setting the system time from iPXE is probably complex (If I'm not mistaken there is a few different methods that needs to be implemented, and not only one), it might also be seen as a security issue to be able to change time. (at least from an EFI signing perspective)
The best is for the linux process to do the NTP step as well before downloading anything.
Another part of this is that for some OSes the machine time needs to be Local time, while for Linux it is mostly (but not always) UTC

Relevant settings and commands in iPXE (mostly posted here for reference for anyone else finding this looking for how)
http://ipxe.org/cfg/unixtime
http://ipxe.org/cmd/ntp