0

I am trying to boot from USB and sync time using "ntpdate" command from a windows PC as ntp server.

OS : Lubuntu live usb

when i run the ntpdate command it is getting executed and the date is set properly but the time is not getting synced.

So my question is that whether is it possible to set the time using ntpdate command after booting from a USB? If yes then, what i need to do? If no then, why?

1 Answer 1

0

it seems that ntpdate is depreciated try:

sudo service ntp stop
sudo ntpd -gq
sudo service ntp start

OUTPUT:

{~}:$ sudo service ntp stop
{~}:$ sudo ntpd -gq
 1 Jun 08:55:37 ntpd[9331]: ntpd [email protected] Fri Apr  8 20:58:07 UTC 2016 (1): Starting
 1 Jun 08:55:37 ntpd[9331]: Command line: ntpd -gq
 1 Jun 08:55:37 ntpd[9331]: proto: precision = 0.124 usec (-23)
 1 Jun 08:55:37 ntpd[9331]: Listen and drop on 0 v6wildcard [::]:123
 1 Jun 08:55:37 ntpd[9331]: Listen and drop on 1 v4wildcard 0.0.0.0:123
 1 Jun 08:55:37 ntpd[9331]: Listen normally on 2 lo 127.0.0.1:123
 1 Jun 08:55:37 ntpd[9331]: Listen normally on 3 eth0 192.168.1.20:123
 1 Jun 08:55:37 ntpd[9331]: Listen normally on 4 lo [::1]:123
 1 Jun 08:55:37 ntpd[9331]: Listen normally on 5 eth0 []:123
 1 Jun 08:55:37 ntpd[9331]: Listening on routing socket on fd #22 for interface updates
 1 Jun 08:55:38 ntpd[9331]: Soliciting pool server 184.105.192.247
 1 Jun 08:55:39 ntpd[9331]: Soliciting pool server 107.170.242.27
 1 Jun 08:55:39 ntpd[9331]: Soliciting pool server 204.9.54.119
 1 Jun 08:55:40 ntpd[9331]: Soliciting pool server 104.156.99.226
 1 Jun 08:55:40 ntpd[9331]: Soliciting pool server 50.116.52.97
 1 Jun 08:55:40 ntpd[9331]: Soliciting pool server 129.250.35.251
 1 Jun 08:55:41 ntpd[9331]: Soliciting pool server 67.18.187.111
 1 Jun 08:55:41 ntpd[9331]: Soliciting pool server 45.79.10.228
 1 Jun 08:55:41 ntpd[9331]: Soliciting pool server 209.114.111.1
 1 Jun 08:55:41 ntpd[9331]: ntpd: time slew -0.001862 s
ntpd: time slew -0.001862s
{~}:$ 

See if this will do what you need. Also .. .ntpdate will not be able to connect if the service is running .. so you may be able to use

sudo service ntp stop
sudo ntpdate -s us.pool.ntp.org
sudo service ntp start

OUTPUT:

{~}:$ sudo service ntp stop
{~}:$ sudo ntpdate -s us.pool.ntp.org
{~}:$ 

But I tried this and didn't seem to get any output like I did with the ntpd -gq command.

1
  • I tried this but after that the ntpdate is updating date but time is still not getting updated. Jun 1, 2016 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .