init: add boot parameter to start in-memory live mode

.. no /storage hacks hacks, would also work with uefi boot
This commit is contained in:
Stefan Saraev 2015-04-05 18:41:40 +03:00
parent d826fa2e44
commit 0d847e4f13

View File

@ -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