Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: ordep on July 13, 2012, 09:33:04 PM
-
I have not yet been able to tweak TCL that it will give my local time as
such. TCL insists of naming it UTC. I have followed the instruction of FAQ,
Wiki, and those posted in the forum. TCL keeps insisting my time is UTC even
if it shows the correct local time. I have wmCalClock set to show UTC time,
yes it does except it is the local time.
The solution is that after booting I set the time with the date command
for the localtime and immediately it is set correctly to PHT and and
wmCalClock gives the real UTC time.
I don't mind giving this date command after booting, however, it would be
nice to have it done by TCL. The command is
sudo date -s "H:M"
H for hour and M for minutes. How could that be executed. I tried a number
of variations on consulting the man date, however, can't get it right.
My BIOS is set to local time which is Asia/Manila or 8 hours ahead of UTC.
Anyone knows?
-
In linux you're meant to set your bios time to utc
-
See boot codes "tz=" and "noutc".
-
In linux you're meant to set your bios time to utc
That is new to me. ;) In 15 years Linux my BIOS was always set to local time and no distro ever gave such weird time indications. :D
-
See boot codes "tz=" and "noutc".
That's how I installed and now again booted from CD and the time
indicated by "date" was 00:15 when local time was in fact 16:15 and tzclock
showed GMT which was wrong as well. On booting tz=Asia/Manila showed as
being accepted. Are we on the same planet? ;) I must admit 16 + 8 = 00 on
a clock calculation. Something somewhere is not right with the time in TCL.
If for TCL I would have to change my BIOS time I rather stay with setting
the correct time with my "date" command after X started in TCL.
-
If linux does not know what is what (and it can't unless the bios is in UTC time), then it usually can't do automatic DST transitions. That's the only thing you'll lose if you set the time manually.
-
In fact core was for me the first (and only, so far) linux system where I got automatic DST transitions working seamlessly, and that even with BIOS clock kept in localtime ;)
-
See boot codes "tz=" and "noutc".
On booting tz=Asia/Manila showed as
being accepted. Are we on the same planet? ;)
Nope, we are not ;)
No tz-data with geographical aliases in base, so you have to specify all parameters of the real tz.
Search forum for a post which explains tz very analytically.
-
Hi ordep
Reply #26 and #27 in this thread might be helpful:
http://forum.tinycorelinux.net/index.php/topic,5017.msg27012.html#msg27012
-
That is exactly the post which I had in mind - and it has been copied to the wiki in the meantime as article "Time Zone" - which OP implies to have followed instructions of...
-
Thanks all!
Made a new install with correct tz=PHT-8 and noutc. True it now showed the correct local time, yet still calling it stupidly (sorry) UTC. That means I cannot use wmCalClock to give me the real UTC. 'date' command gives UTC instead of PHT.
I give up. Worked on it all morning. I will stay with my "date" command after starting X. BTW then the 'date' command correctly gives PHT: Sun Jul 15 11:44:43 PHT 2012, that is the system knows it. That's after canceling above install.
-
To check your real (synced) system time, you can do something like this:
rdate -p nist1-ny.ustiming.org
-
Interesting, since when I just tested "tz=PHT-8 noutc", date gave the bios time and said it was PHT.
Are you sure the boot options are correctly passed? Do they show in "showbootcodes"?
-
Interesting, since when I just tested "tz=PHT-8 noutc", date gave the bios time and said it was PHT.
Are you sure the boot options are correctly passed? Do they show in "showbootcodes"?
That might be the problem. tz=PHT-8 is not found in extlinux.conf on my HD. However, I made a new install to USB flash drive from CD with TCL-4.5.6 that code is in extlinux.conf on the flash drive. I will attempt a new install on my HD. If I boot from the newly burned CD with cheatcode tz=PHT-8 it does now show the correct local time and command "date" gives correctly PHT.
-
I think I can confirm now that when TCL is booted from a CD and then trying to intall on a hard drive
the given cheat codes such as noutc, tz= or vga= are ignored or not passed. I tried it 3 times
to make sure I had not made a typing error. Each time the same reult. Time shows as UTC and display
is too large and not vga=791 which I use in my PC.
However, installing to a USB flash drive the cheat codes are passed correctly.
-
You can use "vga=ask" to see if the kernel will prompt you at the very beginning of boot.
-
Hi ordep
When you enter your boot codes at the boot prompt, you need to enter tc tz=whatever vga=whatever
After you have booted, entering showbootcodes at the command line will show you if your boot
codes where seen.
-
I'm confused, isn't Philippine Time +8 hours (not -8 hours) ??
-
"-" in tz means ahead of UTC.
-
Just to be sure, you mean bootcodes entered in the installer window don't get passed? (and not those entered for the live cd session, at the cd's boot prompt)
-
Just up from a bad bout of flue. :)
OK then:
-- Booting from the live CD with bootcodes "noutc tz=PHT-8 vga=791" brings up TCL
-- with these settings showing correct Manla time and resolution.
-- Installing TCL to a USB flash drive with bootcodes "noutc tz=PHT-8 vga=791"
-- installs TCL correctly with those codes and when booting from flash
-- drive time is set correctly to Manila time and resolution.
-- Installing TCL to a hard drive with bootcodes "noutc tz=PHT-8 vga=791"
-- installs TCL with time set to UTC and incorrect, unusable large
-- resolution.
-- Installing TCL from the flash drive to the hard drive with bootcodes
-- "noutc tz=PHT-8 vga=791" installs TCL with time showing as PHT, however,
-- 8 hours off and correct resolution. Time can easily be corrected with
-- command "date -s "HH:MM". showbootcodes shows none of the given codes.
I cannot show the bootcodes in HD installation since I am running now TCL
on the HD from the flash drive install which I would have to destroy again with a new
install from the CD since booting from the CD it will always mount the HD
TCL partion which I am not able to unmount.
If I know how to boot from the CD w/o mounting the TCL HD partion I can make
an install on another partion. TCL will not install if on a given drive a partion
is mounted.
-
Compare your bootloader config files.
Boot code "base" to prevent automounting.
-
I'll leave the bug in the installer for Brian.
Please edit your bootloader config file directly, no need to do repeat installs.
-
Found the file I had saved the bootcodes of HD install:
$ showbootcodes
BOOT_IMAGE=TCL-sdb9 ro root=819 quiet vt.default_utf8=1
Given codes
noswap noutc tz-PHT-8 vga=791
are all missing unlike in flash drive install or on CD boot. they show with "showbootcodes" command.
-
..which would tend to indicate that your hd install is not reading the boot codes from where you expect...
-
Found the file I had saved the bootcodes of HD install:
$ showbootcodes
BOOT_IMAGE=TCL-sdb9 ro root=819 quiet vt.default_utf8=1
It appears to me you have some rather uncommon boot codes there, are you sure about those?
Why would you want to use "ro" with tc??
-
I made a new install from the CD booted with "base" to a new partition on the drive. The only codes given were those already mentioned and the outcome is the same. The codes are not acted on. I did not put "ro"
or anything else that shows in showbootcodes.
-
Those bootcodes definitely don't come from our installer. Do you have an old install somewhere, made by a third party util?
-
Those bootcodes definitely don't come from our installer. Do you have an old install somewhere, made by a third party util?
Nothing of that sort. I made at least 6 installs of TCL always on a newly formatted partition and now once more on another partion.
On that drive I have my working box Salix and VL7 for testing. It is a brand new SATA drive.
On a second IDE HD I have the latest KNOPPIX installed.
-
While you get the output of 'showbootcodes' as posted above, what is the output of 'uname -a'?
-
While you get the output of 'showbootcodes' as posted above, what is the output of 'uname -a'?
Linux box 3.0.21-tinycore #3021 SMP Sat Feb 18 11:54:11 EET 2012 i686 GNU/Linux
-
Any idea where that "BOOT_IMAGE=TCL-sdb9" could come from?
Have you manually ever given such a name anywhere?
-
Any idea where that "BOOT_IMAGE=TCL-sdb9" could come from?
Have you manually ever given such a name anywhere?
In my working box Salix in lilo.conf the section for TCl reads:
image = /mnt/TCL/tce/boot/vmlinuz
initrd = /mnt/TCL/tce/boot/core.gz
root = /dev/sdb9
label = TCL-sdb9
read-only
Aha, and there is the
append="quiet vt.default_utf8=1"
at the beginning of lilo.conf.
So it seems those bootcodes come from the lilo.conf.
-
There you go!
What started as "Confusing Local Time" eventually turns out to be "Confusion about a misconfigured bootloader".
Better fix your boot configuration...
I seem to vaguely remember that one may have to update or rerun lilo after installing a new kernel or changing config. Consult documentation.
-
There you go!
What started as "Confusing Local Time" eventually turns out to be "Confusion about a misconfigured bootloader".
Better fix your boot configuration...
I seem to vaguely remember that one may have to update or rerun lilo after installing a new kernel or changing config. Consult documentation.
Yes that is SOP in my Linux book! ;)
It is then still confusing why TCL uses those codes and not the once give. Godfather DSL or KNOPPIX will not do it with the same lilo.conf settings.
-
Now how about these codes:
~$ showbootcodes
BOOT_IMAGE=TCL-sdb9 ro root=819 noswap noutc tz=PHT-8
or now
~$ date
Tue Jul 24 11:07:11 PHT 2012
Added in lilo.conf in TCL section
append = "noswap noutc tz=PHT-8"
Hopefully this ends all confusions. :D :D :D
-
Also delete "root =" & "read-only"
Any system based on initramfs must not have such options.
-
Can we then say that if TCL is installed on a hard drive and boot loader is lilo the boot codes have to be placed into the /etc/lilo.conf file as append = .
In my lilo.conf the section for TCL reads now:
image = /mnt/TCL/tce/boot/vmlinuz
initrd = /mnt/TCL/tce/boot/core.gz
root = /dev/sdb9
append = "quiet noswap noutc tz=PHT-8"
label = TCL-sdb9
The vga=mode, in my case vga=791, is placed before the Linux bootable partition config begins at the end of the global section.
-
What is the output of "showbootcodes" now?
-
What is the output of "showbootcodes" now?
BOOT_IMAGE=TCL-sdb9 quiet noswap noutc tz=PHT-8
-
Looks much better now. :)
Still not sure if that "root = /dev/sdb9" should be in there though...
-
root = /dev/sdb9 there or not does not seem to make any difference.
Just to double check for the whole concept of bootcodes in lilo.conf I booted from CD with "base". Installed to HD w/o any bootcodes. Used the bootcodes in lilo.conf as outlined as "append = *". Run lilo, booted into the new TCL partition and all was set correctly such as set to local time.