From b3aad1868700a0a88d18142891b659d0a42d714b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 22 May 2018 21:16:16 +0100 Subject: dracut mgalive module changes are now in the dracut package. --- examples/dracut/mgalive-root.sh | 84 ----------------------------------------- 1 file changed, 84 deletions(-) delete mode 100755 examples/dracut/mgalive-root.sh (limited to 'examples/dracut/mgalive-root.sh') diff --git a/examples/dracut/mgalive-root.sh b/examples/dracut/mgalive-root.sh deleted file mode 100755 index a8fee5c..0000000 --- a/examples/dracut/mgalive-root.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -. /lib/dracut-lib.sh - -[ -f /tmp/root.info ] && . /tmp/root.info - -PATH=/usr/sbin:/usr/bin:/sbin:/bin - -[ -z "$1" ] && exit 1 -livedev="$1" - -# Create the live tree -mkdir -m 0755 -p /live/distrib -mkdir -m 0755 -p /live/media -mkdir -m 0755 -p /live/overlay -mkdir -m 0755 -p /live/union -mkdir -m 0755 -p /run/mgalive/ovlsize - -# Get the base device name -basedev=$(echo $livedev | sed 's,\(/dev/sd[a-z]\)1,\1,g') - -# Get the base directory for locating the loopback file. In normal use this is -# the root directory, but a multi-boot USB stick may want to override this. -basedir=$(getarg mgalive.basedir) -if [ -z "$basedir" ] ; then - basedir="/" -fi - -# Get the device or path used for persistant storage (if it exists). In normal -# use this is another partition on the same base device, but a multi-boot USB -# stick may want to override this. -overlay=$(getarg mgalive.overlay) -if [ -z "$overlay" ] ; then - overlay=`blkid -t LABEL=Mageia-Persist -o device | grep $basedev` -else - overlay=$livedev$overlay -fi - -if [ "$basedir" = "/" -a -z "$overlay" ] ; then - # Fix udev isohybrid LABEL issues (mga #3334) - # (things have moved on - this may not be needed now) - media=$basedev -else - media=$livedev -fi - -info "mgalive basedev is $basedev" -info "mgalive livedev is $livedev" -info "mgalive basedir is $basedir" -info "mgalive overlay is $overlay" - -# Mount the live media -mount -n -o ro $media /live/media - -# Mount the loopback filesystem -LOOPDEV=$( losetup -f ) -if [ -e /live/media$basedir/loopbacks/distrib-lzma.sqfs ] ; then - # Retain support for original draklive. Note that despite the file - # name, it too uses xz compression. - losetup -r $LOOPDEV /live/media$basedir/loopbacks/distrib-lzma.sqfs -else - losetup -r $LOOPDEV /live/media$basedir/loopbacks/distrib.sqfs -fi -mount -n -t squashfs -o ro $LOOPDEV /live/distrib -mount -n -t squashfs -o ro $LOOPDEV /run/mgalive/ovlsize - -# Mount the overlay filesystem -if [ -z "$overlay" ] ; then - mount -n -t tmpfs -o mode=755 none /live/overlay -else - mount -n -o noatime $overlay /live/overlay -fi -# work and memory must be on same root -mkdir -m 0755 -p /live/overlay/work -mkdir -m 0755 -p /live/overlay/memory -mount -n -t overlay overlay -o lowerdir=/live/distrib,upperdir=/live/overlay/memory,workdir=/live/overlay/work,noatime /live/union - -ln -s /live/union /dev/root - -printf '/bin/mount --rbind /live/union %s\n' "$NEWROOT" > $hookdir/mount/01-$$-live.sh - -need_shutdown - -exit 0 -- cgit v1.2.1