Thu Dec 12, 2013 9:26 pm
image_mountpoint=/lib/live/mount/medium
rsync -av --exclude-from="$excludes_file" "$image_mountpoint"/ "$usb_mountpoint"/${target_dir}
Thu Dec 12, 2013 10:55 pm
Fri Dec 13, 2013 1:12 am
set_livemediamounts () {
# this function is only for a live session
# the image is already mounted
# live-boot (3.0~b4-1) swiched mountpoints to /lib/live
# live-boot (3.0~b7-1) Updated file paths for /lib/live/mount http://lists.debian.org/debian-live/2012/10/msg00021.html
# live-boot (3.0~b7-1) Renamed /lib/live/mount/image to /lib/live/mount/medium http://lists.debian.org/debian-live/2012/10/msg00023.html
# wheezy is (3.0~a35-1) 21/11/2012
SYSTEM_LIVE_MEDIA_PATH=$(cat /proc/cmdline|grep -o "live-media-path=.*"|sed 's: .*::'|sed 's:live-media-path=/::')
if [ -z "$SYSTEM_LIVE_MEDIA_PATH" ]; then
SYSTEM_LIVE_MEDIA_PATH=live
fi
# wheezy (live-boot <3.0~b4-1)
elif [ -f /live/image/live/filesystem.squashfs ]; then
LIVEMEDIAMOUNT=/live/image
FILESYSTEM=$LIVEMEDIAMOUNT/${SYSTEM_LIVE_MEDIA_PATH}/filesystem.squashfs
# sid findiso
elif [ -f /lib/live/mount/medium/live/filesystem.squashfs ]; then
LIVEMEDIAMOUNT=/lib/live/mount/medium
FILESYSTEM=$LIVEMEDIAMOUNT/live/filesystem.squashfs
# sid squashboot
elif [ -f /lib/live/mount/medium/$SYSTEM_LIVE_MEDIA_PATH/filesystem.squashfs ]; then
LIVEMEDIAMOUNT=/lib/live/mount/medium/$SYSTEM_LIVE_MEDIA_PATH
FILESYSTEM=$LIVEMEDIAMOUNT/filesystem.squashfs
fi
echo "LIVEMEDIAMOUNT=$LIVEMEDIAMOUNT"
echo "FILESYSTEM=$LIVEMEDIAMOUNT/filesystem.squashfs"
if [ -z "$FILESYSTEM" ]; then
echo "Error... $FILESYSTEM not found"
fi
}
Fri Dec 13, 2013 4:33 pm
# Copy system from the running live system
# If system is running from a custom live-media-path, copy from there.
copy_livemount () {
live_dir=$(grep -o "live-media-path=.*" /proc/cmdline |sed 's: .*::' |sed 's:live-media-path=/::')
if [[ -z "$live_dir" ]] ; then
live_dir="/live"
fi
image_size=$(du -sh "$image_mountpoint"/${live_dir})
check_size
rsync -av --exclude-from="$excludes_file" "$image_mountpoint"/${live_dir} "$usb_mountpoint"
if [[ -e "$image_mountpoint"/isolinux ]] ; then
if [[ $copy_syslinux = "TRUE" ]] ; then
rsync -av "$image_mountpoint"/isolinux "$usb_mountpoint"
mv "$usb_mountpoint"/isolinux "$usb_mountpoint"/isolinux-$(date +%m%d%H%M)
rsync -av /usr/lib/refracta2usb/syslinux "$usb_mountpoint"
else
rsync -av "$image_mountpoint"/isolinux "$usb_mountpoint"
isolinux2syslinux
fi
elif
[[ -e "$image_mountpoint"/syslinux ]] ; then
if [[ $copy_syslinux = "TRUE" ]] ; then
rsync -av "$image_mountpoint"/syslinux "$usb_mountpoint"
mv "$usb_mountpoint"/syslinux "$usb_mountpoint"/syslinux-$(date +%m%d%H%M)
rsync -av /usr/lib/refracta2usb/syslinux "$usb_mountpoint"
else
rsync -av "$image_mountpoint"/syslinux "$usb_mountpoint"
fi
fi
if [[ $add_hooks = "TRUE" ]] ; then
echo " Adding Refracta custom hooks..."
rsync -av /usr/lib/refracta2usb/hooks "$usb_mountpoint"/${live_dir}
fi
finished_message="Live image copied."
finished_dialog
}
Sat Dec 14, 2013 9:30 pm
I think the excludes-file option can be removed.
Pretty sure that only makes sense when running mkusbcrypt and you're copying your home folder.
Sun Dec 15, 2013 11:47 am
thwak wrote:To me, the only "doesn't make sense to consider excludes" case is "Create a live-USB using files taken from a live-CD .iso file"
The 'r2u_exclude.list' seems incomplete, compared to refractasnapshot
(content of /tmp dir is copied, machine-id is copied, etc)
By the way, throughout the helpfiles... "excludes" is never mentioned.
The refracta2usb script specifies 'monaco' xterm font. Is that font even installed?
The refracta2usb gui script opens a too-narrow-for-the-content dialog window and the devicename + path lines become wordwrapped.
possible confusion:
"Run refracta2usb from the System menu or from command line:"
vs
# root should NOT run this script (ref: refracta2usb line 121)(version="refracta2usb 0.9.4e 2013-12-02")
vs
"Edit the variables in etc/refracta2usb.conf" (ref: help_r2u.txt)
zenity --file-selection --file-filter="*.[iI][sS][oO]" --file-filter="*" --width=640 --height=640 --title=$"Select Live ISO" --text="Select the CD image file."--filename="" --${BUTTON0}="OK"${BUTTON0NUM} --${BUTTON1}="Quit Task"${BUTTON1NUM}
--ok-label is not supported for this dialog
:~$ device="/dev/sde"
:~$ find /dev -mindepth 1 -maxdepth 1 -name "*[sh]d[a-z][1-9]" | grep $device | sort | awk '{print "\n" $0 }' | zenity --list --title="/home partition" --text="Select a partition for the encrypted home." --multiple --column ' ' --column 'Partitions' --height=380 --width=150
(zenity:27752): GLib-WARNING **: /tmp/buildd/glib2.0-2.33.12+really2.32.4/./glib/giounix.c:411Error while getting flags for FD: Bad file descriptor
Mon Dec 16, 2013 12:35 am
Really? Yeah, really. Howabout just dump the ongoing headache of coding fallbacks to accommodate zenity.(zenity:27752): GLib-WARNING **: /tmp/buildd/glib2.0-2.33.12+really
The refracta2usb gui script opens a too-narrow-for-the-content dialog window and the devicename + path lines become wordwrapped.
Where are you seeing this? And which version? I'm not getting that with zenity or yad.
I never considered that. Thanks for the insight.Not specifying the font at all seems to disable the font size setting
Exactly what did you do? The /tmp of the running system is not copied
whoosh, I still fail to understand how the script manages to exclude the tmp path# refracta2usb 0.9.4e 2013-12-02
# . . .
# Copy system from the running live system
copy_livemount () {
Mon Dec 16, 2013 3:43 am
Mon Dec 16, 2013 2:48 pm
Mon Dec 16, 2013 3:07 pm
refracta2usb (0.9.4f) unstable; urgency=low
* Moved all error logs to ~/.refracta2usb.
* Detect user id for ownership of files made by root scripts and
* filesystem in non-persistent loopback files.
* mkloopback: Grouped code into new function - setup_boot_menu.
* mkloopback: Detect live session to locate boot menu and initrd.
* mkloopback: Fixed bug that left $PERSISTENCE null.
* Removed custom buttons from zenity file-selection windows.
* Added --radiolist to zenity lists, otherwise, no output.
-- fsmithred <fsmithred@gmail.com> Mon, 16 Dec 2013 09:55:00 -0500