diff --git a/packages/sysutils/busybox-initramfs/scripts/init b/packages/sysutils/busybox-initramfs/scripts/init index a35e67807c..63f245657c 100755 --- a/packages/sysutils/busybox-initramfs/scripts/init +++ b/packages/sysutils/busybox-initramfs/scripts/init @@ -82,13 +82,16 @@ REBOOT=0 show_splash mount_part "$boot" "/flash" "ro,noatime" - mount_part "$disk" "/storage" "rw,noatime" - update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL" - update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM" - if test "$REBOOT" -eq 1; then - echo "System reboots now..." && \ - /bin/busybox reboot + if [ -n "$disk" ]; then + mount_part "$disk" "/storage" "rw,noatime" + update "Kernel" "$IMAGE_KERNEL" "/flash/$IMAGE_KERNEL" + update "System" "$IMAGE_SYSTEM" "/flash/$IMAGE_SYSTEM" + + if test "$REBOOT" -eq 1; then + echo "System reboots now..." && \ + /bin/busybox reboot + fi fi if [ -f "/flash/$IMAGE_SYSTEM" ]; then @@ -101,7 +104,10 @@ REBOOT=0 # move /flash and /storage to /sysroot /bin/busybox mount --move /flash /sysroot/flash - /bin/busybox mount --move /storage /sysroot/storage + + if [ -n "$disk" ]; then + /bin/busybox mount --move /storage /sysroot/storage + fi # unmount all other filesystems /bin/busybox umount /dev