aboutsummaryrefslogtreecommitdiffstats
path: root/initramfs-init.in
Commit message (Collapse)AuthorAgeFilesLines
* init: add support for force importing ZFS pool and ZFS native encryptionRasmus Thomsen2019-10-091-0/+22
|
* Add missing return to ip_choose_ifHarm Berntsen2019-06-071-1/+1
| | | | | | | Right now, when $KOPT_BOOTIF is specified, it can echo a device related to that option and still continue with the loop that checks the operstate. Due to this, it can echo two network interfaces. This commit fixes that so it will only return a single network interface.
* init: allow uppercase parm for dasd and qeth on s390xTuan Hoang2019-06-071-2/+2
|
* init: use hwclock on s390xTuan Hoang2019-03-131-1/+1
|
* init: use openssl instead of libresslNatanael Copa2019-02-081-2/+2
|
* init: fix fbsplashTimo Teräs2019-02-061-1/+1
| | | | | The configuration option was renamed when parts of our patch were upstreamed to busybox.
* init: fix root=ZFS... from grubNatanael Copa2019-01-251-4/+12
| | | | | grub will set root=ZFS=... when root is zfs but will not add rootfstype, so make a special case for zfs
* mkinitfs: init: enable the init= kernel command line argumentJesse Young2019-01-031-5/+8
|
* Move code blocks for initializing the early userspace togetherAin2018-11-081-26/+28
|
* Add support for BOOTIF boot parameterAin2018-11-081-1/+8
| | | | | | | BOOTIF can be set by the SYSAPPEND option of PXELINUX. Its primary usecase is telling the OS which interface it was booted from. This fixes netbooting from eth1 or upwards if eth0 is connected to an different network.
* Cleanup and improve documentation for ip= parameterAin2018-11-081-18/+24
|
* Make fetching the DMI uuid fail silentlyAin2018-11-081-1/+1
| | | | This flag does not exist on most non-x86 platforms.
* Remove nodma kernel optionAin2018-11-081-5/+0
| | | | The kernel offers the same functionality through libata.dma=0.
* Reuse kernel-side configuration for console= devicesAin2018-08-211-27/+17
| | | | | | | | | | | | | | | | Instead of parsing the console= options in the initramfs, we ask the kernel of its interpretation of the console= parameters. The kernel does the console setup as part of its early startup, including the configuration of the baud rate, control bits and flow control. The options and format of the console= parameter are documented here: https://www.kernel.org/doc/html/v4.15/admin-guide/serial-console.html By keeping the settings from the kernel, we avoid baud rate switching between printk and getty output on edge cases. This adds support for additional tty types, like hvc, while removing string parsing code from the initramfs.
* Fix network setup when only ip= is explicitly givenAin2018-08-211-25/+42
| | | | | | | | Previously, configure_ip was only called from code paths of other boot options that require network. This fixes the passing of -n to nlplug-findfs and --no-network to the apk memory bootstrap.
* Add support for signed modloop imagesCarlo Landmeter2018-08-211-0/+7
|
* init: use swclock when no rtc is foundCarlo Landmeter2018-06-281-1/+15
|
* init: fix comment for ip_choose_ifNatanael Copa2018-06-131-1/+1
|
* Add support for keyfileslemmarathon2018-06-121-3/+8
| | | | | | | The "cryptkey" boot parameter enables keyfile decryption. By default, init will look for a keyfile named "/crypto_keyfile.bin". Another file may be specified like so: "cryptkey=/path/to/keyfile.bin". If keyfile decryption fails, init will fall back to passphrase mode.
* Use first network interface that is upMick Tarsel2018-06-121-1/+4
| | | | | | | | Previous code would return eth0 every time and pay no attention if interface was up. This patch gets the state from operstate file in sysfs to use the interface that is actually up in case there are multiple interfaces present. If no interface is up, just use last interface.
* init: dont install wgetNatanael Copa2018-06-121-16/+0
| | | | ssl_client provides the https support for busybox wget
* init: remove ssh_pass and make sure to start sshdNatanael Copa2018-06-121-2/+3
| | | | | | | ssh_pass is not recommended and causes some issues in firstboot. We remove support for it to keep things simple. also make sure that sshd is started if ssh_key is set
* initramfs-init: add support for ssh installerTuan M. Hoang2018-05-241-5/+32
| | | | | | | | | | | | This commit allows starting 'firstboot' service (see aports/openrc), which will setup installation through SSH if specified in kernel parameters. Real wget is used instead since busybox's wget is broken without openssl binary #8917. Credits to clandmeter. - Allow adding DNS server in configure_ip() - Prefix kernel parameters with KOPT_
* initramfs-init: add disk and network detection on s390xTuan M. Hoang2018-05-141-1/+20
| | | | | - Allow including dasd and qeth modules when building initramfs - Add detection for dasd and qeth devices from cmdline in init
* initramfs: do not relocate mountpoint for netbootCarlo Landmeter2018-02-201-0/+4
| | | | mountpoint cannot be located when repo is external.
* initramfs-init: redirect output of brtfs scan to /dev/nullSören Tempel2018-02-181-1/+2
| | | | | None of the other commands emit any output if everything works as expected and I just like consistency.
* handle more than 2 blacklisted modules in cmdlineManuel Mendez2018-01-191-1/+1
| | | | | | | | | | | | | | example: ```sh ❯ docker run --rm -ti alpine / # KOPT_blacklist=igb,ixgbe,tg3 / # for i in ${KOPT_blacklist/,/ }; do echo "blacklist $i"; done blacklist igb blacklist ixgbe,tg3 / # for i in ${KOPT_blacklist//,/ }; do echo "blacklist $i"; done blacklist igb blacklist ixgbe blacklist tg3 ```
* skip hooks on diskless installHenrik Riomar2018-01-091-1/+1
| | | | | | | | We can not run hooks before musl and busybox is installed. Use the new flag --initramfs-diskless-boot in order to skip hooks. This flag also implies --initdb and the relevant --force flags for initramfs diskless boot.
* fix booting from btrfs on multiple devicesJakub Jirutka2017-09-221-0/+4
| | | | | | | | | https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices: > btrfs device scan is used to scan all of the block devices under /dev > and probe for Btrfs volumes. This is required after loading the btrfs > module if you're running with more than one device in a filesystem. See http://bugs.alpinelinux.org/issues/6903
* init: add cryptdiscards optionSören Tempel2017-08-031-2/+5
| | | | | When enabled allows the use of discard (TRIM) requests for the device. See cryptsetup(1) for more information.
* init: add flow control to getty if present in kernel cmdlineManuel Mendez2017-06-141-1/+1
|
* init: properly parse kernel serial console optionsManuel Mendez2017-06-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to https://www.kernel.org/doc/Documentation/admin-guide/serial-console.rst the serial port options is specified as: "... BBBBPNF, where BBBB is the speed, P is parity (n/o/e), N is number of bits, and F is flow control ('r' for RTS)." Parity and Number of bits are ignored since getty does not have any options for them. I tested the paramater substitution using the following script/snippet: ```sh / # cat /etc/alpine-release; cat kernel2getty.sh; sh kernel2getty.sh 3.5.2 consoles="ttyS0 ttyS0,115200 ttyS0,115200n8 ttyS0,115200n8r ttyS0,115200r" for console in $consoles; do line=-L term=vt100 tty=${console%,*} speed=${console#*,} flow=${speed##*[^r]} speed=${speed%%[^0-9]*} echo "console=$console" echo " speed=$speed" echo " flow=$flow" echo " getty=getty ${flow:+-h }$line ${speed:-15200} $tty $term" echo "----------" done console=ttyS0 speed= flow= getty=getty -L 15200 ttyS0 vt100 ---------- console=ttyS0,115200 speed=115200 flow= getty=getty -L 115200 ttyS0 vt100 ---------- console=ttyS0,115200n8 speed=115200 flow= getty=getty -L 115200 ttyS0 vt100 ---------- console=ttyS0,115200n8r speed=115200 flow=r getty=getty -h -L 115200 ttyS0 vt100 ---------- console=ttyS0,115200r speed=115200 flow=r getty=getty -h -L 115200 ttyS0 vt100 ---------- ``` closes #7037
* initramfs-init: LUKS header & offset support7heo2017-04-051-2/+8
|
* init: pull in libressl instead of openssl for encrypted apkovlNatanael Copa2017-03-131-1/+1
| | | | ref #6689
* init: try load rootfstype module earlyNatanael Copa2017-01-101-1/+1
| | | | | | zpool needs the zfs module to be loaded early. by also loading rootfstype module early we don't need specify zfs to both modules and rootfstype
* init: create /etc/mtab unconditionallyNatanael Copa2017-01-101-4/+2
|
* init: make nlplug-findfs verbose with debug_initNatanael Copa2017-01-101-1/+2
|
* add zpool import capabilityMark Riedesel2016-12-241-0/+5
|
* mkinitfs: add support for resumeStefan Wagner2016-11-281-4/+13
| | | | | | | | | | | | | This patch tries to add resume from hibernation (aka suspend to disk) support to mkinitfs. The swap partition can be provided via the resume option. The default Alpine Linux kernel has no hibernation support compiled in, so a custom kernel is needed in order to use this. Some links on the topic: * https://wiki.gentoo.org/wiki/Custom_Initramfs/Hibernation * https://git.archlinux.org/mkinitcpio.git/tree/hooks/resume
* init: fix quoting issue for kernel argumentsShiz2016-11-281-1/+1
| | | | | | | The kernel passes arguments from /proc/cmdline as a single string like foo=bar baz="something with spaces". In the latter case, with the added single quotes the actual value of ${KOPT_baz} would contain these quotes as well, which is not the intention.
* initramfs-init: check that fbplash image exists firstTimo Teräs2016-11-241-0/+1
|
* init: dont use local in global scopeNatanael Copa2016-11-241-4/+3
|
* mkinitfs: add nbd supportCarlo Landmeter2016-10-281-9/+29
| | | | | this also introduces default behaviour for networking calling configure_ip without setting ip defaults to dhcp
* init: make network boot work without apkovlKaarle Ritvanen2016-10-201-1/+4
|
* init: recognize ttyAMA as serial consoleTimo Teräs2016-07-141-1/+1
|
* init: add support for ttyMFD and ttyUSB serial consoleNatanael Copa2016-06-201-2/+2
| | | | and set default speed to 115200.
* init: support individual splash image per fbdevTimo Teräs2016-02-171-9/+15
|
* init: hide kernel messages with 'quiet'Natanael Copa2016-01-181-1/+1
| | | | | this was commented out during nlplug-findfs refactor for debugging purposes. uncomment it again.
* init: dont launch emergency shell if http repo is specifiedNatanael Copa2016-01-181-1/+7
| | | | | | | we we specify a repo with boot option then we should not launch an emergency shell even if no repo was found. This is needed for pxe boot.
* init: set MAC_ADDRESS in the scope where $device existsNatanael Copa2016-01-181-1/+1
| | | | | we need set MAC_ADDRESS where whi know $device, which is a local variable.