You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Loop doesn't seem to be working with Ubuntu 19.04, fails at losetup #46
Building my own version of OctoPrint with a few plugins when the build command is issued and it appears to go all the way through building the necessary modules and ripping apart the image, only to fail rebuilding the image.
Using Ubuntu 19.04 (64-bit) in a VirtualBox VM from osboxes.org. Simply using 'terminal' and not trying to install in Docker or with Vagrant.
I am pretty sure it is a permissions issue, but can't figure out how to fix it, sorry I am a linux noob.
A couple of notes, 'realpath' is not in the current Ubuntu package repository so it cannot be installed, also 'curl' needed be added to the install list in order to download the source via the provided instructions. Also, loop is not built into the kernel and not a loadable module so 'modprobe loop' does nothing. Nor does it list loop when searching for modules with 'lsmod'.
I studied the four other issues that mention loop failing (2 closed, 2 open) and it does not appear to provide a clear understanding of what is going on.
Just to verify if my setup of OctoPrint was the culprit, I tried building AlarmPi and OctoPi and both failed at the same location.
Ok, tested here on my 19.04 installation, and it works.
In your run it says:
failed to setup loop device for
Are you sure the loopback device is mounted? Did you use:
sudo modprobe loop
Note - if you did something to your system, I can't really support it, that
is why we have vagrant and docker, so you don't get environment issues.
I have since created a new VM using Debian 9 and it is appearing to work. I still want to get it installed on Ubuntu since I am more familiar with it than Debian. For now I am going to create a new Ubuntu VM and see if it isn't osboxes.org nonsense. Please leave this open until I report back that it is working.
Okay, I can now say with confidence that osboxes.org prebuilt VM for Ubuntu is the fault. I created a new Ubuntu VM installed VBoxGuestAdditions and was able to successfully build a rPi image. please note there are two corrections to your instructions needed if running on Ubuntu 18.04 RTS or newer (I ran CustomPiOS on Ubuntu 19.04). the first command to install dependencies needs realpath removed.
Yes, I will, give me 24 hours to get things set up again.
Been busy actually trying to use CustomPiOS, we have a community project trying to duplicate the functionality of Robo 3D's RoboOS, which is OctoPi based Kivy frontend for their printers. They have appeared to have stopped all development and left their users with very old versions of all parts, myself and a few others are trying to update it to work with the latest versions of OctoPrint / plugins / Kivy. It is located here, https://github.com/WheresWaldo/CommunityOS.
By the way, I have no issues using Debian 9 guest OS in VirtualBox on a Windows 10 host.
Still doesn't appear to work under Ubuntu, I am beginning to think it is because Ubuntu (other distros also) obscures or doesn't have a 'root' user. I haven't tried any other distros except for Debian 9, Ubuntu 19.04 and Mint 19.1. Debian is the only one that works 100% of the time, baring stupid commands I put in the chroot_script.
I will git clone the dev build of CustomPiOS, then try my setup. I will try to do it on Monday / Tuesday, since I am busy trying to fix stupid scripting errors in my distribution. I will start with a initial snapshot VM of Ubuntu 19.04 as it appears, once it is broken it is almost impossible to fix.
Also be sure to run losetup, even if the code does not fix the issue, you should be able to see it.
If you see files with (deleted) entry next to them, it means we know that is the issue that is causing the problem.
I've not been able to successfully build a simple distro on my macOS host using Docker for Mac and the referenced Dockerfile and docker-compose.yml. A more complete example with a basic TestOS or something might be helpful.
I've built (many many times now) my OS on my Mac but have since run into other problems. I'm using @guysoft's image on docker hub on devel, so I guess this isn't really a problem for me anymore.
Ok, found another scenerio where you will get an error "no such file or directory". If you run out of loopack devices! @WheresWaldo all 7 loopback devices are taken for you. So it would fail to mount boot.
Having this issue on a later bookworm PiOS release. No changes made that should have impacted this. Were there any fixes identified for the host system not being able to use loop devices or is this an entirely unsupported feature now?
# sudo modprobe loop
# lsmod |grep loop
# losetup -a
# losetup
# uname -a
Linux neo 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
@Rattkener sorry for the late reply. I don't know of an issue with that outside a docker container, you might be missing. Open a separate issue and post the exact error messages you are getting.
Activity
guysoft commentedon Apr 21, 2019
WheresWaldo commentedon Apr 21, 2019
Loop is not a loadable module in the newest versions of Ubuntu, it is compiled into the kernel, so::
sudo modprobe loop
does nothing
WheresWaldo commentedon Apr 21, 2019
I have since created a new VM using Debian 9 and it is appearing to work. I still want to get it installed on Ubuntu since I am more familiar with it than Debian. For now I am going to create a new Ubuntu VM and see if it isn't osboxes.org nonsense. Please leave this open until I report back that it is working.
WheresWaldo commentedon Apr 21, 2019
Okay, I can now say with confidence that osboxes.org prebuilt VM for Ubuntu is the fault. I created a new Ubuntu VM installed VBoxGuestAdditions and was able to successfully build a rPi image. please note there are two corrections to your instructions needed if running on Ubuntu 18.04 RTS or newer (I ran CustomPiOS on Ubuntu 19.04). the first command to install dependencies needs realpath removed.
Secondly, since loop is now built into the kernel, there is no need to execute the following command:
I am closing this issue as it appears it was a configuration issue with the pre-built VM.
guysoft commentedon May 6, 2019
Ok, I found out why this happends.
When running losetup you get a list, including
If you run
losetup -d /dev/loop7it solves the issue.Will try write up a fix.
Fix #46
guysoft commentedon May 8, 2019
@WheresWaldo If you feel like testing out this fix it would be great
WheresWaldo commentedon May 8, 2019
Yes, I will, give me 24 hours to get things set up again.
Been busy actually trying to use CustomPiOS, we have a community project trying to duplicate the functionality of Robo 3D's RoboOS, which is OctoPi based Kivy frontend for their printers. They have appeared to have stopped all development and left their users with very old versions of all parts, myself and a few others are trying to update it to work with the latest versions of OctoPrint / plugins / Kivy. It is located here, https://github.com/WheresWaldo/CommunityOS.
By the way, I have no issues using Debian 9 guest OS in VirtualBox on a Windows 10 host.
guysoft commentedon May 8, 2019
Cool!
Once you get it going you are more than welcome to add it to the list at here.
WheresWaldo commentedon May 9, 2019
Still doesn't appear to work under Ubuntu, I am beginning to think it is because Ubuntu (other distros also) obscures or doesn't have a 'root' user. I haven't tried any other distros except for Debian 9, Ubuntu 19.04 and Mint 19.1. Debian is the only one that works 100% of the time, baring stupid commands I put in the chroot_script.
guysoft commentedon May 12, 2019
@WheresWaldo Can you give the output of
losetup?Also note you need the latest dev build.
WheresWaldo commentedon May 12, 2019
I will git clone the dev build of CustomPiOS, then try my setup. I will try to do it on Monday / Tuesday, since I am busy trying to fix stupid scripting errors in my distribution. I will start with a initial snapshot VM of Ubuntu 19.04 as it appears, once it is broken it is almost impossible to fix.
guysoft commentedon May 12, 2019
You dont need to clone for the docker-build. just pull from https://hub.docker.com/r/guysoft/custompios/ the devel tag.
Also be sure to run
losetup, even if the code does not fix the issue, you should be able to see it.If you see files with
(deleted)entry next to them, it means we know that is the issue that is causing the problem.6 remaining items
RyanBalfanz commentedon May 15, 2019
I cannot get this working on 19.04 (DigitalOcean, fresh 19.04 instance) even with sudo-ing as I mentioned previously on an updated 18.04 box.
RyanBalfanz commentedon May 15, 2019
I've not been able to successfully build a simple distro on my macOS host using Docker for Mac and the referenced
Dockerfileanddocker-compose.yml. A more complete example with a basic TestOS or something might be helpful.guysoft commentedon May 16, 2019
Can you just give an example of plain, with no arguments
losetupIn a failed machine?
I see no example of what I asked for in the previous comment.
WheresWaldo commentedon May 16, 2019
Here is a plain output from 'losetup' on a failed Ubuntu 19.04 build that works 100% on Debian 9.
RyanBalfanz commentedon May 17, 2019
I've built (many many times now) my OS on my Mac but have since run into other problems. I'm using @guysoft's image on docker hub on devel, so I guess this isn't really a problem for me anymore.
guysoft commentedon May 19, 2019
Ok, found another scenerio where you will get an error "no such file or directory". If you run out of loopack devices!
@WheresWaldo all 7 loopback devices are taken for you. So it would fail to mount boot.
Try running outside the container:
Then build again using docker.
Should create
/dev/loop8(taken from here)
Will try and see if there is a way to output an error about this.
Fix error with not enough loopback devices #46
guysoft commentedon May 21, 2019
Ok, pushed a fix, docker-compose pull and try building now.
WheresWaldo commentedon May 23, 2019
Ok, had a chance to test it today and now it is building properly on Ubuntu. No other changes except using new code from devel.
guysoft commentedon May 24, 2019
Great! Thanks for testing and reporting!
Rattkener commentedon Jan 28, 2024
Having this issue on a later bookworm PiOS release. No changes made that should have impacted this. Were there any fixes identified for the host system not being able to use loop devices or is this an entirely unsupported feature now?
guysoft commentedon Jan 28, 2024
@WheresWaldo see #55 that tracks it
Rattkener commentedon Jan 29, 2024
Are these not separate issues? #55 seems to be related to issues inside the docker container.
guysoft commentedon Jul 18, 2024
@Rattkener sorry for the late reply. I don't know of an issue with that outside a docker container, you might be missing. Open a separate issue and post the exact error messages you are getting.