Specifies the directory within the squashfs where the ext3fs.img or rootfs.img
can be found. By default, this is __LiveOS__.
+**rd.live.ram=**1::
+Copy the complete image to RAM and use this for booting. This is useful
+when the image resides on i.e. a DVD which needs to be ejected later on.
+
**rd.live.overlay.thin=**1::
Enables the usage of thin snapshots instead of classic dm snapshots.
The advantage of thin snapshots is, that they support discards, and will free
writable filesystem without snapshots __(see notes above about available live boot options)__.
You can use the **rootflags** option to set mount options for the live
filesystem as well __(see documentation about rootflags in the **Standard** section above)__.
+This implies that the whole image is copied to RAM before the boot continues.
++
+NOTE: There must be enough free RAM available to hold the complete image.
++
+This method is very suitable for diskless boots.
Plymouth Boot Splash
base=$BASE_LOOPDEV
over=$OVERLAY_LOOPDEV
fi
+
if [ -n "$thin_snapshot" ]; then
modprobe dm_thin_pool
mkdir /run/initramfs/thin-overlay
umount -l /run/initramfs/squashfs.osmin
fi
-# we might have an embedded fs image to use as rootfs (uncompressed live)
-if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then
- FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img"
-elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then
- FSIMG="/run/initramfs/live/${live_dir}/rootfs.img"
-fi
-
-if [ -n "$FSIMG" ] ; then
- BASE_LOOPDEV=$( losetup -f )
-
- if [ -n "$writable_fsimg" ] ; then
- # mount the provided fileysstem read/write
- echo "Unpacking live filesystem (may take some time)"
- unpack_archive $FSIMG /run/initramfs/fsimg/
- losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img
- echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw
- else
- # mount the filesystem read-only and add a dm snapshot for writes
- losetup -r $BASE_LOOPDEV $FSIMG
- do_live_from_base_loop
- fi
-fi
-
# we might have an embedded fs image on squashfs (compressed live)
if [ -e /run/initramfs/live/${live_dir}/${squash_image} ]; then
SQUASHED="/run/initramfs/live/${live_dir}/${squash_image}"
mkdir -m 0755 -p /run/initramfs/squashfs
mount -n -t squashfs -o ro $SQUASHED_LOOPDEV /run/initramfs/squashfs
- BASE_LOOPDEV=$( losetup -f )
- if [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then
- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/ext3fs.img
- elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then
- losetup -r $BASE_LOOPDEV /run/initramfs/squashfs/LiveOS/rootfs.img
- fi
+fi
+
+# we might have an embedded fs image to use as rootfs (uncompressed live)
+if [ -e /run/initramfs/live/${live_dir}/ext3fs.img ]; then
+ FSIMG="/run/initramfs/live/${live_dir}/ext3fs.img"
+elif [ -e /run/initramfs/live/${live_dir}/rootfs.img ]; then
+ FSIMG="/run/initramfs/live/${live_dir}/rootfs.img"
+elif [ -f /run/initramfs/squashfs/LiveOS/ext3fs.img ]; then
+ FSIMG="/run/initramfs/squashfs/LiveOS/ext3fs.img"
+elif [ -f /run/initramfs/squashfs/LiveOS/rootfs.img ]; then
+ FSIMG="/run/initramfs/squashfs/LiveOS/rootfs.img"
+fi
- umount -l /run/initramfs/squashfs
+if [ -n "$FSIMG" ] ; then
+ BASE_LOOPDEV=$( losetup -f )
- do_live_from_base_loop
+ if [ -n "$writable_fsimg" ] ; then
+ # mount the provided fileysstem read/write
+ echo "Unpacking live filesystem (may take some time)"
+ mkdir /run/initramfs/fsimg/
+ if [ -n "$SQUASHED" ]; then
+ cp -v $FSIMG /run/initramfs/fsimg/rootfs.img
+ else
+ unpack_archive $FSIMG /run/initramfs/fsimg/
+ fi
+ losetup $BASE_LOOPDEV /run/initramfs/fsimg/rootfs.img
+ echo "0 $( blockdev --getsize $BASE_LOOPDEV ) linear $BASE_LOOPDEV 0" | dmsetup create live-rw
+ else
+ # mount the filesystem read-only and add a dm snapshot for writes
+ losetup -r $BASE_LOOPDEV $FSIMG
+ do_live_from_base_loop
+ fi
fi
+[ -e "$SQUASHED" ] && umount -l /run/initramfs/squashfs
+
if [ -b "$OSMIN_LOOPDEV" ]; then
# set up the devicemapper snapshot device, which will merge
# the normal live fs image, and the delta, into a minimzied fs image