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
debootstrap not empty during stage 0 #772
Comments
The root of the issue is that your WSL environment isn't able to run the binaries of the architecture you're building for. That would normally be because binfmt isn't set up properly. On a normal Ubuntu install, as long as you have What do you have in |
I quickly installed the two packages you suggested and this is the output you requested.
Still with the same results when doing a build. |
Okay, that's not what I'd expect if you have It may be |
/usr/lib/binfmt.d does indeed contain I restarted the service, no changes to the content of |
If I search for binfmt wsl, there are many issues that come up, but I don't have a 24.04 WSL install handy to check which ones are actually applicable. |
i'm seeing the same with my 20.04 install, but i'm not 100% certain that i ever built it on that one. I have a working one at home, i'll check that one when i get home later tonight if it's doing the same, but i'm not sure if it's a 20.4 or 22.4. |
I use WSL a bit at home, so when I get the chance, I'll poke around a bit as well. |
i've reinstalled a wsl 22.04 ubuntu and there it seems to work with no problems, so it seems that the problem is related to 24.04. |
In my case, systemd doesn't work in WSL by default. Did you do something to enable it? It looks like the That service is meant to launch |
After updating wsl, systemd is working, and I've found this:
So yeah, they intentionally disable it for whatever reason... Edit: From what I gather, the reason is that they register other binfmt definitions (using wsl-binfmt.service) to make it possible to run .exe files from within wsl, and they don't want anything else overriding it (for example, wine or mono binfmt files, maybe), so they just break everything else instead 👍. |
So basically, ubuntu 24.04 is a no go for building unless jumping trough a lot of hoops for the time being? I can stay on 22.04 without problem and this might be another good moment to bring up at work that they should let us dualboot linux. |
The hoops shouldn't be too major. If you remember to run However, qemu has been known to be a bit flakey and cause issues in the past, so the best thing to do is to build natively on a pi with enough storage. |
Ok, i'll give that a try at work tomorrow. Thanks for the help! |
No worries. Good luck! |
just for reference, at home i realised that on ubuntu 22.04 wsl i had not done a build yet on my main machine. I had to enable systemd in /etc/wsl.conf and restart the binfmt-support service which made /proc/sys/fs/binfmt_misc/ fill up, after which it would build. Before that i got the same result as on 24.04. At work the freshly installed 22.04 worked first time, so maybe older versions of 22.04 under wsl did not yet have systemd activated. |
I just checked at work, the 22.04 and 24.04 that i installed yesterday both had systemd activated in /etc/wsl.conf. If you think this might be interesting enough to add to the readme.md i'll play with it a bit more this weekend and send a pr somewhere next week. |
I think I'll add a check in However, if it's not working out of the box, it generally indicates something wrong with the host system. I don't think it would be possible for us to document and track all of the potential issues when running in an unknown environment. I think we'll say that native builds on a Raspberry Pi will work and are fully supported. But when users start introducing other distros, other kernels, VMs, containers, binfmt and emulators things start getting a bit fragile and those issues should go upstream to whichever component introduces it. |
Should be "fixed" in d87f764 |
I set up a new wsl with ubuntu 24.04 today and started running into problems straight away:
During stage0 i get:
I checked the log mentioned above and at the end it contains:
I then went back to an older copy i had on another wsl running on 20.04, and that one suddenly started showing the same problem.
I accidently nuked my 22.04 that i was using to build this morning, so can't go and check in that one anymore :(
I found an old issue here that mentioned the same problem from 2019, and checked that the patch in there is present in the current code: #248
Any idea what could be causing this?
The text was updated successfully, but these errors were encountered: