Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Documentation de SUSE Linux Enterprise Server / AutoYaST Guide / Appendixes / Advanced linuxrc options
Applies to SUSE Linux Enterprise Server 15 SP4

C Advanced linuxrc options

linuxrc is a small program that runs after the kernel has loaded, but before AutoYaST or other stages. It prepares the system for installation. It allows the user to load modules, start an installed system or a rescue system, and to guide the operation of YaST.

Note
Note: AutoYaST and linuxrc settings are not identical

Some linuxrc settings coincidentally have the same names as settings used by AutoYaST in its autoyast.xml file. This does not mean that they take the same parameters or function in the same way. For example, AutoYaST takes a self_update setting. If this value is set to 1, another setting, self_update_url will be read and followed. Although linuxrc also has a self_update setting, linuxrc's setting takes values of either 0 or a URL.

Do not pass AutoYaST parameters to linuxrc, as this will almost certainly not give the desired results.

If linuxrc is installed on a machine, information about it can be found in the directory /usr/share/doc/packages/linuxrc/. Alternatively, its documentation can be found online at: https://en.opensuse.org/SDB:Linuxrc.

Note
Note: Running linuxrc on an installed system

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.

To keep the linuxrc binary file as small as possible, all its libraries and other supplemental files are linked directly into the main program binary file. This means that there is no need for any shared libraries in the initial RAM disk, initrd.

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 (for example, a USB stick) 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 called /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. The matching of key is on a case-insensitive basis.

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 will be 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.

Table C.1: Advanced linuxrc keywords

Keyword: Example Value

Description

addswap: 0|3|/dev/sda5

If 0, never ask for swap; if the argument is a positive number n, activate the swap partition; if the argument is a partition name, activate this swap partition.

autoyast: ftp://AUTOYASTFILE

Location of the auto installation file; activates auto installation mode. See AutoYaST control file locations for details.

bootptimeout: 10

10 seconds timeout for BOOTP requests.

bootpwait: 5

Sleep 5 seconds between network activation and starting bootp.

display: color|mono|alt

Set the menu color scheme.

exec: COMMAND

Run command.

forceinsmod: 0|1

Use the -f option (force) when running insmod commands.

forcerootimage: 0|1

Load the installation system into RAM disk.

ifcfg: NETWORK_CONFIGURATION

Set up and start the network. See Section C.3, “Advanced network setup” for more information.

insmod: MODULE

Load MODULE.

install: URL

Install from the repository specified with URL. For the syntax of URL refer to https://en.opensuse.org/SDB:Linuxrc#url_descr.

keytable: de-lat1-nd

Virtual console keyboard map to load.

language: de_DE

Language preselected for the installation.

loghost: 10.10.0.22

Enable remote logging via syslog via UDP port 514

loghost: @10.10.0.22

Enable remote logging via syslog via TCP port 514

memloadimage: 50000

Load installation system into RAM disk if free memory is above 50000 KB.

memlimit: 10000

Ask for swap if free memory drops below 10000 KB.

memYaST: 20000

Run YaST in text mode if free memory is below 20000 KB.

memYaSTText: 10000

Ask for swap before starting YaST if free memory is below 10000 KB.

proxy: http://10.10.0.1:3128

Defines an HTTP proxy server. For the full parameter syntax, refer to https://en.opensuse.org/SDB:Linuxrc#p_proxy.

rescue: 1|nfs://server/dir

Load the rescue system; the URL variant specifies the location of the rescue image explicitly.

rescueimage: /suse/images/rescue

Location of the rescue system image.

rootimage: /suse/images/root

Location of the installation system image.

textmode: 1

Start YaST in text mode.

usbwait: 4

Wait four seconds after loading the USB modules.

y2confirm

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). Because autoyast is not a linuxrc parameter (this parameter is ignored by linuxrc and is 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 is done by using the parameter ifcfg. 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, or eth* for all interfaces. DHCP* can either be dhcp (IPv4 and IPv6), dhcp4, or dhcp6.

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 using eth*, 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.