FS#10075 - [ISO] Add tzselect in installation process
Attached to Project:
Arch Linux
Opened by Gerhard Brauer (GerBra) - Friday, 04 April 2008, 09:11 GMT
Last edited by Simo Leone (neotuli) - Wednesday, 22 October 2008, 02:16 GMT
Opened by Gerhard Brauer (GerBra) - Friday, 04 April 2008, 09:11 GMT
Last edited by Simo Leone (neotuli) - Wednesday, 22 October 2008, 02:16 GMT
|
Details
Description:
Installation starts with the clock set from BIOS clock. During install process the timezone is changed (ex. from UTC to CEST) but the clock/time remains the same. This leads often to a filesystem error (ex. ext3), which claims a superblock time stamp in the future and do a fsck directly after the first boot if the hardware clock wasn't UTC. Solution is to set the timezone and the therefor resulting time before starting the installer. It could be done easily by: a) date -s "hh:mm CEST" This result in an correct UTC time when using data afterwards. b) or let the user select correct timezone interactiv with tzselect. For this the packet tzdate(with tzselect) should be available on the install ISO. This could be handled like the keyboard layout selection with km. I prefer a hint for the user, so the /etc/motd on ISO could have an issue like: Timezone: - to set your time(zone) correctly during installlation, type tzselect on console. Additional info: * package version(s) ISO 2008.03 See also discussion on arch-general mailing list: http://archlinux.org/pipermail/arch-general/2008-March/017177.html |
This task depends upon
Closed by Simo Leone (neotuli)
Wednesday, 22 October 2008, 02:16 GMT
Reason for closing: Implemented
Wednesday, 22 October 2008, 02:16 GMT
Reason for closing: Implemented
HARDWARECLOCK="$(cmdline_param clock ${CLOCK_DEFAULT})"
TIMEZONE="$(cmdline_param timezone ${TIMEZONE_DEFAULT})"
That is, add things like "clock=utc timezone=America/Chicago" to the boot parameters.
Besides that there isn't a whole lot we can do about this, and it really isn't our biggest problem right now...
Yes, this must be set before the installer. Exactly during installation before fdisk'ing and configuring rc.conf, cause after configure the partitions are re-mountet. Therefor this tzselect/date -s could also be a part of the installer.
During installation we must have a correct timezone and a properly time based on this zone. At the moment the installer changes the TZ (if the user does this in rc.conf) but leaves the time itself as it is.
Assume after boot there ist 07:00 CET. That is what date says.
When changing TZ in rc.conf during installer maybe to CEST then it is
still 07:00 CEST. TZ is changed but not the time = wrong time, future time...
Maybe it's better explained in the Link above
http://archlinux.org/pipermail/arch-general/2008-March/017177.html
and the next mail in this thread.
We could, perhaps, assume system clocks are in UTC.
clock/time. Side effect is that this would also result in a correct utc time for installing.
http://projects.archlinux.org/?p=installer.git;a=blob;f=setup#l1665
Notice that the installer tries to set things inside the chroot after you edit rc.conf
Most(?) PCs have localtime as their HWCLOCK. So we could not automatically assume that this time is also the UTC time. The user/admin must select/set this.
And IMHO there will never be a problem with remounting during install if UTC-time is correctly suitable to users time/TZ - when set.
I think we have 3 options where one could set the time:
a) kernel boot parameter
You must think of user with non-US keyboards. It's not easy sometimes to find the right keys on an other layout for chars like " / ' ( and so on. So it think this is not the best solution
b) date -s
Works, but the user must known his timezone shortname (EST,CEST,...)
c) tzselect (from tzdate)
interactiv! userfriendly ;-)
But, I think it's best if we just add a new menu to the installer that allows a user to set their timezone. We can just call tzselect, get the output, and set things before we do FS creation.
In your test ISOs (you and Simo provide) you do a lot of things by grub/kernel parameters, i see.
But IMHO such a tool like km is a "little" better for setting things:
Want to change the language: type km
Want to change the TZ/time: type tzselect
Want to install arch? type /arch/setup
Have fun!
Specifically, this script needs to be included somewhere:
$/bin/sh
export TZ="$(tzselect)"
http://dev.archlinux.org/~tpowa/tz
There was an ugly hack to fix time-related problems.
Now it needs to be removed to not conflict with tzselect (and it seems it doesn't work for /dev/mapper/* partitions made by cryptsetup).
But it is important that user sets timezone correctly _before_mounting_anything_in_read-write_mode_,
thus it should become an obligatory step in install process, but still available separately for rescue-only using of LiveCD.
Since I was involved in previous time-related PITA-bugreports (more than 5 IIRC),
I feel it's my duty to fix this one again (doh!) before the next release.
@Simo: where can I grab the latest changes you've made to git tree of installer?
P.S.: haha, /me got his hands to bugtracker again :-P