From f42c09f10f3b6301ac95cae429eacec41121c346 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 18 May 2010 14:09:09 +0200 Subject: [PATCH] busybox-initramfs: - unmount all no more needed filesystems (will be mounted again from system) - cosmetics --- .../sysutils/busybox-initramfs/scripts/init | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/sysutils/busybox-initramfs/scripts/init b/packages/sysutils/busybox-initramfs/scripts/init index 196452671f..de5a79f95d 100755 --- a/packages/sysutils/busybox-initramfs/scripts/init +++ b/packages/sysutils/busybox-initramfs/scripts/init @@ -1,5 +1,6 @@ #!/bin/sh +# mount all needed special filesystems /bin/busybox mount -t proc none /proc /bin/busybox mount -t devtmpfs none /dev /bin/busybox mount -t sysfs none /sys @@ -94,16 +95,17 @@ debug_shell fi - $IONICE /bin/busybox mount --move /proc /sysroot/proc - $IONICE /bin/busybox mount --move /sys /sysroot/sys - $IONICE /bin/busybox mount --move /dev /sysroot/dev - $IONICE /bin/busybox mount --move /flash /sysroot/flash - $IONICE /bin/busybox mount --move /storage /sysroot/storage +# move /flash and /storage to /sysroot + /bin/busybox mount --move /flash /sysroot/flash + /bin/busybox mount --move /storage /sysroot/storage - $IONICE /bin/busybox mkdir /sysroot/storage/dev/pts - $IONICE /bin/busybox mount --move /dev/pts /sysroot/storage/dev/pts +# unmount all other filesystems + /bin/busybox umount /proc + /bin/busybox umount /sys + /bin/busybox umount /dev/pts + /bin/busybox umount /dev - exec $IONICE /bin/busybox switch_root /sysroot /sbin/init + exec /bin/busybox switch_root /sysroot /sbin/init error "INIT_3" "Error in initramfs. Could not switch to new root" debug_shell