set time-date on boot

Ask questions about Arch Linux ARM. Please search before making a new topic.

set time-date on boot

Postby quantum1024 » Tue Feb 25, 2014 2:00 pm

hi, my name is Fred and i'm brand new to the arch linux forum,

i bought a beagleboard ver c2 in 2009, and since then i have been playing with it on and off. this week i changed over to arch linux but i noticed something strange. install went great, very smooth and easy, i'm at linux root promt. everything cool so far.

the time is 18:00:00 the date is 1969 and it says i'm in MNT time zone. i'm in eastern time zone. :o

i really didn't think i aged that much but, well maybe...

so i set the date-time and presumed saved it, but when i booted it it came back to the default above.
This version of beagle board does not contain a RTC or battery backup, i'm now looking at building a 1307rtc and connecting it to the i2c bus.

in the meantime however during the setups and such for a temporary fix, is there a way to set time-date at boot somewhere, say a few lines of code in one of the boot files??? this would help greatly.

Thanks in advance for any help!
quantum1024
 
Posts: 3
Joined: Tue Feb 25, 2014 9:49 am

Re: set time-date on boot

Postby WarheadsSE » Tue Feb 25, 2014 2:21 pm

Are you using a network connection?

If so, add this to the bottom of your netctl profile:
$this->bbcode_second_pass_code('', 'ExecUpPost='/usr/bin/ntpd -gq || true'')

If not, look at fake-hwclock.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: set time-date on boot

Postby quantum1024 » Tue Feb 25, 2014 3:10 pm

the beagleboard that i have does not have any network connection. i have to install a wireless usb device after i get Xfce installed and possibly some drivers. i had networking before but only in the gui. angstrom.

pacman -Sy fake-hwclock

systemctl enable fake-hwclock


AH!!! THANK YOU! just what i was looking for. i'll try this and let you know. :D
quantum1024
 
Posts: 3
Joined: Tue Feb 25, 2014 9:49 am

Re: set time-date on boot

Postby quantum1024 » Tue Feb 25, 2014 7:38 pm

i tried to do the commands but i ended up with all sorts of errors, mostly due to no internet connection and unable to do updates and contact the arch linux website for files. so i'm going to get the wireless network going first and then do updates, clean up the boot and configure everything. as i get time i'll build the 1307rtc and get that going and then everything should be fine.

should anyone you have any suggested reading on the topic of 1307rtc or i2c bus and connecting it to a 2009 beagleboard c2 please post it, i'm hunting for it.

thanks for the help!
quantum1024
 
Posts: 3
Joined: Tue Feb 25, 2014 9:49 am


Return to User Questions

Who is online

Users browsing this forum: No registered users and 22 guests