-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debian 10 (Buster), can't mount loop devices #55
Comments
Update: Edited
|
Are you building on vanilla Debian 10 or Rasbian? |
Building directly on vanilla Debian 10 in an Oracle VM on Windows 10. Even after pulling only the devel branch (using |
I believe I may have solved this. What didn't work was to create an entry in I tried this out in two distinct virtual machines (remember I am running VirtualBox on a Windows 10 host). The first was an upgraded VM from Debian 9 (stretch) to Debian 10 (buster). That one was hard, because it worked fine in Debian 9 but failed after the upgrade. The other VM was a fresh install of Debian 10, which also failed to create loop devices. I have not tested whether or not the image actually runs on an rPi, but building on Debian does complete without errors. I need to purchase another rPi, since I am now using the three I own in other projects and I can't sacrifice my current OctoPrint setup for testing. I am closing this issue. |
This is worth documenting in the wiki
|
First, I spoke too soon. only the upgraded VM, which worked fine using Debian 9 (stretch) works with the above file added after upgrading to Debian 10 (buster). I still can't get a new VM of Debian 10 (buster) to build. It still fails at trying to mount loop devices. I found other inconsistencies between building in buster vs stretch and may open other issues, unless I can find work-arounds. |
So the behavior is odd, Debian is very temperamental with regard to loop devices. If I come from a clean boot, I can build an image. If I try to build it again in the same session it fails saying that loop is unavailable. At the very least maybe the cleanup or error routine should check for loop devices and remove them explicitly. I am reopening since this really isn't solved. |
you can also try using rhe vagrant build method
…On Aug 5, 2019 03:09, "WheresWaldo" ***@***.***> wrote:
So the behavior is odd
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55?email_source=notifications&email_token=AACPQJWLFJVWSOTIW3KD53TQC5VUTA5CNFSM4IIGVI32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3QMPUA#issuecomment-518047696>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACPQJWQUYU6ZKXNIWQV6NDQC5VUTANCNFSM4IIGVI3Q>
.
|
I have never used that method, so I will need to study it to see how to set it up. |
Just updating I a getting this two, both on my arm64 raspbian installation and also in ZynthaianOS project. |
I haven't built another OS in a while, I settled on Stretch for my PiOS since I could never get Buster to work. And on another note, the other guy who was working on a rewrite of the RoboOS user interface stopped working on it. My project is dead now, for all intents and purposes, since I am not a programmer, just capable of assembling tools is all. |
Sorry to hear that :( Will stress that for me the issue is random. |
Looks like there is an open issue on Docker |
Possible workaround: moby/moby#27886 (comment) Need to reproduce to try and fix it |
FYI. I can reproduce this issue fairly easily/regularly with a fresh Ubuntu 19.10 VM, both with and without Docker. The behavior is the same, it works most of the time but randomly I will get loop device errors. The random nature of the issue makes it super hard to diagnose, I was about to comment yesterday that I had found a workaround for the loop device issues in Docker but eventually it failed again the same way, so it turned out it was down to pure luck and not actual fixes. Anyway, just wanted to comment that this isn't related to Docker, since I can reproduce the same behavior without using Docker at all. FYI, yesterday I found an interesting commit (again out of luck!), maybe this will be worked around in the Linux Kernel after all: brauner/linux@be3dddc |
What's your usual setup for using CustomPiOS, @guysoft? Would be helpful as a starting point. Do you build on a Pi under raspbian, or in Ubuntu? |
@mikevanis I have moved to use a raspberrypi running docker. It has the 64bit kernel set. Has a HDD for faster runtime. The docker service works more or less like this: The distro the Pi running is Raspbian However, I also help maintain the Zynthian.org build, which is sitting on an AWS EC2 machine running docker there. They are using Debian 9, that also works. |
Thanks @guysoft, that really helped. I can confirm that I don't get this issue on a clean Raspbian Buster image. I did the following:
Here's what my docker-compose.yml looks like. I had to change the volume mounting so that it starts on the right directory:
Thanks all for the help and hints |
Cool, I guess in the future you would also use https://github.com/guysoft/UbuntuDockerPi , which ships with docker + docker-compose :) If you could point out what was different from your last setup it might help others in this issue. |
Could it be that the Pi simply isn't fast enough to trigger the issue? From my notes it seems that the errors point to a timing issue with the loop device:
1 and 2 are the most common versions of the problem. 3 is quite rare but more telling of the actual problem IMO. The problem seems more likely to happen on small projects (like a bare distro out of |
@Fulg quite possible. I was considering to build a distro, that builds other distros. It could ship with Jenkins and have CI/CD nightly builds, you just give it a github repo and it builds it. |
@guysoft I understand that you much prefer using docker images to build the images, but I see the wiki mentions Raspbian as a host system to build with out-of-the-box and I remember making it work on the previous buster image some time ago! 😄 I tried again straight from the vanilla (latest to date) raspios-lite image on a RPi 4 but failed :(
Finishes with the infamous
I have also tried Issue #46 details the same problem on the Ubuntu host because of overused loop devices, but Note: I am building it straight on the SD card |
@amrsoll This is not related to this issue, you are not running with |
I build in DigitalOcean using a: doctl compute droplet create rmspi-build --size 1gb --image debian-10-x64 --region nyc1 Experienced this on my first attempt, re-try would succeed, 3rd would fail, 4th succeeded. Log is gone now but I can spin this up and give it a try if you need it. In dmesg I saw:
This is my build script I hacked together. sudo modprobe loop
apt update
apt install p7zip-full qemu-system-arm qemu-user-static backblaze-b2 git curl
cd /usr/src/
git clone https://github.com/toddejohnson/rmspi.git RMSPi
git clone https://github.com/guysoft/CustomPiOS.git CustomPiOS
echo "/usr/src/CustomPiOS/src" > /usr/src/RMSPi/src/custompios_path
CURRENT_RASPBIAN=$(curl https://downloads.raspberrypi.org/raspbian_lite/images/ | grep raspbian | tail -n 1 | awk -F "href=\"" '{print $2}' | awk -F "/" '{print $1}')
CURRENT_RASPBIAN_FILE=$(curl http://downloads.raspberrypi.org/raspbian_lite/images/${CURRENT_RASPBIAN}/ | grep .zip | head -n 1 | awk -F "href=\"" '{print $2}' | awk -F "\">" '{print $1}')
curl -L -o "/usr/src/RMSPi/src/image/${CURRENT_RASPBIAN_FILE}" https://downloads.raspberrypi.org/raspbian_lite/images/${CURRENT_RASPBIAN}/${CURRENT_RASPBIAN_FILE}
cd /usr/src/RMSPi/src
./build_dist
cd /usr/src/RMSPi/src/workspace
CURRENT_IMG_FILE=$(basename $CURRENT_RASPBIAN_FILE .zip)
OUT_IMG_FILE=$(basename $CURRENT_RASPBIAN_FILE .zip| cut -d'-' -f -3)-rmspi-$(basename $CURRENT_RASPBIAN_FILE .zip| cut -d'-' -f 5-)-0-4
mv ${CURRENT_IMG_FILE}.img ${OUT_IMG_FILE}.img
7za a ${OUT_IMG_FILE}.zip ${OUT_IMG_FILE}.img I used to use and tried to start with ubuntu-18-04-x64 although I had similar errors, gave up and decided Debian would be a better fit for this. |
This was done by bf8c9f5, which has now been reverted. But without it, new loopback devices don't show up in /dev when losetup runs. See: moby/moby#27886
Hey, One that didn't work: One I am going to test now: |
Hi, lacking some context here but here's what I learned:
A thought I have is: maybe you could create your loopback devices in the host before launching the container, then make use of them after launch? idk. |
@mmmspatz that's what should happen, but there is a bug that it doesn't always update correctly in the container. |
Not sure if this is helpful, but over on the My Naturewatch Camera repo we use CustomPiOS to build the camera image with GitHub Actions. I used to get this error sometimes when building images on a Pi 3B, but we haven't seen it happen in a while. |
@mikevanis Indeed the github actions builds I have here don't get that error neither. I don't know why. Also Naturewatch is cool! I recently released and also going to blog post about the rpi-imager fork I wrote that can accept community-maintained images: https://github.com/guysoft/pi-imager If you want to PR a .json file to this repo, would love to have that added to the list: |
Just updating that this is still an issue. |
When using Debian 10 as the host to build a CustomPiOS, pulling the latest stable release of Raspbian (Buster) the build script fails when it gets to mounting the loop devices. After the script fails, the following loop devices exist:
loop0 loop1 loop2 loop3 loop4 loop5 loop6 loop7 loop-control
The text was updated successfully, but these errors were encountered: