aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2024-03-02 21:44:32 +0100
committerJybz <j.biernacki@free.fr>2024-03-02 21:44:32 +0100
commit42eac42d1ea2576495066142cc5b63072b3a2785 (patch)
treeea68d13c46f21dfec3b7508237962fba1e6f083b
parent919d2f573fbb6405d878f91cce1a93a8144a44ab (diff)
downloadmageia4arm-42eac42d1ea2576495066142cc5b63072b3a2785.tar
mageia4arm-42eac42d1ea2576495066142cc5b63072b3a2785.tar.gz
mageia4arm-42eac42d1ea2576495066142cc5b63072b3a2785.tar.bz2
mageia4arm-42eac42d1ea2576495066142cc5b63072b3a2785.tar.xz
mageia4arm-42eac42d1ea2576495066142cc5b63072b3a2785.zip
fix: initrd looking for build machine drivesuser/jibz/fix-initrd-long-boot
-rwxr-xr-xfunctions.sh7
1 files changed, 7 insertions, 0 deletions
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