aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gen_initramfs.sh: append_eudev(): log udevadm errors to $LOGFILEThomas Deutschmann2021-02-091-1/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: copy_binaries(): use global LC_ALLThomas Deutschmann2021-02-081-1/+1
| | | | | | Since commit 0785165ca64 we set LC_ALL in global scope. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: remove unused function is_static()Thomas Deutschmann2021-02-081-6/+0
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: fix typo: s/auxilary/auxiliary/gGöktürk Yüksek2021-02-061-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_base_layout(): Create /etc/{group,passwd,shadow} in ↵Thomas Deutschmann2020-08-281-17/+58
| | | | | | | | this function These files should be present all the time, not just when built with --ssh option set. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_base_layout(): Symlink '/etc/mtab' to ↵Thomas Deutschmann2020-08-281-0/+3
| | | | | | '/proc/self/mounts' Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_base_layout(): Add /etc/initrd-releaseThomas Deutschmann2020-08-281-1/+10
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/linuxrc: Add gksosreportThomas Deutschmann2020-08-281-1/+7
| | | | | | | | | | 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: Always preserve logThomas Deutschmann2020-08-281-7/+3
| | | | | | | | | | 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>
* Remove --disklabel optionThomas Deutschmann2020-08-281-1/+0
| | | | | | | Now that we always build util-linux for switch_root, we no longer need this option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Use switch_root from util-linuxThomas Deutschmann2020-08-281-12/+12
| | | | | | | | | | 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>
* gen_initramfs.sh: append_base_layout(): move /run/utmp to /var/run/utmpThomas Deutschmann2020-08-281-2/+2
| | | | | | | | | | Will fix syslogin_perform_logout: logout(pts/0) returned an error: No such file or directory error logged by dropbear. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_modules(): Update modules.* files to represent ↵Thomas Deutschmann2020-08-251-0/+5
| | | | | | initramfs content Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_multipath(): don't check package file list with ↵Thomas Deutschmann2020-08-241-1/+0
| | | | | | realpath Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_zfs(): don't check package file list with realpathThomas Deutschmann2020-08-241-1/+0
| | | | | Bug: https://bugs.gentoo.org/738740 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_modules(): Output used modules src directoryThomas Deutschmann2020-08-031-2/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Make use of expand_file() for --linuxrc optionThomas Deutschmann2020-08-031-8/+5
| | | | | Bug: https://bugs.gentoo.org/483146 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rename INSTALL_MOD_PATH option to KERNEL_MODULES_PREFIXThomas Deutschmann2020-08-031-2/+2
| | | | | | | | | | Before this change we had different names in config file and command-line for the same thing. With this change we have one option named KERNEL_MODULES_PREFIX and its corresponding --kernel-modules-prefix command-line argument. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Use correct kernel configThomas Deutschmann2020-08-011-23/+22
| | | | | Bug: https://bugs.gentoo.org/733946 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Unify grep usageThomas Deutschmann2020-08-011-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): set_initramfs_compression_method() ↵Thomas Deutschmann2020-08-011-1/+1
| | | | | | | must be called when kerncache is used Follow-up: a864c2f ("gen_initramfs.sh: create_initramfs(): Call set_initramfs_compression_method() when not building kernel") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* ZFS: Enable UDEV supportv4.1.0_beta1Thomas Deutschmann2020-07-241-1/+22
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* dmraid: Switch to UDEV usageThomas Deutschmann2020-07-241-0/+2
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* multipath: Switch to UDEV usageThomas Deutschmann2020-07-241-3/+28
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* bcache: Switch to UDEV usageThomas Deutschmann2020-07-241-0/+28
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Switch from MDEV to UDEVThomas Deutschmann2020-07-241-17/+104
| | | | | | | | | 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>
* gen_initramfs: Fix styleThomas Deutschmann2020-07-241-6/+0
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Call ↵Thomas Deutschmann2020-07-161-0/+7
| | | | | | | | | set_initramfs_compression_method() when not building kernel We need to call set_initramfs_compression_method() manually when we didn't build kernel in same run to ensure that $COMPRESS_INITRD_TYPE is initialized. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Move and unify validation of ↵Thomas Deutschmann2020-07-161-61/+6
| | | | | | | | | | | | | | | --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>
* gen_initramfs.sh: append_dropbear(): Add support for ed25519 host keysThomas Deutschmann2020-06-201-2/+15
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_dropbear(): Fix error message shown when ↵Thomas Deutschmann2020-06-151-2/+2
| | | | | | net-misc/dropbear is required Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: copy_system_binaries(): Don't check for non-existing ↵Thomas Deutschmann2020-06-151-5/+0
| | | | | | | | | | | | linked libraries lddtree will always report "not found" when doing cross-compile. Because we will error out later nonetheless when copying will fail, we don't need such a check in advance. Closes: https://bugs.gentoo.org/727442 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add b2sumThomas Deutschmann2020-02-151-1/+30
| | | | | | | b2sum can be used to verify (boot) media since commit 5c55dd467a563623f16be27f670b5a3ddc79fb02. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_splash(): Fix splash_geninitramfs error handlingMichael Gerlach2020-02-131-1/+1
| | | | | | | Closes: https://bugs.gentoo.org/709478 Signed-off-by: Michael Gerlach <n3ph@cccfr.de> Closes: https://github.com/gentoo/genkernel/pull/13 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_splash(): Move check for splash_geninitramfs to ↵Thomas Deutschmann2020-01-141-5/+0
| | | | | | | | | determine_real_args() This will allow us to fail early if splash_geninitramfs isn't available. Bug: https://bugs.gentoo.org/705304 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Outsource compression method handling ↵Thomas Deutschmann2020-01-121-62/+1
| | | | | | into set_initramfs_compression_method() Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Rework ZFS unlockThomas Deutschmann2020-01-111-0/+6
| | | | | | | | | | | | - Prompt for key when key is unavailable, not when key is available. - Check ZFS' keystatus property instead of return value to allow remote unlock. - Add unlock-zfs command to remote rescue shell. Closes: https://bugs.gentoo.org/705032 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Make ldconfig failure non-fatalThomas Deutschmann2019-12-311-1/+1
| | | | | | | | Having up-to-date /etc/ld.so.cache in initramfs is nice to have but not critical and ldconfig is known to fail when running under sandbox. Closes: https://bugs.gentoo.org/704354 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Fix integrated initramfs creationThomas Deutschmann2019-12-291-2/+19
| | | | | | | | | | | | | | | | - CONFIG_INITRAMFS_SOURCE value must be quoted. - CONFIG_INITRAMFS_COMPRESSION_* is only available in >=linux-4.10. - Use CONFIG_RD_* for <linux-4.10. But make sure that only option for selected compression type is set and every other type is disabled. Otherwise, last set compression type would be used all the time, see $KERNEL_DIR/usr/Makefile for details. - Add sanity check which checks for integrated initramfs. Bug: https://bugs.gentoo.org/703826 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Fix building compressed integrated ↵Thomas Deutschmann2019-12-141-26/+61
| | | | | | | | | | | | | | | initramfs Re-compiling kernel failed due to multiple set CONFIG_INITRAMFS_COMPRESSION_* options. In addition it is important to call `make olddefconfig` after changing options to make sure kernel config is still valid and make won't block with user prompt. This commit will also ensure that we honor set COMPRESS_INITRD_TYPE. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_dropbear(): Only include libnss_files.so on glibc ↵Thomas Deutschmann2019-12-141-3/+6
| | | | | | | | based CHOST libnss_files.so is for example is not available on musl. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: append_busybox(): Only include libnss_dns.so on glibc ↵Thomas Deutschmann2019-12-141-3/+6
| | | | | | | | based CHOST libnss_dns.so is for example not available on musl. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_funcs.sh: get_chost_libdir(): Use libc.a to determine CHOST libdirThomas Deutschmann2019-12-141-3/+3
| | | | | | | libc.a is required for almost every package in initramfs whereas libnss_files.so isn't available in musl for example. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add support for a custom font at bootThomas Deutschmann2019-11-241-0/+31
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Fix typo & code styleThomas Deutschmann2019-11-191-3/+3
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Don't compile multipath-tools; Copy from hostThomas Deutschmann2019-10-131-8/+11
| | | | | | | | | | | | | | | | | | multipath-tools package doesn't really support a static build: While we managed to build programs like multipath statically, it still relied on dynamic libs for checkers which we are unable to fix. This commit will change --multipath support in that way that we now require that sys-fs/multipath-tools is installed on host system because we will copy binaries and used libraries from host to initramfs. Due to this change, you can't add multipath support in cross- compile scenarios anymore. Bug: https://bugs.gentoo.org/695510 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Record disk usage for each package/componentThomas Deutschmann2019-08-301-1/+7
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Cleanup $TEMP already after each package/componentThomas Deutschmann2019-08-301-0/+156
| | | | | | | | | | Now that we build stuff like boost, $TEMP can become large and we would require more free disk space than actually needed when we would do the cleanup only once at the end. User can still keep everything with --no-cleanup option. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* Add support for LVM thin provisioningThomas Deutschmann2019-08-301-0/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* gen_initramfs.sh: create_initramfs(): Disable sandbox for ldconfigv4.0.0_beta12Thomas Deutschmann2019-08-111-1/+2
| | | | | | | | ldconfig will use chroot(). However, sandbox doesn't understand that and believes we are writing to /etc/ld.so.cache... which is wrong. Bug: https://bugs.gentoo.org/431038 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>