correct initramfs creation

This commit is contained in:
Tobias Powalowski 2022-02-03 09:42:15 +01:00
parent e7ae869197
commit 5267c86645

View file

@ -120,9 +120,10 @@ if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then
rm -r "${_W_DIR}" || exit 1
echo "Step 6/8: Create initramfs /initrd.img ..."
echo " This will need some time ..."
find initrd/. -mindepth 1 -printf '%P\0' | sort -z | LANG=C bsdtar --uid 0 --gid 0 --null -cnf - -T - |\
cd initrd || exit 1
find . -mindepth 1 -printf '%P\0' | sort -z | LANG=C bsdtar --uid 0 --gid 0 --null -cnf - -T - |\
LANG=C bsdtar --null -cf - --format=newc @- | zstd -T0 > /initrd.img || exit 1
mv "${_W_DIR}"/usr/lib/initcpio/functions.old "${_W_DIR}"/usr/lib/initcpio/functions
cd ..
echo "Step 7/8: Remove /initrd ..."
rm -r "/initrd" || exit 1
### not supported