From the mloop code itself
Code: Select all
xmodule() {
mount -t auto -o loop $xfile $mpoint
Added in 3 hours 40 minutes 12 seconds:
I will mloop a module that contains files that are larger than the free space I have in / to demonstrate what I meant.
First I look for the largest module I have on my internal drive:
Code: Select all
root@porteus:/Porteus_modules# du -mL *.xzm|sort -nr|head
261 bluegriffon-3.1.0-x86_64-wre.xzm
209 onlyoffice-5.0rc1-alldesktops.xzm
206 LibreOffice-6.2.5.2-x86_64-de_rava.xzm
145 004-brave-browser-1.34.80-linux-amd64+night-mode.xzm
132 004-brave-browser-1.34.80-linux-amd64+night-mode2.xzm
118 nvidia-415.23-k.4.20.0-porteus-v5.0-x86_64.xzm
115 nvidia-410.73-k.4.19.8-porteus-v5.0-x86_64.xzm
112 004-brave-browser-1.34.80-linux-amd64.xzm
97 kodi-17.3-x86_64-bundle-don.xzm
79 005-chromium-ungoogled-91.0.4472.114-x86_64-en-US-1alien.xzm
none of these have been activated in this session.
For demonstration purpose I will check df -m on "/" prior the mloop, during the mloop and after umounting the module using the 261 MB module of bluegriffon-3.1.0-x86_64-wre.xzm and my alias "dx" by executing "dx /"
Code: Select all
root@porteus:/Porteus_modules# type dx
dx is a function
dx ()
{
echo $(date +%d.%m.%Y\ %H:%M:%S) ____________________________________________________________;
/bin/df -Tm $* | grep -vE 'tmpfs|/mnt/live/run|squashfs'
}
Now I use dx / to get the MB of free space in /
Code: Select all
root@porteus:/Porteus_modules# dx /
27.08.2022 16:52:31 ____________________________________________________________
Filesystem Type 1M-blocks Used Available Use% Mounted on
aufs aufs 388 88 301 23% /
According to your theory, mounting the compressed filesystem of a Porteus module means I have to extract it into the root aka "/" file system. Let's mloop it and check via "dx /"
Code: Select all
root@porteus:/Porteus_modules# mloop bluegriffon-3.1.0-x86_64-wre.xzm
using /dev/loop11
Please wait while I gather some info ....
#################################
Your module has been mounted at:
/mnt/loop
You can unmount it by typing uloop
Here is a list of the files:
opt usr var
root@porteus:/Porteus_modules# dx /
27.08.2022 16:54:18 ____________________________________________________________
Filesystem Type 1M-blocks Used Available Use% Mounted on
aufs aufs 388 88 301 23% /
As you can see, the free space on "/" is still the same. Still, /mnt/loop contains the module just like mloop said:
Code: Select all
root@porteus:/Porteus_modules# cd /mnt/loop/
root@porteus:/mnt/loop# du -scm */ .??*/ 2>/dev/null |sort -nr
367 total
367 opt/
1 var/
1 usr/
As you can see,
there is 367 MB of files mounted in /mnt/loop/ - and my system had only 301 MB free on / (means also 301 MB free on /tmp)
Now let's umount the module
Code: Select all
root@porteus:/mnt/loop# cd -
/Porteus_modules
root@porteus:/Porteus_modules# uloop
nothing is mounted in /mnt/loop
root@porteus:/Porteus_modules# umount /mnt/loop/
root@porteus:/Porteus_modules# ls -a /mnt/loop/
. ..
root@porteus:/Porteus_modules# dx /
27.08.2022 16:58:04 ____________________________________________________________
Filesystem Type 1M-blocks Used Available Use% Mounted on
aufs aufs 388 88 301 23% /
A xzm module is a compressed read-only file system that gets mounted via a loop device as any other filesystem.
Using
mloop or activate mounts the xzm via loop device, only xzm2dir
extracts the module.