http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_6.x_-_User_Guide_-_Basic_Configuration_-_Basic_System_Configuration&feed=atom&action=historyBering-uClibc 6.x - User Guide - Basic Configuration - Basic System Configuration - Revision history2024-03-28T13:13:29ZRevision history for this page on the wikiMediaWiki 1.26.0http://bering-uclibc.zetam.org/index.php?title=Bering-uClibc_6.x_-_User_Guide_-_Basic_Configuration_-_Basic_System_Configuration&diff=3133&oldid=prevKapeka: Created page with "{| summary="Navigation header" width="100%" ! colspan="3" align="center" | Bering-uClibc 6.x - User Guide - Basic Configuration - Basic System Configuration|Basic Configurat..."2017-08-06T16:17:00Z<p>Created page with "{| summary="Navigation header" width="100%" ! colspan="3" align="center" | Bering-uClibc 6.x - User Guide - Basic Configuration - Basic System Configuration|Basic Configurat..."</p>
<p><b>New page</b></p><div>{| summary="Navigation header" width="100%"<br />
! colspan="3" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Basic System Configuration|Basic Configuration - Basic System Configuration]]<br />
|-<br />
| width="20%" align="left" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Booting for the First Time|Prev]]<br />
! width="60%" align="center" | [[Bering-uClibc 6.x - User Guide]]<br />
| width="20%" align="right" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - LEAF Packages|Next]]<br />
|}<br />
----<br />
<br />
==Loading kernel modules==<br />
<br />
Loading kernel modules for LEAF Bering-uClibc 6.x is based on <code class="filename">modules.sqfs</code>, a squashfs file on your boot image, loaded during boot and containing all kernel modules available.<br />
<br />
Modules are loaded in three steps:<br />
* hardware modules are autodetected during startup and will be loaded without intervention.<br />
* Packages can load modules during startup with the helper scripts <code class="filename">mount_modules</code>/<code class="filename">umount_modules</code>; e.g. shorewall[6] uses that feature. If the Package developer takes care, modules needed for the Package are loaded automatically, when the package is started via init.<br />
* manual addition of modules, necessary if one of the above does not load the necessary module(s).<br />
<br />
===Manual addition of modules===<br />
If you need modules not detected during boot, just add the modules to <code class="filename">/etc/modules</code>, save the configuration and reboot.<br />
You can test before reboot by running <code class="filename">hwdetect</code> and restart the package that requires the module.<br />
<br />
E.g. the following modules not detected automatically '''do''' still need to be listed in <code class="filename">/etc/modules</code>:<br />
* <tt>tun</tt>, the network tunnel driver (required for OpenVPN).<br />
* <tt>lp</tt>, the line printer driver (required for the p9100 Package).<br />
<br />
==Configure your Keyboard==<br />
If you are a non US user you will probably need one of the alternative keyboard layouts provided in the <tt>keyboard.lrp</tt> package.<br />
<br />
To configure the keyboard layout run '''lrcfg''', go to the LEAF <tt>Packages configuration</tt> menu and choose <tt>keyboard</tt>.<br />
<br />
The following menu will appear:<br />
keyboard configuration files<br />
<br />
1) change keyboard language maps<br />
<br />
q) quit<br />
Type '''<tt>1</tt>''' to get access to the <tt>/etc/default/keyboard</tt> script where you will have to replace the <tt>KEYMAP</tt> variable (default="us.map") by the appropriate keyboard setting.<br />
<br />
The KEYMAP variable must be chosen among the following entries:<br />
azerty.map de.map gr.map lt.map ru.map trq.map<br />
be.map dk.map hu.map mk.map se.map ua.map<br />
bg.map dvorak.map il.map nl.map sg.map uk.map<br />
br-a.map es.map is.map no.map sk-y.map us.map<br />
cf.map et.map it.map pl.map sk-z.map wangbe.map<br />
croat.map fi.map jp.map pt.map slovene.map<br />
cz.map fr.map la.map ro.map trf.map<br />
To activate the new keyboard map get access to the Linux shell and type:<br />
svi keyboard start<br />
<br />
<br />
'''Important:''' To save your modification(s) do not forget to save the configuration!<br />
<br />
<br />
==Configure your Editor==<br />
All standard editors are based on <tt>e3</tt>, which provides five emulation modes:<br />
{| border="1"<br />
|-<br />
| e3em<br />
| emacs mode<br />
|-<br />
| e3ne<br />
| nedit mode<br />
|-<br />
| e3pi<br />
| pico mode<br />
|-<br />
| e3vi<br />
| vi mode<br />
|-<br />
| e3ws<br />
| wordstar mode<br />
|-<br />
|}<br />
<br />
<br />
The default editor for <tt>lrcfg</tt> is <tt>edit</tt> which is a small shell script that reads the environment variable <tt>EDITOR</tt> and calls <tt>e3</tt> with the chosen emulation mode. For arm based images (Raspberry Pi 1|3) the default editor is <tt>nano</tt>.<br />
<br />
To change the editor emulation mode directly, modify <tt>EDITOR</tt> in <tt>/etc/profile</tt>.<br />
<br />
Alternatively run '''lrcfg''', go to the LEAF <tt>System configuration</tt> menu and choose <tt>System wide profile</tt>.<br />
<br />
Change the <tt>EDITOR</tt> setting to your preferred editor, for example:<br />
#Set the desired editor (e3ne, e3em, e3pi, e3vi, e3ws)<br />
export EDITOR=e3ne<br />
<br />
The desired editor mode is available with the next login.<br />
<br />
You can always use another editor mode from the command line by calling it with the proper symlink - see table above.<br />
<br />
The main objective for the <tt>e3</tt> editor is small size, not complete emulation of the other editors. If you have the disk space and memory resources consider installing <tt>elvis.lrp</tt> or <tt>vim.lrp</tt> for a better <tt>vi</tt> experience than is provided by <tt>e3vi</tt>. In this case set <tt>EDITOR</tt> to <tt>vi</tt>.<br />
<br />
<br />
'''Important:''' To save your modification(s) do not forget to save the configuration!<br />
<br />
<br />
==Configure your Timezone==<br />
<br />
In Bering-uClibc <code class="filename">/etc/timezone</code> and the whole zoneinfo directory tree are not supported. To set the timezone, edit the <code class="filename">/etc/TZ</code> file and set the timezone in a single line, ending with a newline, as specified in http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html.<br />
<br />
'''Warning:''' Be sure to have no empty line at the end of <code class="filename">/etc/TZ</code> otherwise your timezone will be set to back UTC.<br />
<br />
For example: <tt>CST6CDT</tt> means Central Standard Time which is 6 hours earlier than Coordinated Universal Time (UTC) and that standard rules for adjustment to Daylight Savings Time are to be applied.<br />
Note that "standard" here means the standard post-2007 USA rules (Wikipedia description [http://en.wikipedia.org/wiki/Daylight_saving_time_in_the_United_States#2007_to_the_present here]) so for locations outside the USA it is usually necessary to explicitly specify the "rule" as described below.<br />
<br />
The first letters preceding the offset are actually nothing more than the descriptor used by programs such as "date" when displaying the time. Use whatever letters are meaningful in your area. The offset number is what is used to actually calculate the difference from UTC. The last three letters again can be anything that represents a meaningful adjustment to the offset given. A "tongue in cheek" example:<br />
<br />
MCT-6CDT<br />
<br />
is "legal" and might refer to Martian Canal Time which is defined as being 6 hours later than Coordinated Universal Time (UTC) and modified by one hour to Canal Daylight Time on the standard date.<br />
<br />
===Examples for TZ values===<br />
<br />
To give you an idea how to build your local TZ value, a few more examples provided by Erik Anderson:<br />
<br />
MDT6<br />
<br />
This means that MDT (Mountain Daylight Time) is 6 hours earlier than Coordinated Universal Time (UTC) and does not have daylight saving time.<br />
<br />
JST-9<br />
<br />
This means that Japanese Standard Time (JST) is 9 hours earlier than Coordinated Universal Time (UTC) and does not have daylight saving time.<br />
<br />
MST7MDT<br />
<br />
This means that Mountain Standard Time (MST) is 7 hours earlier than Coordinated Universal Time (UTC). Both standard time and daylight saving time apply to this locale. By default Mountain Daylight Time (MDT) is one hour ahead of MST. Since it isn't otherwise specified, daylight saving time starts on the second Sunday of March at 2:00 A.M. and ends on the first Sunday of November at 2:00 A.M. (according to the post-2007 USA daylight savings rules).<br />
<br />
NST3:30NDT1:30<br />
<br />
This means that Newfoundland Standard Time (NST) is 3.5 hours earlier than Coordinated Universal Time (UTC). Both standard time and daylight saving time apply to this locale. Newfoundland Daylight Time is 1.5 hours earlier than Coordinated Universal Time (UTC).<br />
<br />
MET-1METDST-2,M3.5.0/02:00:00,M10.5.0/03:00:00<br />
<br />
This example has been sent by Jacques Nilo and provides a complete example for MET, METDST (summer time) and the date and daytime it will be changed.<br />
<br />
===Specification of the TZ variable===<br />
<br />
This section is an extract from SUSv3 specification and the technical background how a TZ value is built.<br />
<br />
The value of TZ is of the form:<br />
<br />
<span class="emphasis">''std offset dst offset, rule''</span><br />
<br />
The format is as follows:<br />
<br />
<span class="emphasis">''stdoffset[dst[offset][,start[/time],end[/time]]]''</span><br />
<br />
Where:<br />
<br />
* <span class="bold">'''std and dst:'''</span> Indicate no less than three, nor more than {TZNAME_MAX}, bytes that are the designation for the standard ( std) or the alternative ( dst -such as Daylight Savings Time) timezone. Only std is required; if dst is missing, then the alternative time does not apply in this locale.<br />
<br />
* <span class="bold">'''std and dst:'''</span> Indicate no less than three, nor more than {TZNAME_MAX}, bytes that are the designation for the standard ( std) or the alternative ( dst -such as Daylight Savings Time) timezone. Only std is required; if dst is missing, then the alternative time does not apply in this locale.<br />
<br />
* <span class="bold">'''offset:'''</span> Indicates the value added to the local time to arrive at Coordinated Universal Time. The offset has the form: <span class="emphasis">''hh[:mm[:ss]]''</span>The minutes ( mm) and seconds ( ss) are optional. The hour ( hh) shall be required and may be a single digit. The offset following std shall be required. If no offset follows dst, the alternative time is assumed to be one hour ahead of standard time. One or more digits may be used; the value is always interpreted as a decimal number. The hour shall be between zero and 24, and the minutes (and seconds)-if present-between zero and 59. The result of using values outside of this range is unspecified. If preceded by a '-', the timezone shall be east of the Prime Meridian; otherwise, it shall be west (which may be indicated by an optional preceding '+' ).<br />
<br />
* <span class="bold">'''rule:'''</span> Indicates when to change to and back from the alternative time. The rule has the form: <span class="emphasis">''date[/time],date[/time]''</span>where the first date describes when the change from standard to alternative time occurs and the second date describes when the change back happens. Each time field describes when, in current local time, the change to the other time is made.The format of date is one of the following:<br />
** '''Jn:''' The Julian day n (1 &lt;= n &lt;= 365). Leap days shall not be counted. That is, in all years-including leap years-February 28 is day 59 and March 1 is day 60. It is impossible to refer explicitly to the occasional February 29.<br />
** '''n:''' The zero-based Julian day (0 &lt;= n &lt;= 365). Leap days shall be counted, and it is possible to refer to February 29.<br />
** '''Mm.n.d:''' The d'th day (0 &lt;= d &lt;= 6) of week n of month m of the year (1 &lt;= n &lt;= 5, 1 &lt;= m &lt;= 12, where week 5 means "the last d day in month m" which may occur in either the fourth or the fifth week). Week 1 is the first week in which the d'th day occurs. Day zero is Sunday. The time has the same format as offset except that no leading sign ( '-' or '+' ) is allowed. The default, if time is not given, shall be 02:00:00.<br />
<br />
<br />
----<br />
{| summary="Navigation footer" width="100%"<br />
| width="40%" align="left" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - Booting for the First Time|Prev]]<br />
| width="20%" align="center" | [[Bering-uClibc 6.x - User Guide - Basic Configuration|Up]]<br />
| width="40%" align="right" | [[Bering-uClibc 6.x - User Guide - Basic Configuration - LEAF Packages|Next]]<br />
|}<br />
<br />
[[Category:Bering-uClibc 6.x]]<br />
[[Category:User Guide]]</div>Kapeka