====== Set and fix clock issue ======
===== Set time zone =====
1. Edit **''/etc/timezone''**, for example set to Hong Kong:
Asia/Hong_Kong
Or, run:
dpkg-reconfigure tzdata
2. Copy the zone files **''/usr/share/zoneinfo/Asia/Hong_Kong''** from the build-box.
===== Fix clock issue =====
If using the kernel 2.6.26-486-voyage, or 2.6.30-voyage (Update: also for 2.6.38-voyage) and a ALIX board, the clock must be fixed.
1. add "clocksource=tsc" to kernel param:
kernel /vmlinuz root=LABEL=ROOT_FS console=ttyS0,38400n8 clocksource=tsc
2. sync time automatically with ntp daemon. Install ntp and edit ''/etc/ntp.conf'':
driftfile /var/tmp/ntp.drift
...
broadcast 192.168.0.255
3. set time right ASAP, add ''rdate'' command in ''/etc/init.d/ntp'':
...
case $1 in
start)
# use rdate to quickly set clock
rdate -u -s stdtime.gov.hk
4. disable the hook scripts that interfere with the startup of ntp daemon:
* ''/etc/network/if-up.d/ntpdate''
* ''/etc/dhcp/dhclient-exit-hooks.d/ntpdate''
* ''/etc/dhcp/dhclient-exit-hooks.d/ntp''
===== TO-DO =====
Compile a new kernel so that "clocksource=tsc" is not needed.