diff options
author | Jybz <j.biernacki@free.fr> | 2024-03-02 21:44:32 +0100 |
---|---|---|
committer | Jybz <j.biernacki@free.fr> | 2024-03-02 21:44:32 +0100 |
commit | 42eac42d1ea2576495066142cc5b63072b3a2785 (patch) | |
tree | ea68d13c46f21dfec3b7508237962fba1e6f083b | |
parent | 919d2f573fbb6405d878f91cce1a93a8144a44ab (diff) | |
download | mageia4arm-user/jibz/fix-initrd-long-boot.tar mageia4arm-user/jibz/fix-initrd-long-boot.tar.gz mageia4arm-user/jibz/fix-initrd-long-boot.tar.bz2 mageia4arm-user/jibz/fix-initrd-long-boot.tar.xz mageia4arm-user/jibz/fix-initrd-long-boot.zip |
fix: initrd looking for build machine drivesuser/jibz/fix-initrd-long-boot
-rwxr-xr-x | functions.sh | 7 |
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 |