From 0d847e4f13cad260f5e88e552d542cff240d6abe Mon Sep 17 00:00:00 2001 From: Stefan Saraev Date: Sun, 5 Apr 2015 18:41:40 +0300 Subject: [PATCH] init: add boot parameter to start in-memory live mode .. no /storage hacks hacks, would also work with uefi boot --- packages/sysutils/busybox/scripts/init | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 82090c6381..11cfa45283 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -55,6 +55,8 @@ INSTALLED_MEMORY=`cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2}'` SYSTEM_TORAM_LIMIT=1024000 + LIVE="no" + # hide kernel log messages on console echo '1 4 1 7' > /proc/sys/kernel/printk @@ -129,6 +131,9 @@ noram) SYSTEM_TORAM=no ;; + live) + LIVE=yes + ;; overlay) OVERLAY=yes ;; @@ -491,6 +496,12 @@ mount_storage() { progress "Mounting storage" + if [ "$LIVE" = "yes" ]; then + # mount tmpfs and exit early. disk=xx is not allowed in live mode + mount -t tmpfs none /storage + return + fi + wakeonlan if [ -n "$disk" ]; then