Nope...
Always the same error message:
losetup: /mnt/us/test/fonts.sqsh: No such file or directory
I tried different numbers for loop (17 is the next free number, 0 - 16 are in use).
Besides: I think there is an error in the original script with the variable:
nxt=$(losetup -f)
returnes
/dev/loop0
not
/dev/loop
/0
But i fixed it by hand as you can see in the code - you can observe the variations I used:
Code:
# You need to find the next available loop device:
# nxt=$(losetup -f)
# echo "$nxt" #error?
# You have to use that loop device to translate your new file into a device
# ls -l /mnt/us/test/*
# losetup /mnt/us/test/fonts.sqsh $nxt
losetup /mnt/us/test/fonts.sqsh /dev/loop/17
# losetup /mnt/us/test/fonts.sqsh /dev/loop/Largest_Number
# losetup /dev/loop/Largest_Number
# Then you have to mount the new device on top of the existing system at that mount point
# mount -t squashfs $nxt /usr/java/lib/fonts
# mount -t squashfs /dev/loop/17 /usr/java/lib/fonts
# Make cvm and its children let go of the old (now 'bottom') layer files
# initctl stop cvm
# Get everything just stopped, re-started again
# initctl start cvm
Edit:
There is a conundrum with the path.
I managed to copy the file on
/opt/fonts.sqsh
Using this command:
Code:
losetup /opt/fonts.sqsh /dev/loop/17
Seems there is space enough.
Same return: there is no...