Skip to content
Permalink
Browse files

Save session on CD/DVD toram changes

toram parameter will copy only /casper instead whole medium in RAM.
  • Loading branch information...
MintPup committed Aug 11, 2017
1 parent 4bb78fa commit 46f73db71aa6c99576d06da12b7b1904f1450e5a
Showing with 14 additions and 6 deletions.
  1. +14 −6 casper-boot/scripts/casper
@@ -178,16 +178,24 @@ copy_live_to() {
return 1
fi
fi
if [ "${freespace}" -lt "${size}" ] ; then
[ "$quiet" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k > ${size}k) to copy live media in ${copytodev}."
return 1
fi

#20170811 saintless for MintPup - comment out the free space check - toram now will copy only /casper instead whole medium in RAM.
### if [ "${freespace}" -lt "${size}" ] ; then
### [ "$quiet" != "y" ] && log_warning_msg "Not enough free ${free_string} (${freespace}k > ${size}k) to copy live media in ${copytodev}."
### return 1
### fi

# begin copying..
mkdir "${copyto}"
echo "mount -t ${fstype} ${mount_options} ${dev} ${copyto}"
mount -t "${fstype}" ${mount_options} "${dev}" "${copyto}"
cp -a ${copyfrom}/* ${copyto}

#20170811 saintless for MintPup - change cp with rsync as in live-boot (include rsync and /lib/i386-linux-gnu/libz.so.1 in initrd.lz).
# toram will copy only /casper (not whole medium) in RAM. Save sessions on CD/DVD works now :) toram for HDD/USB frugal install also works now.
echo " * Copying whole medium to RAM" 1>/dev/console
mkdir -p ${copyto}/${LIVE_MEDIA_PATH} # 20170811 saintless - using toram copy only /casper and its content (useful for hdd or usb frugal install).
rsync -a --progress ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH} 1>/dev/console # "cp -a" from busybox also copies hidden files # 20170809 saintless - using toram copy only /live and its content (useful for hdd or usb frugal install).

if [ -e ${copyfrom}/.disk ]; then
cp -a ${copyfrom}/.disk ${copyto}
fi
@@ -408,7 +416,7 @@ setup_unionfs() {
rofsstring=""
rofslist=""
if [ "${UNIONFS}" = "aufs" ]; then
roopt="rr"
roopt="rr+wh" #20170811 saintless for MintPup - as in DebianDog same suggestion from fredx181 for .wh support loading squashfs modules.
elif [ "${UNIONFS}" = "unionfs-fuse" ]; then
roopt="RO"
else

0 comments on commit 46f73db

Please sign in to comment.
You can’t perform that action at this time.