From 5a1b007fd7e8ccb9c27ce226ed9ad447826451cb Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 13 Feb 2023 23:21:37 -0600 Subject: [PATCH] build-kernel: Avoid creating /lib directory In a "merged-usr" system, `/lib` is a symlink to `/usr/lib`. When installing *sys-apps/systemd*, Portage checks to ensure this is the case. If this happens after `make modules_install` is run, `/lib` is a directory, which causes the installation to fail. To avoid this, we need to explicitly install the modules into `/usr/lib` so that the symlink can be created later. --- build-kernel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-kernel.sh b/build-kernel.sh index 5d22bd1..8866275 100755 --- a/build-kernel.sh +++ b/build-kernel.sh @@ -16,7 +16,7 @@ cd linux make -C /usr/src/linux O=${PWD} olddefconfig make -j$(nproc) kver=$(make -s kernelversion) -make modules_install INSTALL_MOD_PATH=/mnt/gentoo +make modules_install INSTALL_MOD_PATH=/mnt/gentoo/usr cd - printf 'Installing Kernel %s ...\n' "${kver}"