From 42eac42d1ea2576495066142cc5b63072b3a2785 Mon Sep 17 00:00:00 2001 From: Jybz Date: Sat, 2 Mar 2024 21:44:32 +0100 Subject: fix: initrd looking for build machine drives --- functions.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.sh b/functions.sh index 2c9773b..e4128fb 100755 --- a/functions.sh +++ b/functions.sh @@ -435,6 +435,10 @@ function jumpchroot() { ERRORN=$((${ERRORN}+1)) fi else + # Prevent build machine mounts to be incoporated into the initrd. + mkdir -p "${BUILD_PATH}/etc/dracut.conf.d" + echo 'use_fstab="yes"' >"${BUILD_PATH}/etc/dracut.conf.d/50-use-fstab.conf" + print_info "/sbin/chroot --userspec root:root ${BUILD_PATH} /usr/bin/bash -v -c 'bash /second_stage_install.sh 2>&1'" /sbin/chroot --userspec root:root "${BUILD_PATH}" /usr/bin/bash -v -c 'bash /second_stage_install.sh 2>&1' RET=${?} @@ -442,6 +446,9 @@ function jumpchroot() { error "line ${LINENO} Warning : chrooting to ${BUILD_PATH} retrurn an error ${RET}" ERRORN=$((${ERRORN}+1)) fi + + # Prevent build machine mounts to be incoporated into the initrd. + rm -f "${BUILD_PATH}/etc/dracut.conf.d/50-use-fstab.conf" fi return 0 -- cgit v1.2.1