-
Notifications
You must be signed in to change notification settings - Fork 16
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
Mount /proc before starting chroot #8
base: main
Are you sure you want to change the base?
Conversation
Sorry for the late response... Possibly a stupid question, but couldn't this potentially cause issues when the mounted proc of the host doesn't even remotely match what should be there on the target? |
Mounting /proc before entering a chroot is standard practice. Most of what proc contains is process and kernel information, both things that are identical inside and outside the chroot. |
The problem is that we are not just entering a chroot here though but actually emulate a different system in that chroot in order to install stuff and run modification code. And that's where I'm worried that the proc from the host would cause issues with the guest. |
You are always emulating a different system with a chroot, that is the whole point of a chroot. The fact that it is a different distribution or so won't matter (as long as it is binary compatible with the running kernel). The only time this could cause a problem is when code makes decisions about information in /proc when that is different from what /proc would be in your new system.... but that code would not function without /proc and thus would have already failed your build. In any case, it should be easy enough to test... |
And exactly THAT, from my understanding, is not the case here (usually built on x86 against emulated arm), or is it?
From my understanding the whole reason for the PR was that exactly that happened, and in a context that sounded quite architecture specific to me. |
This is outside my comfort zone :)
This should just be tested. If you do not mount /proc, you will have more code that will fail because it is considered a standard feature of a linux kernel. |
Well, so far building stock OctoPi via CustomPiOS as well as anything I've run through CustoPiZer has worked just fine, with that mechanism, without a mounted |
rust install via rustup script was definitely a pain. I ended up finding a workaround by using the command below. but I have yet to figure out how much I need to expand the disk space to allow it to build yet. keep running out of space.
|
ok added 30GB (random post I saw somewhere), but then got the next error relative to /proc/...
|
On my x86 machine,
In theory, you could try to create a file /proc/cpuinfo with the following content:
|
Some scripts like the installer for rust (rustup) rely on the existance of
/proc/self/exe
This mounts /proc into the chroot folder before entering