Initramfs init: Difference between revisions

From Alpine Linux
No edit summary
Line 1: Line 1:
== initramfs init cmdline options ==
== initramfs init cmdline options ==


The init script in the initramfs which is loaded by the kernel understands the following entires in your kernel command line:
In addition to the [https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html kernel boot parameters] are a number of parameters that the init script understands.
 
Although you may specify your own init script when building an initramfs, these parameters allow for extensive control over the initial startup of an Alpine Linux system.
 
<code>quiet</code> : less verbose init script execution
 
<code>debug_init</code> : sets '-x' in the init script and -d for mdev
 
<code>chart</code> : Enables bootchartd for measuring system startup speed.


<code>ip=dhcp</code> : use DHCP for network configuration.
<code>ip=dhcp</code> : use DHCP for network configuration.
Line 16: Line 24:
* <code>dns2</code>      address of the 2nd DNS server
* <code>dns2</code>      address of the 2nd DNS server


<code>alpine_repo=</code> : the location of the Alpine repository from which packages are downloaded.
<code>modloop=URL</code> : the remote location of the image containing kernel's modules, required for LVM and raid setup.


:For stable release, use <code>http://dl-cdn.alpinelinux.org/alpine/v3.9/main</code>
:The remote location of the <code>modloop</code> image is the same as the kernel and initramfs (see below).


:For rolling release, use <code>http://dl-cdn.alpinelinux.org/alpine/edge/main</code>
<code>blacklist=MODULE{,MODULE}</code> : This comma-separated list names kernel modules that modprobe will reject to load.


<code>modloop=</code> : the remote location of the image containing kernel's modules, required for LVM and raid setup.
<code>alpine_repo=URL</code> : the location of the Alpine repository from which packages are downloaded.


:The remote location of the <code>modloop</code> image is the same as the kernel and initramfs (see below).
:For stable release, use <code>http://dl-cdn.alpinelinux.org/alpine/v3.9/main</code>


<code>ssh_key=</code> : the remote location of your SSH public key which is used to allow SSH connection into the installer. It will be downloaded and copied into <code>/root/.ssh/authorized_keys</code> in the installer.
:For rolling release, use <code>http://dl-cdn.alpinelinux.org/alpine/edge/main</code>


{{Note|Fetching public keys from HTTP, HTTPS and FTPS are supported. HTTP should only be used in local development network where you own the network.}}
<code>ssh_key=URL</code> : the remote location of your SSH public key. It will be added to root's authorized_keys. Also triggers OpenSSH-server to be installed and started.


{{Note|Alpine Linux security policies are against using passwords for root access via SSH as we consider using public-private key pairs is a much better approach.}}
<code>apkovl=URL</code> : Unpack the APK Overlay file from this URL. Happens immediately after network is up . This option will set the default  for service install and setup to false. (see .default_boot_services).


<code>quiet</code> : less verbose init script execution
(work in progress)


<code>debug_init</code> : sets '-x' in the init script and -d for mdev
* init=
* init_args=


* chart (flag)
* alpine_repo=
* blacklist=
* apkovl=URL load the apkovl file from URL
* dasd=
* dasd=
* s390x_net=
* s390x_net=
Line 53: Line 58:
* resume
* resume
* rootflags
* rootflags
* init=
* init_args=
* usbdelay
* usbdelay
* pkgs=
* pkgs=

Revision as of 17:40, 18 June 2019

initramfs init cmdline options

In addition to the kernel boot parameters are a number of parameters that the init script understands.

Although you may specify your own init script when building an initramfs, these parameters allow for extensive control over the initial startup of an Alpine Linux system.

quiet : less verbose init script execution

debug_init : sets '-x' in the init script and -d for mdev

chart : Enables bootchartd for measuring system startup speed.

ip=dhcp : use DHCP for network configuration.

ip=client-ip:server-ip:gw-ip:netmask:hostname:device:autoconf:dns1:dns2 : use static IP configuration, each field is separated by a colon :

  • client-ip ip address of the guest VM where we are going to run the installer
  • server-ip not used, leave blank or fill with none
  • gw-ip the gateway ip address
  • netmask the netmask
  • hostname not used, leave blank or fill with none
  • device the network interface of the guest VM, default is eth0 if left blank
  • autoconf not used, leave blank or fill with none or off
  • dns1 address of the DNS server
  • dns2 address of the 2nd DNS server

modloop=URL : the remote location of the image containing kernel's modules, required for LVM and raid setup.

The remote location of the modloop image is the same as the kernel and initramfs (see below).

blacklist=MODULE{,MODULE} : This comma-separated list names kernel modules that modprobe will reject to load.

alpine_repo=URL : the location of the Alpine repository from which packages are downloaded.

For stable release, use http://dl-cdn.alpinelinux.org/alpine/v3.9/main
For rolling release, use http://dl-cdn.alpinelinux.org/alpine/edge/main

ssh_key=URL : the remote location of your SSH public key. It will be added to root's authorized_keys. Also triggers OpenSSH-server to be installed and started.

apkovl=URL : Unpack the APK Overlay file from this URL. Happens immediately after network is up . This option will set the default for service install and setup to false. (see .default_boot_services).

(work in progress)

  • init=
  • init_args=
  • dasd=
  • s390x_net=
  • rootfstype=
  • modules=
  • crytptroot=
  • cryptdm=
  • cryptheader=
  • cryptoffset=
  • cryptokey=
  • nbd=
  • root=
  • resume
  • rootflags
  • usbdelay
  • pkgs=
  • ssh_key=
  • keep_apk_new
  • splash=