How to add loop suport to my kernel?

Issues related to applications and software problems
Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

How to add loop suport to my kernel?

Post by Ramon F. Herrera » 2020/08/01 03:25:03

I have to confess, this is a whole new world for me. I am attempting to put this ultracool application on my server:

https://github.com/potree/potree

(check out how the huge point clouds at the bottom can be manipulated in 3D)

That web based app is based on Node.js

The steps that I am following are very straightforward:

https://snapcraft.io/install/node/centos

The error occurred in that last step:
snap install node --classic
I am getting this error message:

snap install node --classic
error: system does not fully support snapd: cannot mount squashfs image using
"squashfs": mount: /tmp/sanity-squashfs-231943212: failed to setup loop device: No such file or directory

It sounds like I will have to reinstall/relink the kernel?

TIA,

-Ramon
JFK Numbers
Last edited by Ramon F. Herrera on 2020/08/01 14:59:13, edited 2 times in total.

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loops to my kernel?

Post by Ramon F. Herrera » 2020/08/01 03:44:18

Found this:

https://www.geekpills.com/operating-sys ... es-centos7

But it applies to loops that exist already.

-Ramon
JFK Numbers

MartinR
Posts: 587
Joined: 2015/05/11 07:53:27
Location: UK

Re: How to add loopback to my kernel?

Post by MartinR » 2020/08/01 06:42:14

Loop devices are created on demand. On a system that has no loop devices in use:

Code: Select all

# ls /dev/loop*
/dev/loop-control
# losetup -f
/dev/loop0
This shows that there are no loop devices, and that the first one to be used is loop0. If now I mount a device:

Code: Select all

# mount /virt/ISOs/CentOS-5.11.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only
# ls /dev/loop*
/dev/loop0  /dev/loop-control
# losetup -f
/dev/loop1
In your case I would suspect that the problem is with /tmp/sanity-squashfs-231943212. FYI losetup in in the base repo (on C7) so unless you've made a big effort to eliminate it loop support is always there.

I won't be able to offer any more help until late this evening (2100 GMT) so if others wish to jump in, please do.

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loop support to my kernel?

Post by Ramon F. Herrera » 2020/08/01 13:08:49

Thank you, thank you, thank you.

I have 2 rented VPS boxes, Centos 6 and CentOS 7 running Apache. I only perform simple software development and wouldn't know how to deal with kernels.

Therefore, from that point of view the two boxes are pretty much from factory. The VPS in question was rented a few days ago. They installed the OS, I am trying to add the node.js package (or "snaps" as they are known these days).

The lack of /dev/loop-control on my side seems to indicate that my kernel (from distro) is not prepared for loops.

See preliminary images below. I will keep on editing them.

Needless to say, both CentOS 6 and 7 are inconsistent, in opposite directions.

-Ramon
JFK Numbers
Loop Lack plus comment.png
Loop Lack plus comment.png (115.03 KiB) Viewed 89 times
Last edited by Ramon F. Herrera on 2020/08/01 14:59:49, edited 3 times in total.

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loopback to my kernel?

Post by Ramon F. Herrera » 2020/08/01 13:24:47

MartinR wrote:
2020/08/01 06:42:14
In your case I would suspect that the problem is with /tmp/sanity-squashfs-231943212. FYI losetup in in the base repo (on C7) so unless you've made a big effort to eliminate it loop support is always there.
Martin: there is no /tmp/*squash* in my box.

Maybe my provider (InMotion) made the big effort not to provide the loop support.

I just checked in my old CentOS 5. That one is real iron, none of the virtual stuff, of my full property.

It is fully consistent and normal.

Code: Select all

[root@cowboy ramon]# ls -l /dev/loop*
brw-r----- 1 root disk 7, 0 Jul  1  2019 /dev/loop0
brw-r----- 1 root disk 7, 1 Jul  1  2019 /dev/loop1
brw-r----- 1 root disk 7, 2 Jul  1  2019 /dev/loop2
brw-r----- 1 root disk 7, 3 Jul  1  2019 /dev/loop3
brw-r----- 1 root disk 7, 4 Jul  1  2019 /dev/loop4
brw-r----- 1 root disk 7, 5 Jul  1  2019 /dev/loop5
brw-r----- 1 root disk 7, 6 Jul  1  2019 /dev/loop6
brw-r----- 1 root disk 7, 7 Jul  1  2019 /dev/loop7
[root@cowboy ramon]# 
[root@cowboy ramon]# 
[root@cowboy ramon]# losetup -f
/dev/loop0
-Ramon
JFK Numbers

User avatar
TrevorH
Forum Moderator
Posts: 29051
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to add loopback to my kernel?

Post by TrevorH » 2020/08/01 14:53:41

You know that CentOS 6 only has about 3 months of life left? And I see you say you are running CentOS 5, that's been out of support for over 3 years and is riddled with unfixed security problems. It should not be used at all.

I am not entirely sure what you are trying to do but "snaps" is not nodejs. It may be a way to install nodejs but snaps are owned and run by Ubuntu and are not the preferred solution on CentOS - though they may work.

You can find nodejs packages in both SCL and in EPEL without needing to use a snap at all.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loopback to my kernel?

Post by Ramon F. Herrera » 2020/08/01 15:07:37

TrevorH wrote:
2020/08/01 14:53:41
You know that CentOS 6 only has about 3 months of life left? And I see you say you are running CentOS 5, that's been out of support for over 3 years and is riddled with unfixed security problems. It should not be used at all.
My CentOS 5 box is safely guarded in an isolated room. The hardware is not capable of upgrades and I don't care about support: it is frozen in time.

My CentOS 6 is still used, being upgraded.

Which brings us to my current problem.

-Ramon
JFK Numbers
Last edited by Ramon F. Herrera on 2020/08/01 15:16:05, edited 1 time in total.

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loopback to my kernel?

Post by Ramon F. Herrera » 2020/08/01 15:15:34

TrevorH wrote:
2020/08/01 14:53:41
I am not entirely sure what you are trying to do [...]
I am planning to host this application:

https://github.com/potree/potree

Instead of those pretty German towns, I have one location of interest in the world. I was donated the point cloud seen below by the author of the 3D models, simulations and videos:

https://www.youtube.com/watch?v=8XWW2G3rSWM

and I placed it the public domain:

http://www.dealey-plaza.org/this-govern ... /pbs-nova/

Now I intend to show it to the whole world, in action.

Thanks!

-Ramon
JFK Numbers

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loopback to my kernel?

Post by Ramon F. Herrera » 2020/08/01 15:29:36

TrevorH wrote:
2020/08/01 14:53:41
"snaps" is not nodejs. It may be a way to install nodejs but snaps are owned and run by Ubuntu and are not the preferred solution on CentOS - though they may work.
You can find nodejs packages in both SCL and in EPEL without needing to use a snap at all.
Good to know! Will try that route as well. The SCL has been a lifesaver, I am finally running proper GCC, PHP, etc.

Interestingly, I am already running Node.js and the Potree application. All I have to do is connect to this URL: http://localhost:1234.

The only problem is that I seem to be in a sandbox with no privileges.As soon as I press ^C the whole illusion is gone. I need to make that WebGL and Node.js app available to all the users that care to visit my site.

Which apparently requires /dev/loop to be created.

-Ramon
JFK Numbers

Ramon F. Herrera
Posts: 15
Joined: 2020/07/29 14:56:14

Re: How to add loop suport to my kernel?

Post by Ramon F. Herrera » 2020/08/02 16:35:37

Ramon F. Herrera wrote:
2020/08/01 03:25:03

The error occurred in that last step:
snap install node --classic
I am getting this error message:

snap install node --classic
error: system does not fully support snapd: cannot mount squashfs image using
"squashfs": mount: /tmp/sanity-squashfs-231943212: failed to setup loop device: No such file or directory

It sounds like I will have to reinstall/relink the kernel?

TIA,

-Ramon
JFK Numbers
For what it's worth, this is what I decided. Recompile the kernel, modifying one flag first:

Code: Select all

zcat /proc/config.gz | grep DEV_LOOP
CONFIG_BLK_DEV_LOOP=m                  <== this 'm' becomes 'y'
CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
I had to do this ages ago in Sun servers. I was surprised at that previously-seen-as daunting task: it turned out to be very straightforward:

The latest kernel was downloaded from here:

https://www.kernel.org/

After changing the variable from 'm' to 'y' in the .config file, all I had to do was type "make" and wait 3 hours.

I have NOT typed "make install". I may do it after I have backups.

Note: This is just for my education, to refresh my memory on Linux sysadmin matters: I already have the application 'node' running.

Thanks to everybody!

-Ramon
JFK Numbers

Post Reply

Return to “CentOS 7 - Software Support”