Port 5.0 x86-64 - uloop insists nothing is mounted in /mnt/loop when there is something mounted

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Port 5.0 x86-64 - uloop insists nothing is mounted in /mnt/loop when there is something mounted

Post#1 by Rava » 16 Sep 2022, 14:34

Port 5.0 x86-64

My current system:

Code: Select all

root@porteus:/# cat /etc/porteus/*
001-core.xzm:20220723
002-xorg.xzm:20220723
002-xtra.xzm:20220630
003-xfce4.xzm:20220428
initrd.xz:20201102
uloop insists nothing is mounted in /mnt/loop when there is indeed something mounted in it.
I just mounted the Porteus ISO there using mloop for displaying some info when writing my post about Port USB booting.
Trying to umount it via uloop have me this

Code: Select all

root@porteus:/# uloop

nothing is mounted in /mnt/loop
uloop is clearly mistaken there:

Code: Select all

root@porteus:/# ls /mnt/loop
EFI  USB_INSTALLATION.txt  boot  porteus
root@porteus:/# df -m /mnt/loop/
Filesystem     Type    1M-blocks  Used Available Use% Mounted on
/dev/loop20    iso9660       348   348         0 100% /mnt/loop
I can manually umount it via

Code: Select all

root@porteus:/# umount /mnt/loop/
root@porteus:/# ls /mnt/loop
root@porteus:/# df -m /mnt/loop/
Filesystem     Type 1M-blocks  Used Available Use% Mounted on
aufs           aufs       388    58       331  15% /
but that error in uloop should be fixed.

uloop in my /mnt/live/memory/images:

Code: Select all

root@porteus:/mnt/live/memory/images# find .|grep uloop
./001-core.xzm/opt/porteus-scripts/uloop
./001-core.xzm/usr/bin/uloop
The one in /usr/bin/ is just a symlink.

This is the uloop my system is using (from 001-core)

Code: Select all

root@porteus:/Lsfind# ls -o --time-style=long-iso /opt/porteus-scripts/uloop
-rwxr-xr-x 1 root 622 2021-10-01 07:05 /opt/porteus-scripts/uloop
root@porteus:/Lsfind# md5sum /opt/porteus-scripts/uloop
e1a1cba2ae9f385d37b1cffef4e56c63  /opt/porteus-scripts/uloop
After I umounted the ISO, I tested it again with mloop'ing 001-core :

Code: Select all

root@porteus:/Lsfind# ls /mnt/loop/
bin  etc   lib    media  opt   root  sbin  sys  usr
dev  home  lib64  mnt    proc  run   srv   tmp  var
root@porteus:/Lsfind# df -m /mnt/loop/
Filesystem     Type     1M-blocks  Used Available Use% Mounted on
/dev/loop1     squashfs       122   122         0 100% /mnt/loop
root@porteus:/Lsfind# uloop

 Nothing is mounted in /mnt/loop.
Same wrong info about "Nothing is mounted in /mnt/loop" as seen by the return value of umount when I manually umount the xzm:

Code: Select all

root@porteus:/Lsfind# umount /mnt/loop/
root@porteus:/Lsfind# echo $?
0
root@porteus:/Lsfind# ls /mnt/loop/
root@porteus:/Lsfind# 
Cheers!
Yours Rava

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3933
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

Port 5.0 x86-64 - uloop insists nothing is mounted in /mnt/loop when there is something mounted

Post#2 by ncmprhnsbl » 17 Sep 2022, 02:33

cannot reproduce..

Code: Select all

root@porteus:/mnt/sdc4/ISOS/x86_64# mloop Porteus-LXDE-v5.0-x86_64.iso
using /dev/loop11

Please wait while I gather some info ....

 Nothing is mounted in /mnt/loop.

mount: /mnt/loop: WARNING: source write-protected, mounted read-only.

 #################################
Your image has been mounted at: 
/mnt/loop

 You can unmount it by typing uloop

 Here is a list of the files:
EFI  USB_INSTALLATION.txt  boot  porteus

root@porteus:/mnt/sdc4/ISOS/x86_64# uloop

 /mnt/loop has been unmounted
 
 
don't know what's going with your case..
but, this has brought to my attention that mloop actually creates uloop(an older version at that) when it runs .. so the updated version of uloop actually is not used...
so, i'll need to either: remove the function that creates uloop from mloop or update that function and remove uloop..
note: none of this has any effect on loop mounting via the filemanager context menu, they don't use mloop..

regardless, i don't think this is causing whatever your problem is..
after mlooping something,what's the output of:

Code: Select all

grep /mnt/loop /proc/mounts | wc -l
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Port 5.0 x86-64 - uloop insists nothing is mounted in /mnt/loop when there is something mounted

Post#3 by Rava » 17 Sep 2022, 07:01

First I mloop'd an xzm and uloop worked as it should:

Code: Select all

root@porteus:/mnt# mloop $PORTDIR/base/001-core.xzm 
using /dev/loop11

Please wait while I gather some info ....

mount: /mnt/loop: WARNING: source write-protected, mounted read-only.


 #################################
 Your module has been mounted at: 
/mnt/loop

 You can unmount it by typing uloop

 Here is a list of the files:
bin  etc   lib	  media  opt   root  sbin  sys	usr
dev  home  lib64  mnt	 proc  run   srv   tmp	var

root@porteus:/mnt# uloop

/mnt/loop has been unmounted
Then I mloop'd an iso and now uloop malfunctions:

Code: Select all

root@porteus:/mnt# mloop /path/to/porteus/5.0/x86-64/ISO/Porteus-XFCE-v5.0-x86_64.iso 
using /dev/loop11

Please wait while I gather some info ....

mount: /mnt/loop: WARNING: source write-protected, mounted read-only.


 #################################
Your image has been mounted at: 
/mnt/loop

 You can unmount it by typing uloop

 Here is a list of the files:
EFI  USB_INSTALLATION.txt  boot  porteus

root@porteus:/mnt# uloop

nothing is mounted in /mnt/loop
Testing it via grep /mnt/loop /proc/mounts | wc -l and via df /mnt/loop

Code: Select all

root@porteus:/mnt# grep /mnt/loop /proc/mounts | wc -l
0
root@porteus:/mnt# df /mnt/loop
Filesystem     Type    1K-blocks   Used Available Use% Mounted on
/dev/loop20    iso9660    355830 355830         0 100% /mnt/loop
I presume it must be related to this somehow since it worked the 1st time and failed the 2nd time:
ncmprhnsbl wrote:
17 Sep 2022, 02:33
but, this has brought to my attention that mloop actually creates uloop(an older version at that) when it runs .. so the updated version of uloop actually is not used...
Added in 10 minutes 37 seconds:
Is the last entry in /proc/mounts is related to the last mount?
Or is the order of entries more random?

because I checked via tail -n 1 /proc/mounts - one time prior the manually umounting of the ISO in /mnt/loop - and one time after umounting it and the last entry was the same.

Should I save /proc/mounts and make a diff with the mounted state in /proc/mounts ( iso mounted /mnt/loop - as represented in e.g. ) and manually umounted it versions of /proc/mounts.

Looks you can simply copy it:

Code: Select all

root@porteus:/mnt# file /proc/mounts
/proc/mounts: symbolic link to self/mounts
root@porteus:/mnt# l /proc/self/mounts
-r--r--r-- 1 root 0 2022-09-17 09:10 /proc/self/mounts
root@porteus:/mnt# wc /proc/self/mounts
48 289 4025 /proc/self/mounts
root@porteus:/mnt# cp /proc/self/mounts /tmp/mounts
root@porteus:/mnt# wc /proc/self/mounts /tmp/mounts
  48  289 4025 /proc/self/mounts
  48  289 4025 /tmp/mounts
  96  578 8050 total
root@porteus:/mnt# md5sum /proc/self/mounts /tmp/mounts
f6f4ee24586916a8dc4abc39d9bacf7a  /proc/self/mounts
f6f4ee24586916a8dc4abc39d9bacf7a  /tmp/mounts
Cheers!
Yours Rava

Post Reply