Added vfat support to mount /dev/archiso
fstype from klibc don't detect a vfat formatted blockdevice when try to mount /dev/archiso to /bootmnt. Some users don't use the recommened method with dd to bring the image to their USB stick. If they for ex. use Unetbootin to put the iso image on their (v)fat formatted stick they got lost with a kernel panic cause fstype won't detect vfat, so the mount and the later squashfs bindings traps. Signed-off-by: Gerhard Brauer <gerbra@archlinux.de>
This commit is contained in:
parent
1dbbd6afcb
commit
fd93e7c9bd
@ -64,20 +64,31 @@ run_hook ()
|
|||||||
done
|
done
|
||||||
|
|
||||||
eval $(fstype < /dev/archiso 2>/dev/null)
|
eval $(fstype < /dev/archiso 2>/dev/null)
|
||||||
if [ -n "${FSTYPE}" -a "${FSTYPE}" != "unknown" ]; then
|
if [ -n "${FSTYPE}" ]; then
|
||||||
if mount -r -t "${FSTYPE}" /dev/archiso /bootmnt >/dev/null 2>&1; then
|
if [ "${FSTYPE}" = "unknown" ]; then
|
||||||
if [ -e "/bootmnt/isomounts" ]; then
|
# First try mounting then with vfat, maybe someone put the image on
|
||||||
echo "SUCCESS: Mounted archiso volume successfully."
|
# USB stick with unetbootin or similar. vfat is not detected by fstype.
|
||||||
|
_FSTYPE="vfat"
|
||||||
else
|
else
|
||||||
echo "ERROR: Mounting was successful, but the isomounts file does not exist."
|
_FSTYPE=$FSTYPE
|
||||||
exit 1
|
fi
|
||||||
|
if mount -r -t "${_FSTYPE}" /dev/archiso /bootmnt >/dev/null 2>&1; then
|
||||||
|
if [ -e "/bootmnt/isomounts" ]; then
|
||||||
|
echo "SUCCESS: Mounted archiso volume successfully."
|
||||||
|
else
|
||||||
|
echo "ERROR: Mounting was successful, but the isomounts file does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "${FSTYPE}" = "unknown" ]; then
|
||||||
|
echo "ERROR: Failed to mount /dev/archiso (FS is unknown and not vfat)."
|
||||||
|
else
|
||||||
|
echo "ERROR; Failed to mount /dev/archiso (FS is ${FSTYPE}."
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "ERROR: Failed to mount /dev/archiso"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "ERROR: /dev/archiso found, but the filesystem type is unknown."
|
echo "ERROR: /dev/archiso found, but the filesystem type is unknown."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/bin/modprobe -q squashfs >/dev/null 2>&1
|
/bin/modprobe -q squashfs >/dev/null 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user