| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/922076
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
| |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/753617
Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Followup to 04225e090e9936df6c5a9ddd5a3926d13e0001df.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/908512
Signed-off-by: Ben Kohler <bkohler@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
|
|\
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
...on a broader range of system configurations, including LVM and swapfiles.
Signed-off-by: FlyingWaffle <flyingwaffle@pm.me>
|
| |
| |
| |
| | |
Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
|
|/
|
|
| |
Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| | |
Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| | |
Simplify conditional blocks where 'continue' is present.
Signed-off-by: Dmitry Baranov <reagentoo@gmail.com>
|
| |
| |
| |
| |
| | |
Fixes: d3ee3d06 ("Bump btrfs-progs to v5.15")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
| |
| |
| |
| |
| |
| | |
Closes: https://bugs.gentoo.org/341193
Closes: https://bugs.gentoo.org/822087
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
| |
| |
| |
| | |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Fixes: d5f7d79b ("linuxrc: Refactor handling of console log level")
Bug: https://bugs.gentoo.org/788970
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Fixes: 60ecb8b6d ("linuxrc: Move global variables to initrd.defaults")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
hibernation
...but "resume" was specified on kernel command-line.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
Use same messages we use for root device.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/genkernel/pull/24
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|