Support passing live_ram
live_ram allows you to load the entirety of the live image into RAM and run it from there rather than off of the block devicemaster
parent
a2a2a956dd
commit
3ae2f09a04
|
@ -43,8 +43,8 @@ fi
|
||||||
# specified as their own things
|
# specified as their own things
|
||||||
live_dir=$(getarg live_dir)
|
live_dir=$(getarg live_dir)
|
||||||
[ -z "$live_dir" ] && live_dir="LiveOS"
|
[ -z "$live_dir" ] && live_dir="LiveOS"
|
||||||
|
getarg live_ram && live_ram="yes"
|
||||||
overlay=off
|
overlay=off
|
||||||
live_ram=0
|
|
||||||
reset_overlay=0
|
reset_overlay=0
|
||||||
|
|
||||||
# overlay setup helper function
|
# overlay setup helper function
|
||||||
|
@ -139,7 +139,7 @@ if [ -e $NEWROOT/${live_dir}/squashfs.img ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$SQUASHED" ] ; then
|
if [ -e "$SQUASHED" ] ; then
|
||||||
if [ "$live_ram" == "1" ] ; then
|
if [ -n "$live_ram" ] ; then
|
||||||
echo "Copying live image to RAM..."
|
echo "Copying live image to RAM..."
|
||||||
echo "(this may take a few minutes)"
|
echo "(this may take a few minutes)"
|
||||||
dd if=$SQUASHED of=/squashed.img bs=512 2> /dev/null
|
dd if=$SQUASHED of=/squashed.img bs=512 2> /dev/null
|
||||||
|
@ -158,7 +158,7 @@ if [ -e "$SQUASHED" ] ; then
|
||||||
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img
|
losetup -r $BASE_LOOPDEV /squashfs/LiveOS/ext3fs.img
|
||||||
|
|
||||||
umount -l /squashfs
|
umount -l /squashfs
|
||||||
if [ "$live_ram" == "0" ] ; then
|
if [ -z "$live_ram" ] ; then
|
||||||
umount -l $NEWROOT
|
umount -l $NEWROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue