Drop into debug shell when squashfs could not be mounted
authorSebastian Pipping <sebastian@pipping.org>
Fri, 16 Mar 2012 22:40:14 +0000 (23:40 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Fri, 16 Mar 2012 23:08:18 +0000 (00:08 +0100)
ChangeLog
defaults/linuxrc

index 1d41a6fb84da8ae753ac32a1e63e35c832097144..c1f376db4acb10d99855101d05610b2f940681ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
+  defaults/linuxrc:
+  Drop into debug shell when squashfs could not be mounted
+
   16 Mar 2012; Sebastian Pipping <sping@gentoo.org> defaults/initrd.scripts,
   defaults/linuxrc:
   Drop into debug shell when files could not be copied into tmpfs
index 226a9032c6508f01ad6fe256b1f050fa8a00af3a..5932024b0f8cc077cfd10a9885c905611c9af184 100755 (executable)
@@ -627,7 +627,14 @@ then
                then
                        if [ "${USE_AUFS_NORMAL}" != '1' ]; then
                                good_msg 'Mounting squashfs filesystem'
-                               mount -t squashfs -o loop,ro "${CDROOT_PATH}/${LOOPEXT}${LOOP}" "${NEW_ROOT}/mnt/livecd"
+                               mount -t squashfs -o loop,ro "${CDROOT_PATH}/${LOOPEXT}${LOOP}" "${NEW_ROOT}/mnt/livecd" || {
+                                       bad_msg "Squashfs filesystem could not be mounted, dropping into shell."
+                                       if [ -e /proc/filesystems ]; then
+                                               fgrep -q squashfs /proc/filesystems || \
+                                                       bad_msg "HINT: Your kernel does not know filesystem \"squashfs\"."
+                                       fi
+                                       do_rundebugshell
+                               }
                        else
                                good_msg 'Mounting squashfs & aufs filesystems'
                                setup_squashfs_aufs