I have noticed this problem for a few months, but I only realised today what is happening because I had to learn about aufs and mount -t squashfs -o loop ...etc
since compiling 6+ kernels, I couldn't load an sfs after boot. So today I looked at load_sfs.sh and changed one function then everything worked again.
Code: Select all
find_free_loop() {
export FREELOOP=$(losetup -f | cut -f2 -d'p')
#local in_use
#in_use=$(losetup -a | sed 's/:.*//; s|^.*/||' | tr '\n' '+')
#FREELOOP=$RESERVED
#while [ $FREELOOP -le $MAXLOOP ]; do
#case "$in_use" in
#*"loop${FREELOOP}+"*)
#FREELOOP=$((FREELOOP+1));
#continue ;;
#esac
#break
#done
}
It's not getting the free loop device correctly, my simple code gets it.