diff --git a/initramfs/cleanup b/initramfs/cleanup index 529792e..6bd0000 100644 --- a/initramfs/cleanup +++ b/initramfs/cleanup @@ -58,6 +58,12 @@ if [ "$1" = "--init" ]; then # First, mount proc again since it will be needed and it was already unmounted mount -t proc proc /proc >/dev/console 2>&1 + # if debug is requested, start commandline prompt here + if grep -q debug /proc/cmdline; then + echo "Starting shell for debug" >/dev/console + setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1' + fi + # next, unmount everything from union, backwards tac /proc/mounts | grep union | cut -d " " -f 2 | while read LINE; do umount $LINE >/dev/console 2>&1 @@ -74,7 +80,7 @@ if [ "$1" = "--init" ]; then # if the previous unmount failed due to some busy err mount -o remount,ro /memory/data >/dev/console 2>/dev/null - # if debug is requested, start commandline prompt here + # and finally, last chance to run some commands by hand if grep -q debug /proc/cmdline; then echo "Starting shell for debug" >/dev/console setsid sh -c 'exec sh < /dev/tty1 >/dev/tty1 2>&1' diff --git a/initramfs/initramfs_create b/initramfs/initramfs_create index 41af566..6b0b6f4 100755 --- a/initramfs/initramfs_create +++ b/initramfs/initramfs_create @@ -42,7 +42,7 @@ cd static ./update cd .. -cp static/{busybox,mount.*} $INITRAMFS/bin +cp static/{busybox,mount.dynsizefs,mount.ntfs-3g} $INITRAMFS/bin chmod a+x $INITRAMFS/bin/{busybox,mount.*} $INITRAMFS/bin/busybox | grep , | grep -v Copyright | tr "," " " | while read LINE; do diff --git a/initramfs/static/busybox-i486 b/initramfs/static/busybox-i486 index 65b8ede..fc902d7 100755 Binary files a/initramfs/static/busybox-i486 and b/initramfs/static/busybox-i486 differ diff --git a/initramfs/static/busybox-x86_64 b/initramfs/static/busybox-x86_64 index 2d98638..f9b1032 100755 Binary files a/initramfs/static/busybox-x86_64 and b/initramfs/static/busybox-x86_64 differ diff --git a/initramfs/static/mount.dynsizefs b/initramfs/static/mount.dynsizefs deleted file mode 100755 index 7732ab3..0000000 Binary files a/initramfs/static/mount.dynsizefs and /dev/null differ diff --git a/initramfs/static/update b/initramfs/static/update index a73d994..e2bcf8b 100755 --- a/initramfs/static/update +++ b/initramfs/static/update @@ -24,4 +24,4 @@ fi ln -f busybox-$MYARCH ./busybox ln -f mount.ntfs-3g-$MYARCH ./mount.ntfs-3g -ln -f mount.posixovl-$MYARCH ./mount.posixovl +ln -f mount.dynsizefs-$MYARCH ./mount.dynsizefs