C Advanced Linuxrc Options #
Linuxrc is a program used for setting up the kernel for installation purposes. It allows the user to load modules, start an installed system, a rescue system or an installation via YaST.
Linuxrc is designed to be as small as possible. Therefore, all needed programs are linked directly into one binary. So there is no need for shared libraries in the init disk.
If you run Linuxrc on an installed system, it will work slightly differently so as not to destroy your installation. As a consequence you cannot test all features this way.
C.1 Passing parameters to Linuxrc #
Unless Linuxrc is in manual mode, it will look for an
info
file in these locations: first
/info
on the flash disk and if that does not exist,
for /info
in the initrd. After that it parses the
kernel command line for parameters. You may change the
info
file Linuxrc reads by setting the
info
command line parameter. If you do not want
Linuxrc to read the kernel command line (for example because you need to
specify a kernel parameter that Linuxrc recognizes as well), use
linuxrc=nocmdline
.
Linuxrc will always look for and parse a file
/linuxrc.config
. Use this file to change default
values if you need to. In general, it is better to use the
info
file instead. Note that
/linuxrc.config
is read before any
info
file, even in manual mode.
C.2 info
file format #
Lines starting with #
are comments, valid entries are
of the form:
key: value
Note that value
extends to the end of the line and
therefore may contain spaces. key
is matched
case-insensitive.
You can use the same key-value pairs on the kernel command line using
the syntax key=value
. Lines that do not have the form
described above are ignored.
The table below lists important keys and example values. For a complete list of linuxrc parameters refer to https://en.opensuse.org/SDB:Linuxrc.
Keyword: Example Value |
Description |
---|---|
|
If 0, never ask for swap; if the argument is a positive number
|
|
Location of the auto installation file; activates auto installation mode. See AutoYaST Control File Locations for details. |
|
10 seconds timeout for BOOTP requests. |
|
Sleep 5 seconds between network activation and starting bootp. |
|
Set the menu color scheme. |
|
Run command. |
|
Use the |
|
Load the installation system into RAM disk. |
|
Set up and start the network. See Section C.3, “Advanced Network Setup” for more information. |
|
Load MODULE. |
|
Install from the repository specified with URL. For the syntax of URL refer to https://en.opensuse.org/SDB:Linuxrc#url_descr. |
|
Virtual console keyboard map to load. |
|
Language preselected for the installation. |
|
Enable remote logging via syslog. |
|
Load installation system into RAM disk if free memory is above 50000 KB. |
|
Ask for swap if free memory drops below 10000 KB. |
|
Run YaST in text mode if free memory is below 20000 KB. |
|
Ask for swap before starting YaST if free memory is below 10000 KB. |
|
Proxy (either FTP or HTTP). |
|
Load the rescue system; the URL variant specifies the location of the rescue image explicitly. |
|
Location of the rescue system image. |
|
Location of the installation system image. |
|
Start YaST in text mode. |
|
Wait 4 seconds after loading the USB modules. |
|
Overrides the confirm parameter in a control file and requests confirmation of installation proposal. |
C.3 Advanced Network Setup #
Even if parameters like hostip
,
nameserver
, and gateway
are passed to
linuxrc, the network is only started when it is needed (for example, when
installing via SSH or VNC). Since autoyast
is not a linuxrc
parameter (this parameter is ignored by linuxrc and only passed to YaST),
the network will not be started automatically when
specifying a remote location for the AutoYaST profile.
Therefore the network needs to be started explicitly. This used to be done
with the linuxrc parameter netsetup
. Starting with
SUSE Linux Enterprise Server 12, the parameter ifcfg
is
available. It offers more configuration options, for example configuring
more than one interface. ifcfg
directly controls the
content of the /etc/sysconfig/network/ifcfg-*
files.
- DHCP Network Configuration
The general syntax to configure DHCP is
ifcfg=INTERFACE=DHCP*,OPTION1=VALUE1,OPTION2=VALUE2
where INTERFACE is the interface name, for example
eth0
, oreth*
for all interfaces. DHCP* can either bedhcp
(IPv4 and IPv6),dhcp4
, ordhcp6
.To set up DHCP for
eth0
use:ifcfg=eth0=dhcp
To set up DHCP on all interfaces use:
ifcfg=eth*=dhcp
- Static Network Configuration
The general syntax to configure a static network is
ifcfg=INTERFACE=IP_LIST,GATEWAY_LIST,NAMESERVER_LIST,DOMAINSEARCH_LIST,\ OPTION1=value1,...
where INTERFACE is the interface name, for example
eth0
. If usingeth*
, the first device available will be used. The other parameters need to be replaced with the respective values in the given order. Example:ifcfg=eth0=192.168.2.100/24,192.168.5.1,192.168.1.116,example.com
When specifying multiple addresses for a parameter, use spaces to separate them and quote the complete string. The following example uses two name servers and a search list containing two domains.
ifcfg="eth0=192.168.2.100/24,192.168.5.1,192.168.1.116 192.168.1.117,example.com example.net"
For more information refer to https://en.opensuse.org/SDB:Linuxrc#Network_Configuration.