diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2023-01-15 19:10:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 19:10:10 +0100 |
commit | 9aa1391bdf321297c36ed5e4c6f59197366c3b19 (patch) | |
tree | 25acde7ec4b62b4988461be334bde345383b49dc /nixos/modules/system/boot/stage-1.nix | |
parent | 5c64c17b50aad3b8f8e8734cab8c86e53a48fe8d (diff) | |
parent | 865723cd53a5f8758e00d09dab76b636c2460976 (diff) |
Merge pull request #208803 from Ma27/revert-kmod-stage-1-hack
Revert "nixos/stage-1: fix `modprobe` in initial ramdisk on systems w/glibc-2.34"
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index af26c156fd41b..4fcaeebffc3b2 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -150,26 +150,6 @@ let copy_bin_and_libs ${pkgs.kmod}/bin/kmod ln -sf kmod $out/bin/modprobe - # Dirty hack to make sure the kernel properly loads modules - # such as ext4 on demand (e.g. on a `mount(2)` syscall). This is necessary - # because `kmod` isn't linked against `libpthread.so.0` anymore (since - # it was merged into `libc.so.6` since version `2.34`), but still needs - # to access it for some reason. This is not an issue in stage-1 itself - # because of the `LD_LIBRARY_PATH`-variable and anytime later because the rpath of - # kmod/modprobe points to glibc's `$out/lib` where `libpthread.so.6` exists. - # However, this is a problem when the kernel calls `modprobe` inside - # the initial ramdisk because it doesn't know about the - # `LD_LIBRARY_PATH` and the rpath was nuked. - # - # Also, we can't use `makeWrapper` here because `kmod` only does - # `modprobe` functionality if `argv[0] == "modprobe"`. - cat >$out/bin/modprobe-kernel <<EOF - #!$out/bin/ash - export LD_LIBRARY_PATH=$out/lib - exec $out/bin/modprobe "\$@" - EOF - chmod +x $out/bin/modprobe-kernel - # Copy resize2fs if any ext* filesystems are to be resized ${optionalString (any (fs: fs.autoResize && (lib.hasPrefix "ext" fs.fsType)) fileSystems) '' # We need mke2fs in the initrd. |