Fatdog64 700 alpha1
I am posting from a fatdog 700 sfsdirect-remaster so it seems justifiable to post it to this thread as well as others.
SFSdirect-remaster is now working. It is probably the fastest possible remaster method.
Remaster in ram from ram or on device from ram.
Works with both fatdog and standard pups.
Only replacing the fd64.sfs in initrd is not automatic must be done manually until someone supplies the needed code!! Also maybe some tweaking is needed with regard to -e 'excluded' files and directories!
Please try it as a beta release ie use at your own risk. (back up your original initrd before replacing the fd64.sfs)
SFSdirect-remaster is now working. It is probably the fastest possible remaster method.
Remaster in ram from ram or on device from ram.
Works with both fatdog and standard pups.
Only replacing the fd64.sfs in initrd is not automatic must be done manually until someone supplies the needed code!! Also maybe some tweaking is needed with regard to -e 'excluded' files and directories!
Please try it as a beta release ie use at your own risk. (back up your original initrd before replacing the fd64.sfs)
Code: Select all
#!/bin/sh
#sfsdirect remastering suite by stemsee copyright Marcos Contant 2014
. /etc/DISTRO_SPECS
if [ -d /aufs ]; then
name=$DISTRO_FILE_PREFIX
else
name=$DISTRO_NAME
fi
echo "SfS direct is a live remaster system which works in either ram or device.
Make sure that your system has enough ram or uses a swap for the remaster, or
specify path and drive. e.g. mnt sda2.
Do you want to work in ram? y or n"
read ram
case $ram in
y) if [ -d /tmp/quaddirs ]; then
rm -r /tmp/quaddirs
rm /tmp/*.sfs
mkdir -p /tmp/quaddirs/{mnt,tmp,sys,proc}
else
mkdir -p /tmp/quaddirs/{mnt,tmp,sys,proc}
fi
mksquashfs /* /tmp/quaddirs/* /tmp/$name.sfs -e /proc /tmp /mnt /initrd /proc /sys /aufs /archive /root/.cache /root/.Trash /root/spot/Downloads/* /root/Downloads/* /root/.history /root/.bash_history /root/.Skype /etc/resolv.conf /root/.XLOADED /etc/.XLOADED /lib/modules /lib/firmware -keep-as-directory -noappend -comp xz
echo "'$name'.sfs has been created in /tmp. Where do you want to save it to?
Enter the path e.g. /mnt/sda2/"
read savepart
mv -f /tmp/$name.sfs $savepart
echo "All done!" && exit;;
n) if [ -d /tmp/quaddirs ]; then
rm -r /tmp/quaddirs
mkdir -p /tmp/quaddirs/{mnt,tmp,sys,proc}
else
mkdir -p /tmp/quaddirs/{mnt,tmp,sys,proc}
fi
echo "Input path and drive e.g. mnt sda2"
read path drive
mount /dev/$drive /$path/$drive
mksquashfs /* /tmp/quaddirs/* /$path/$drive/$name.sfs -e /proc /tmp /mnt /initrd /proc /sys /aufs /archive /root/.cache /root/.Trash /root/spot/Downloads/* /root/Downloads/* /root/.history /root/.bash_history /root/.Skype /etc/resolv.conf /root/.XLOADED /etc/.XLOADED /lib/modules /lib/firmware -keep-as-directory -noappend -comp xz
echo "All done!" && exit;;
*) echo "You didn't enter anything relevant! Exiting script." && exit;;
esac