Talk:Install Debian on USB
From FlimzyWiki
Hi !
Thanks for your great article. I really approve your method. There is my contribution.
I found few errors in your script that i try to resolve. this is not real error just a newline mistake or '\' missing character
line 31-32 : zap_file=$(ls -c /boot/casper/*.squashfs | grep -v /base.squashfs | tail -n1 | sed -e s%/boot/casper/%%)
line 88-89 : mount -o loop /boot/casper/base-$version.squashfs /casper/base-$version.squashfs
line 121-122 : branches=$(/usr/sbin/unionctl / --list | grep -v /cow | sed -e 's%\s%%g' | cut -d'(' -f1);
There's another problem due to the read only file system. Moo script can't delete oldest squashfs files. So i decided to create function
freespace() {
echo "Checking free space on /boot..."
while [ $(df /boot | grep boot | tr -s ' ' | cut -d' ' -f5 | sed -e s/%//) \> $MAXPCT ]; do
zap_file=$(ls -c /boot/casper/*.squashfs | grep -v /base.squashfs | grep -v -f /boot/casper/order.lst | tail -n1)
if [ -n $zap_file ]; then
echo "Zapping $zap_file"
rm $zap_file
fi
done
}
Then i just call this function after remount /boot in read/write mode (line 77-78) :
mount -o remount,rw /boot freespace echo $version > /boot/casper/snapshot.ver
Hello, thanks for your great tutorial, this is exactly what I search for.
Unfortunately I cannot get the system booting. After resolving a grub error 18 since the first partition was to large, I now get the error "init 150: Can't open /scripts/casper" at the step "Mounting root file system".
I tried a lot but it seems I cannot resolve this problem on my own. I would appreciate your help on this. Thanks a lot, Roman (webcontact2@morawek.at)
Hi,
I just seen this discussion after editing the main page...
I've edited the main page with all errors removed on the "moo" script.
For me this script is working like a charm on a 256MB CF with an old fanless Openbrick.
Great idear,
Philippe

