FSTAB="$(mktemp)"
at_exit() {
+ mountpoint -q /proc/cmdline && umount /proc/cmdline
rm -fr "${OUT_DIR:?}" "${FSTAB:?}"
}
done
}
+# Drop usrhash on the command-line so fstab-generator doesn't add a /dev/mapper
+# mount for /usr, add a root= to emulate a more typical environment,
+# and remove any systemd.mount-extra=
+sed -r -e 's/usrhash=[^[:space:]+]/root=\/dev\/sda2/' -e 's/systemd.mount-extra=[^[:space:]+]//g' /proc/cmdline >/tmp/cmdline.tmp
+mount --bind /tmp/cmdline.tmp /proc/cmdline
+
: "fstab-generator: regular"
printf "%s\n" "${FSTAB_GENERAL_ROOT[@]}" >"$FSTAB"
cat "$FSTAB"