EDIT 2021-01-06 new attached loadmodule script, bug fix:
- Fixed that in some (or more) cases the filelist (containing symlinks) in /etc/SFS wasn't created.
-------------------------------------------------------------------
EDIT 2020-12-07 new attached loadmodule and rmbrokenlinks.sh, change:
- No empty directories are left behind after unloading.
-------------------------------------------------------------------
EDIT 2020-12-06 new attached loadmodule and rmbrokenlinks.sh, changes:
- Fixed the problem that while a module is loaded, some packages may fail to install (with apt) because of not being able to overwrite files located in folders that are symlinked to a read-only filesystem (mounted read-only .squashfs). See also: viewtopic.php?p=11666#p11666
- The method to symlink the files (only symlinks to files, folders will be created) is "cp -arsn .... ....", this may leave some empty folders after unloading, which is not a real problem IMO.
- Attached script "rmbrokenlinks.sh", to remove leftover broken symlinks, if needed run it at startup, or, to run automatically at boot, place it in /root/Startup or /etc/profile.d (the latter works on Sid and Buster, needs to have .sh extension though)
-------------------------------------------------------------------
EDIT 2020-12-03 new attached loadmodule script, changes:
- when loading a module, it outputs now a file list named after the module (in /etc/SFS), the list can be used by running "rmbrokenlinks.sh" (see below) script at (next) startup, in case the (broken) symlinks did remain in the system after forgotten to unload and e.g. a system crash or power down
- support for filenames including spaces (added double quotes around some variables)
- Attached script "rmbrokenlinks.sh", to remove leftover broken symlinks, if needed run it at startup, or, to run automatically at boot, place it in /root/Startup or /etc/profile.d (the latter works on Sid, needs to have .sh extension though)
-------------------------------------------------------------------
EDIT 2020-12-02 re-attached loadmodule, fixed slow unloading.
-------------------------------------------------------------------
Here's a script (loadmodule, attached) for testing to load SFS "on the fly" under the overlay based system (instead aufs), usage:
Code: Select all
root@live: ~# ./loadmodule --help
This script will (de)activate a module 'On the Fly', e.g. *.squashfs, *.xzm or *.sfs.
Usage:
./loadmodule -a </path/to/module> to activate or:
./loadmodule -d </path/to/module> to deactivate
It works by symlinking files from the SFS in the system when activating, deactivate will remove them.
One difference compared to how loading SFS works under 'aufs' overlay system is: if the SFS isn't deactivated before rebooting, the files (symlinks) from the SFS will be included in the save storage (if used). So better deactivate after use. (EDIT, fixed now, see EDIT 2020-12-03)
Inspired by the ideas/discussion from @rufwoof and @wanderer (based on tinycore method of loading SFS using symlinks):
viewtopic.php?p=10778#p10778
- loadmodule.gz
- 2021-01-06: Bug Fix. Remove fake .gz and make executable
- (8.02 KiB) Downloaded 169 times
- rmbrokenlinks.sh.gz
- 2020-12-07 Some changes/fixes. Remove fake .gz and make executable
- (684 Bytes) Downloaded 140 times
Fred