Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: aug on March 31, 2016, 04:50:48 AM
-
How can i set a static ip (at the moment i use the router and the mac) and have cron running after a reboot???
-
See the end of this for static ip setups
http://forum.tinycorelinux.net/index.php?topic=19804.15
Ch 10 Bootcodes - Corebook
re cron - page 55/56
just add cron to cmdline boot file in mmcblk0p1
crontab -e to make and edit the cron file
It is a bit pedantic and archaic so be careful of the editing.
-
thanks ;-)
-
See the end of this for static ip setups
http://forum.tinycorelinux.net/index.php?topic=19804.15
Ch 10 Bootcodes - Corebook
re cron - page 55/56
just add cron to cmdline boot file in mmcblk0p1
crontab -e to make and edit the cron file
It is a bit pedantic and archaic so be careful of the editing.
ok with static ip (need to execute filetool.sh -b before rebooting) but cron did not really work. the daemon is started at boot but the file is missing. crontab -l shows only the message that it can't find the file..... after rebooting, without rebooting it works.
-
Hi aug,
You need to add var/spool/cron/crontabs to /opt/.filetool.lst and then filetool.sh -b so the crontab file is saved before you reboot.
HTH
Jon
-
Hi aug
... the daemon is started at boot but the file is missing. crontab -l shows only the message that it can't find the file..... after rebooting, ...
Naybe you need to add var/spool/cron/crontabs to your backup?
-
after setting a fixed ip the date/time is 01.01.1970 00:01 - fine :-(
i can set the clock with the date command but how can i write it to the hardware clock (hwclock reports can't open /dev/misc/rtc)???
-
If you like to get the ntp date and time, than you need to add this to the bootlocal.sh:
# Set the time
/etc/init.d/settime.sh
There is no RTC at the Raspberry board itself. But you may use one as a module connected to the GPIO if you like to have the time and date without the internet connection.
-
If it is connected to the net, you may need to edit /etc/sysconfig/ntpserver
Else you will need a RTC if you don't have internet access for your server.
If it is going on a local network one of the other PCs can be made a ntp sever for it.
You may need to make and backup /etc/sysconfig/timezone file, add something like this.
TZ=EST-10
-
ok seems it had to add the script to bootlocal.sh
But what steps are need to set the correct time for Europe/Berlin???
-
I'm using these boot codes
noutc tz=CET-1CEST,M3.5.0,M10.5.0/3
-
I'm using these boot codes
noutc tz=CET-1CEST,M3.5.0,M10.5.0/3
used tz=CEST but still get only the utc :-(
-
I don't know if the boot codes are different for piCore.
You may try editing /etc/sysconfig/timezone (using upper case TC=...) as gavinmc42 suggested.
-
I don't know if the boot codes are different for piCore.
You may try editing /etc/sysconfig/timezone (using upper case TC=...) as gavinmc42 suggested.
The file is gone after reboot. Parameters used in commandline.txt seems to have no effect. It shows the other timezone name, but the value of the time remains the utc one.
-
Copy this into the cmdline.txt at /mnt/mmcblk0p1:
wc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed nodhcp tz=CET-1CEST,M3.5.0,M10.5.0/3
Be sure that it is in ONE long uninterrupted line !!!
-
Hi jgrulich,
Can I point out that the command line you posted is missing a d at the beginning it should readdwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed nodhcp tz=CET-1CEST,M3.5.0,M10.5.0/3
see http://elinux.org/RPI_BCM2708_Parameters#module:_dwc_otg (http://elinux.org/RPI_BCM2708_Parameters#module:_dwc_otg)
Jon
-
I think I remember trying the timezone setting in cmdline.txt and did not get it working
http://forum.tinycorelinux.net/index.php/topic,17325.msg105369.html#msg105369
Ended up adding a timezone file to /etc/sysconfig
Needed to fix it in crontab too
http://forum.tinycorelinux.net/index.php/topic,17638.msg106134.html#msg106134
-
I don't know if the boot codes are different for piCore.
You may try editing /etc/sysconfig/timezone (using upper case TC=...) as gavinmc42 suggested.
The file is gone after reboot. [...]
Remember to add edited files to your backup.
-
tz=CET-1CEST in commandline.txt is the solution!
thanks to everyone for your support