Re: Cooking ISO preview

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


> It should also be possible to make home= use a file container, instead
> of a partition.

Special thanks to Gokhlayeh:

# Hope this works :)

# Allow to use bootoption: home=file:$DEVICE file=$FILE
# i.e.: home=file:sda1 file=/stuff/home
#       home=file:myusb file=/home

# Edit /etc/init.d/bootopts.sh this way...
# Replace, line 99~103:
                        if [ -x /sbin/blkid ]; then
                                # Can be a label, uuid or devname.
DEVID gives us first: /dev/name.
                                DEVID=`/sbin/blkid | grep $DEVICE | cut -d: -f1`
                                DEVID=${DEVID##*/}
                        fi
# By:
                        if [ "${DEVICE%:*}" = "file" ]; then
                                LOOP="$(losetup -f)"
                                DEVID="${DEVICE#*:}"
                                if [ -x /sbin/blkid ]; then
                                        # Can be a label, uuid or
devname. DEVID gives us first: /dev/name.
                                        DEVID=`/sbin/blkid | grep
$DEVICE | cut -d: -f1`
                                        DEVID="${DEVID##*/}"
                                fi
                                FILE=`cat /proc/cmdline | sed
's/.*file=\([^ ]*\).*/\1/'`
                                mkdir /media/$DEVID
                                mount /dev/$DEVID /media/$DEVID
                                losetup $LOOP /dev/$DEVID$file
                                DEVID=${LOOP##*/}
                        elif [ -x /sbin/blkid ]; then
                                # Can be a label, uuid or devname.
DEVID gives us first: /dev/name.
                                DEVID=`/sbin/blkid | grep $DEVICE | cut -d: -f1`
                                DEVID=${DEVID##*/}
                        fi

---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/