aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* defaults/unlock-luks.sh: Synchronize style with openLUKS()Thomas Deutschmann2020-09-021-2/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: openLUKS(): Trigger module loading when mounting ↵Thomas Deutschmann2020-09-023-4/+19
| | | | | | | | | {root,swap}_keydev We need to do the same we do for rootfs since commit 05f968fda2c6839744b36c442b3feaa6de974e63 also for {root,swap}_keydev. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.defaults: Rename $CRYPT_KEYFILE_{ROOT,SWAP} -> ↵Thomas Deutschmann2020-09-022-4/+4
| | | | | | $CRYPT_{ROOT,SWAP}_KEYFILE Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: fix typoKarlson2k (Evgeny Grin)2020-08-301-1/+1
| | | | | | Signed-off-by: Karlson2k (Evgeny Grin) <k2k@narod.ru> Closes: https://github.com/gentoo/genkernel/pull/19 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Add gksosreportThomas Deutschmann2020-08-283-7/+91
| | | | | | | | | | To help debugging, 'gksosreport' was added (idea was borrowed from dracut): Whenever a user run into a problem and get to a rescue shell, running "gksosreport" will generate /run/initramfs/gksosreport.txt containing useful debug information suitable to attach to bug reports. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Try to determine filesystem typeThomas Deutschmann2020-08-282-2/+46
| | | | | | | | | 'mount -t auto' will not trigger module loading for filesystem kernel modules. Therefore we try to determine filesystem to trigger module loading in case filesystem isn't built into the kernel. Bug: https://bugs.gentoo.org/739250 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Add gk.udev.debug to run udevd in debug modeThomas Deutschmann2020-08-282-1/+10
| | | | | | | When gk.udev.debug=yes is set (boolean option), udevd will run in debug mode. Output will be written to /run/initramfs/udevd.log. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Log udevd debug output into /run/initramfs/udevd.logThomas Deutschmann2020-08-282-1/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Always preserve logThomas Deutschmann2020-08-283-109/+8
| | | | | | | | | | Now that we are using UDEV and have to preserve /run, we can also use /run to always store log from initramfs. This will make debugging easier because user don't have to explicit enable logging (disabling is still possible). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Use switch_root from util-linuxThomas Deutschmann2020-08-281-30/+2
| | | | | | | | | | switch_root from busybox does not move /dev, /sys, /proc and /run. If we do that manually there is a small window for a race condition when /dev, /sys or /proc is still needed but already moved. switch_root from util-linux will move these mounts on its own and will therefore avoid any potential problems. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Make use of PATH (2)Thomas Deutschmann2020-08-281-3/+4
| | | | | | Don't use absolute paths. Use 'hash' to test if command is available. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: log_msg(): Leave function early in case log file ↵Thomas Deutschmann2020-08-281-1/+1
| | | | | | cannot be written Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Support devices with symlinks (2)Thomas Deutschmann2020-08-281-1/+1
| | | | | | Follow up for commit 0048f44c081dce2e296b48c71a208abf2a815c84. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Add debug breakpoint before udevd startThomas Deutschmann2020-08-281-0/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/config.sh: Add DEFAULT_<TYPE>_<TCVAR> to allow overrideThomas Deutschmann2020-08-281-6/+20
| | | | | | | _tc-getPROG() can only override variable with user provided value when there is a default value. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* kernel-generic-config: Enable WireGuard supportThomas Deutschmann2020-08-271-0/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Disable processing of modules_load file by defaultThomas Deutschmann2020-08-263-12/+26
| | | | | | | | | | | Now that we are using (e)udev with kmod support, we can rely on UDEV to load required kernel modules. Old module loading based on modules_load file can still be enabled via boolean "gk.hw.use-modules_load" kernel command-line option which is inverting and replacing previous "nodetect" kernel command-line option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* eudev: Enable kmod supportThomas Deutschmann2020-08-261-3/+10
| | | | | | This will allow us to use (e)udev to load required kernel modules. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/modules_load: Add hv_sock to Hyper-V modules listThomas Deutschmann2020-08-251-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/modules_load: Fix Hyper-V keyboard supportThomas Deutschmann2020-08-251-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Hide first output until cmdline was parsedThomas Deutschmann2020-08-241-2/+2
| | | | | | | | This will make us honor QUIET kernel command-line argument and allow full silent boot. Link: https://forums.gentoo.org/viewtopic-t-1117988.html Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* busy-config: Disable CONFIG_STACK_OPTIMIZATION_386Thomas Deutschmann2020-08-231-0/+1
| | | | | | | | Using '-mpreferred-stack-boundary=2' is considered broken and is causing problems for some users. Bug: https://bugs.gentoo.org/725674 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: log_msg(): Log millisecondsThomas Deutschmann2020-08-211-2/+2
| | | | | | | This will allow us to see more in detail where initramfs spent time. Bug: https://bugs.gentoo.org/738378 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* --luks: Add support for Serpent cipherThomas Deutschmann2020-08-211-1/+1
| | | | | Link: https://forums.gentoo.org/viewtopic-t-1117806.html Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Process /etc/initramfs.mounts multiple timesThomas Deutschmann2020-08-192-34/+56
| | | | | | | | | | | | | | We need to mount mountpoints listed in /etc/initramfs.mounts before validating REAL_INIT in case init is located on seperate mount. In addition the code was moved to a dedicated function named process_initramfs_mounts() to allow to run it multiple times which is needed if REAL_INIT wasn't verified (in case system was booted from livecd). Link: https://forums.gentoo.org/viewtopic-t-1117762.html Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: start_volumes(): Don't wait for /dev/zfsThomas Deutschmann2020-08-091-12/+1
| | | | | | | This is not needed anymore and also not working. Bug: https://bugs.gentoo.org/736084 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: start_volumes(): Drop ZPOOL_IMPORT_UDEV_TIMEOUT_MS ↵Thomas Deutschmann2020-08-091-3/+0
| | | | | | | | | workaround Now that we switched to (E)UDEV usage, this workaround is no longer needed. Follow-up: 73689f8 ("ZFS: Enable UDEV support") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* modules_load: Add vmw_pvscsi for VMware PVSCSI driver supportThomas Deutschmann2020-08-041-1/+1
| | | | | Link: https://forums.gentoo.org/viewtopic-t-1116502.html Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* keymaps: update Norwegian (no) keymapThomas Deutschmann2020-08-011-0/+0
| | | | | Bug: https://bugs.gentoo.org/666442 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Unify grep usageThomas Deutschmann2020-08-012-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* ZFS: Enable UDEV supportv4.1.0_beta1Thomas Deutschmann2020-07-241-7/+17
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* dmraid: Switch to UDEV usageThomas Deutschmann2020-07-242-10/+10
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* multipath: Switch to UDEV usageThomas Deutschmann2020-07-241-36/+10
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* bcache: Switch to UDEV usageThomas Deutschmann2020-07-243-34/+7
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* cryptsetup: Enable UDEV supportThomas Deutschmann2020-07-241-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* mdadm: Switch to UDEV usageThomas Deutschmann2020-07-244-43/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Switch from MDEV to UDEVThomas Deutschmann2020-07-245-36/+113
| | | | | | | | | We need to switch from using MDEV to UDEV to avoid boot problems due to timeouts caused by some UDEV rules from real system when real system is using systemd. Bug: https://bugs.gentoo.org/706434 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: Improve logging in *_resume functionsThomas Deutschmann2020-07-241-2/+2
| | | | | | Add device which was tried to resume from to log message. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: mount_devfs(): Make sure that /dev/shm is availableThomas Deutschmann2020-07-241-0/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Make use of PATHThomas Deutschmann2020-07-243-21/+25
| | | | | | Don't use absolute paths. Use 'hash' to test if command is available. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: openLUKS(): Fix styleThomas Deutschmann2020-07-241-1/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/software.sh: Fix styleThomas Deutschmann2020-07-241-18/+18
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: do_resume(): Use find_real_device() to determine ↵Thomas Deutschmann2020-07-241-0/+9
| | | | | | REAL_RESUME device Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Support devices with symlinksThomas Deutschmann2020-07-232-9/+20
| | | | | | | /dev/vg/foo can be a symlink to ../dm-1. This commit will allow to use such a value for devices, i.e. ROOT=/dev/vg/foo. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Add gk.userinteraction.disabledThomas Deutschmann2020-07-163-0/+61
| | | | | | | | When this option is set and enabled, genkernel initramfs will not prompt on errors, i.e. this will disable any user interaction, e.g. for a kiosk system. Bug: https://bugs.gentoo.org/730966 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Fix mounting of /procThomas Deutschmann2020-07-161-1/+1
| | | | | | Cannot use `run` before root was mounted writable. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add ZSTD compression support for initramfsThomas Deutschmann2020-07-161-0/+5
| | | | | Bug: https://bugs.gentoo.org/731294 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_determineargs.sh: determine_real_args(): Don't call gcc directlyThomas Deutschmann2020-07-161-0/+3
| | | | | | | Set $CHOST variable via config so that we no longer need to call gcc directly to determine CHOST value. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Move and unify validation of ↵Thomas Deutschmann2020-07-161-0/+37
| | | | | | | | | | | | | | | --compress-initramfs-type to determine_real_args() This will allow us to error out early if required user space tool needed to compress initramfs based on specified --compress-initramfs-type is missing or selected type is invalid/unsupported. Best/fastest list is based on results from [Link1][Link2][Link3]. Link1: https://events.static.linuxfound.org/sites/events/files/lcjpcojp13_klee.pdf Link2: https://kernel.ubuntu.com/~cking/boot-speed-eoan-5.3/kernel-compression-method.txt Link3: https://lwn.net/Articles/817134/ Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/initrd.scripts: test_success(): Fix quotingThomas Deutschmann2020-06-231-2/+2
| | | | | Bug: https://bugs.gentoo.org/494710 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>