If the boot partition is not found just log a message and carry on.
This commit is contained in:
parent
4017e4178b
commit
bd7fd3cc84
12
src/init
12
src/init
|
|
@ -56,11 +56,15 @@ fi
|
||||||
mount -t ext4 -o ro $IMG_DEVICE /mnt/img
|
mount -t ext4 -o ro $IMG_DEVICE /mnt/img
|
||||||
|
|
||||||
# Mount boot device and load squashfs module if present
|
# Mount boot device and load squashfs module if present
|
||||||
mount -t vfat -o ro $BOOT_DEVICE /boot
|
if findfs $BOOT_DEVIC &> /dev/null; then
|
||||||
if [[ -e /boot/modules/$(uname -r)/squashfs.ko ]]; then
|
mount -t vfat -o ro $BOOT_DEVICE /boot
|
||||||
insmod /boot/modules/$(uname -r)/squashfs.ko
|
if [[ -e /boot/modules/$(uname -r)/squashfs.ko ]]; then
|
||||||
|
insmod /boot/modules/$(uname -r)/squashfs.ko
|
||||||
|
fi
|
||||||
|
umount /boot
|
||||||
|
else
|
||||||
|
echo "The 'boot' partition was not detected, not checking for squashfs kernel module."
|
||||||
fi
|
fi
|
||||||
umount /boot
|
|
||||||
|
|
||||||
# Mount OS image
|
# Mount OS image
|
||||||
mount -t squashfs -o ro /mnt/img/root-squash.img /mnt/lower
|
mount -t squashfs -o ro /mnt/img/root-squash.img /mnt/lower
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue