aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* defaults/software.sh: fix srcdir for new bcache-toolsBen Kohler2024-05-221-1/+1
| | | | Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* defaults/software.sh: still build for bcache-tools-1.0.8* for nowBen Kohler2024-05-011-1/+1
| | | | Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* {gkbuilds,patches}/bcache-tools: fix buildBen Kohler2024-04-301-1/+1
| | | | Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* gkbuilds/bcache-tools: really build new bcache-tools nowBen Kohler2024-04-301-1/+1
| | | | Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* keymaps: replace trf with trqBen Kohler2024-02-273-1/+1
| | | | | | Bug: https://bugs.gentoo.org/922076 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* updated software.shTimothy Kenno Handojo2024-02-161-34/+34
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* initrd.scripts: create dir layout for overlayfs as wellBen Kohler2024-02-161-0/+7
| | | | | | | | These dirs like /mnt/gentoo are normally created during boot but overlayfs usage bypasses that. Let's create them for overlayfs users as well. Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* Plymouth support for genkernel (squashed).FlyingWaffle2023-08-302-5/+109
| | | | | | Bug: https://bugs.gentoo.org/753617 Signed-off-by: FlyingWaffle <flyingwaffle@pm.me> Signed-off-by: Sam James <sam@gentoo.org>
* Enabling zstd multithreaded compressionMarat Buharov2023-07-271-1/+1
| | | | | | | | | | Enabling zstd multithreaded compression gives same boost as enabling it for XZ compression in previous commit. Signed-off-by: Marat Buharov <marat.buharov@gmail.com> Closes: https://github.com/gentoo/genkernel/pull/47 Closes: https://github.com/gentoo/genkernel/pull/48 Signed-off-by: Sam James <sam@gentoo.org>
* defaults/initrd.scripts: kill off some more `which` stragglersSam James2023-07-271-4/+4
| | | | | | Followup to 04225e090e9936df6c5a9ddd5a3926d13e0001df. Signed-off-by: Sam James <sam@gentoo.org>
* defaults/software.sh: use dist tarball for libxcryptSam James2023-07-271-1/+1
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* Add userspace-rcu (new dep of xfsprogs)Sam James2023-07-271-1/+8
| | | | Signed-off-by: Sam James <sam@gentoo.org>
* defaults/kernel-generic-config: enable multi-gen LRUBen Kohler2023-06-281-0/+2
| | | | | | Bug: https://bugs.gentoo.org/908512 Signed-off-by: Ben Kohler <bkohler@gentoo.org>
* Enable threaded XZ compression by defaultMaciej S. Szmigiero2022-06-111-1/+1
| | | | | | | | | With the current proliferation of multi-core CPUs enabling threaded XZ compression brings very significant runtime improvement: on my 4-core system the total genkernel runtime drops from 356 seconds to 166 seconds (a reduction of more than 50%) - so let's enable this mode by default. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
* Fixes a mistake with quotation usage when testing for LVM flag.FlyingWaffle2022-05-281-1/+1
| | | | Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
* Additional test to allow for hibernation resumeRobin H. Johnson2022-05-281-1/+2
|\ | | | | | | | | | | Merges: https://github.com/gentoo/genkernel/pull/38 Closes: https://github.com/gentoo/genkernel/pull/38 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
| * Additional test to allow for hibernation resume...FlyingWaffle2022-05-281-1/+2
| | | | | | | | | | | | ...on a broader range of system configurations, including LVM and swapfiles. Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
* | defaults/initrd.scripts: start_LUKS_*(): fix bootstrap calls and sleepsDmitry Baranov2022-05-251-15/+26
| | | | | | | | Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
* | defaults/initrd.scripts: openLUKS(): remove extra bracket in conditional blockDmitry Baranov2022-05-251-1/+1
|/ | | | Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
* genkernel: add keyctl support for loading LUKS passphrase into a keyringMaciej S. Szmigiero2022-05-223-3/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cryptsetup LUKS2 format comes with an ability to automatically unlock multiple devices (root, swap, etc.) sharing the same passphrase, without retyping it for each of them, by loading it into the user keyring. This commit adds such (optional) genkernel support for loading LUKS passphrase into the user keyring on boot. In the default mode of operation the newly added key is (possibly) used only to unlock root and swap devices and is removed soon after that. By providing appropriate kernel command line parameter the key can be left in the keyring instead (with an optional timeout) for unlocking other LUKS devices post-initramfs time. Because one of the most common use cases of this functionality will be having an encrypted swap for doing suspend to disk (hibernation) let's also make sure that we don't unlock the root device when doing so is unnecessary (when we are resuming the system from hibernation). Since the security of a FDE passphrase is of paramount importance in this solution significant care has been taken not to leak it accidentally: * The passphrase is read directly by keyctl to avoid storing it in the shell, * If the passphrase is used only to unlock root and swap devices (which is the default mode of operation) the init script will check whether its removal from keyring has actually succeeded and, if not, reboot the system rather than continue while leaving it exposed, * keyutils includes a patch (already upstreamed) to wipe the passphrase from memory when no longer needed. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
* linuxrc: do not rely on chroot evaluating PATHAndreas K. Hüttel2022-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to install a new kernel on catbus.sparc.dev.gentoo.org, the newly built initrd consistently claimed that it could not find init, and dropped to the rescue shell. However, init was there just fine in /newroot (as before). I dug out the command that is actually run inside linuxrc, elif ! chroot "${CHROOT}" test -x /${init#/} 1>/dev/null 2>&1 and tried to run that manually, which led to a rather strange error message rescueshell / # chroot /newroot test -x /lib/systemd/systemd chroot: can't execute 'test': File name too long Some more research led me to the busybox manpage (where here chroot comes from): https://busybox.net/downloads/BusyBox.html#chroot chroot chroot NEWROOT [PROG [ARGS]] Run PROG with root directory set to NEWROOT Note, the third argument is *not* a command (as with usual chroot, see the manpage from coreutils chroot) but a program! Bug: https://bugs.gentoo.org/842027 Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* defaults/modules_load: more crypto modulesRobin H. Johnson2022-05-151-1/+1
| | | | | | | | | | | | Needed more cryptsetup in weirder cases. Maybe better in future to provide easier way to detect these and/or match dracut's code for module selection. Based on old https://github.com/robbat2/genkernel/pull/29 submission Closes: https://github.com/robbat2/genkernel/pull/29 Suggested-by: David Guglielmi <david.guglielmi@gmail.com> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Add support for LUKS detached header (another attempt)Robin H. Johnson2022-05-152-16/+164
|\ | | | | | | | | | | | | | | Note: commit 73a05632d61171685ac4960c6b684cefa6d82afd is significantly easier to review by ignoring whitespace changes. Closes: https://github.com/gentoo/genkernel/pull/28 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
| * Add support for LUKS detached headerDmitry Baranov2021-08-072-16/+164
| | | | | | | | Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
* | defaults/initrd.scripts: Get rid of extra paddingRobin H. Johnson2022-05-151-92/+92
|\| | | | | | | | | | | | | | | Note: commit efdf4d0affb587655d703140db86d45ffd2a1ede is significantly easier to review by ignoring whitespace changes. Closes: https://github.com/gentoo/genkernel/pull/30 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
| * defaults/initrd.scripts: Get rid of extra paddingDmitry Baranov2021-08-071-92/+92
| | | | | | | | | | | | Simplify conditional blocks where 'continue' is present. Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
* | btrfs-progs-5.15+ needs libudevThomas Deutschmann2021-11-161-1/+1
| | | | | | | | | | Fixes: d3ee3d06 ("Bump btrfs-progs to v5.15") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* | defaults/modules_load: Add support for i8042 & AT keyboardsThomas Deutschmann2021-11-151-0/+3
| | | | | | | | | | | | Closes: https://bugs.gentoo.org/341193 Closes: https://bugs.gentoo.org/822087 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* | defaults/software.sh: dropbear needs libxcryptThomas Deutschmann2021-09-291-1/+1
| | | | | | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* | initrd.scripts: don't skip top level devices with partitionsGeorgy Yakovlev2021-09-081-18/+0
|/ | | | | | | | | | | ppc64 media should be mounted as /dev/sdX, not as /dev/sdX1 this loop was skipping /dev/sdX if /dev/sdX1 is present. Bug: https://bugs.gentoo.org/212794 Bug: https://bugs.gentoo.org/796272 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> Closes: https://bugs.gentoo.org/796272 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: openLUKS(): Reset cryptsetup_options on each iterationThomas Deutschmann2021-07-062-2/+8
| | | | | | Fixes: a0a6d631 ("linuxrc: add kernel command-line argument to allow user to pass additional options to cryptsetup") Bug: https://bugs.gentoo.org/794817 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/software.sh: Add libxcryptThomas Deutschmann2021-07-061-1/+8
| | | | | | | | Needed for BusyBox when host system is using sys-libs/libxcrypt[-static-libs] which is usually enforced via package.use.force. Bug: https://bugs.gentoo.org/798468 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Don't mess with console log level in quiet modeThomas Deutschmann2021-07-061-3/+6
| | | | | | Fixes: d5f7d79b ("linuxrc: Refactor handling of console log level") Bug: https://bugs.gentoo.org/788970 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* defaults/modules_load: Add support for Lenovo / Thinkpad devicesThomas Deutschmann2021-03-271-1/+1
| | | | | | | Support for IBM/Lenovo devices that are not fully compliant with HID standard. Reported-by: Patrick Lauer <patrick@gentoo.org> Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Fix log messageThomas Deutschmann2021-03-261-1/+1
| | | | | Fixes: 60ecb8b6d ("linuxrc: Move global variables to initrd.defaults") Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: crypt_filter(): crypt_silent shouldn't hide cryptsetup promptv4.2.0Thomas Deutschmann2021-03-211-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: do_resume(): Show warning when kernel doesn't support ↵Thomas Deutschmann2021-03-211-10/+17
| | | | | | | | hibernation ...but "resume" was specified on kernel command-line. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Adjust resume device messagesThomas Deutschmann2021-03-211-1/+3
| | | | | | Use same messages we use for root device. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Move global variables to initrd.defaultsThomas Deutschmann2021-03-214-30/+24
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: Add is_quiet() functionThomas Deutschmann2021-03-211-29/+36
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: is_true(): Optimize for most frequently used valueThomas Deutschmann2021-03-211-4/+5
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: is_debug(): Mark local variable as suchThomas Deutschmann2021-03-211-1/+1
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Use same $CRYPT_SILENT styleThomas Deutschmann2021-03-213-8/+8
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Refactor handling of console log levelThomas Deutschmann2021-03-203-25/+12
| | | | | Closes: https://github.com/gentoo/genkernel/pull/24 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Fix QUIET modeThomas Deutschmann2021-03-202-52/+53
| | | | | | | This commit will ensure that we really don't output anything when running in QUIET mode -- only errors will be shown. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: setup_keymap(): check console only when dokeymap is setThomas Deutschmann2021-03-201-7/+7
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Refactor switch_root error handlingThomas Deutschmann2021-03-142-22/+52
| | | | | | | | | | | | | | | | | | | | | | | Previous idea (commit 93bf318e5114233f3cacc4575ab2e58d60e785c7) never worked: Exec will replace initramfs' init (PID 1) with specified command so that any further line will never be reached. If that command will fail now, init basically ended which will trigger a kernel panic: !! A fatal error has occured since /sbin/openrc-init did not !! boot correctly. Trying to open a shell ... + exec /bin/bash /init: exec: line 1366: /bin/bash: not found [ 55.060649] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 The new error handling will keep init running in loop which will allow user to fix every detected problem until we are confident that switch_root call has a chance to succeed. In case the user cannot fix the problem (maybe because of gk.userinteraction.disabled), we will call the newly added gk.emergency action (reboot, poweroff or halt). Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: run_shell(): Exit early when /dev is goneThomas Deutschmann2021-03-141-0/+4
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* initrd.scripts: Add is_userinteraction_allowed() functionThomas Deutschmann2021-03-141-5/+18
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
* linuxrc: Rename rundebugshell() -> run_debug_shell()Thomas Deutschmann2021-03-142-18/+14
| | | | Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>