dmsquash-live-root: squashfs in bare device

Check if dev in root=live:<dev> might be already the squashfs image.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
master
Luiz Angelo Daros de Luca 2020-11-11 00:54:33 -03:00 committed by Harald Hoyer
parent dff9baf3b4
commit 51b36f56d8
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,11 @@ if [ -f $livedev ]; then
esac
[ -e /sys/fs/$fstype ] || modprobe $fstype
else
if [ "$(blkid -o value -s TYPE $livedev)" != "ntfs" ]; then
livedev_fstype=$(blkid -o value -s TYPE $livedev)
if [ "$livedev_fstype" = "squashfs" ]; then
# no mount needed - we've already got the LiveOS image in $livedev
SQUASHED=$livedev
elif [ "$livedev_fstype" != "ntfs" ]; then
mount -n -t $fstype -o ${liverw:-ro} $livedev /run/initramfs/live
else
# Symlinking /usr/bin/ntfs-3g as /sbin/mount.ntfs seems to boot