Comments (7)
@PaulCapestany I'll close this for now since we don't have any blockers or issues.
from modulus.
@PaulCapestany thank you for the kind words!
Unfortunately, we ran out of time and weren't able to discuss that slide during the presentation. The discussion would have centered around the acrobatics needed to run developer container in another container. Specifically, the developer container is distributed as a raw disk image complete with GUID partition table and extra partitions that must either be skipped with an offset or be truncated. This image must then be mounted and chrooted.
With regards to your main question: yes, Modulus can absolutely be used to compile and install other kernel modules; in fact, it was deliberately designed this way. NVIDIA just happened to be the first one I needed and implemented. Modulus follows a plugin approach so that implementing compilation for any kernel module X means simply creating a directory modulus/X
and providing two scripts: modulus/X/compile
and modulus/X/install
. Are you working on a particular kernel module? I'd love to give you a hand and add it to the project.
I too have run into issues with the developer container size particularly when trying to re-use the developer container. In order to circumvent this issue two things come to mind:
- we can easily bump the size of the image (as you suggested); this works up til a certain point: we can try to make the file large enough that it is unlikely anyone will run into issues compiling kernel modules but we may need to be sensitive about using too much disk space.
- we can mount the image, dump the contents of the image into a temporary directory, and then run the chroot there; this approach allows us to use as much space as we need without explicitly needing to allocate it.
What do you think?
For context, the truncate_bin
function is used to remove the leading and trailing bits from the developer container so it can be mounted. Alternatively, we could pass the -o
flag to the mount
command and specify the offset.
from modulus.
With regards to your main question: yes, Modulus can absolutely be used to compile and install other kernel modules; in fact, it was deliberately designed this way.
@squat nice--I hoped/thought so but wanted to sanity-check; this is great to hear :)
Are you working on a particular kernel module? I'd love to give you a hand and add it to the project.
Yes, I have some toy-example-ish modules that I've been trying to get working (since afaict) being in-tree they seemed like they should be straightforward enough... I'm not sure if they'd directly be of interest to anyone else, however, getting them working would theoretically also show folks how to get other in-tree modules working?
Re: the particular module(s)--specifically, the ones I've been trying to get working have been Apple-hardware-specific modules such as apple_gmux, applesmc, etc. I've had a bare-metal CoreOS Container Linux HA k8s cluster set up via typhoon running for a while consisting of old Apple laptops, Mac Minis, Mac Pros, etc, which had previously been sitting unused/decommissioned, and it could be cool (but definitely not critical) to have more control/access over their hardware via the requisite kernel modules. Regardless, I'd think that sorting out a good way to get any/other in-tree module(s) working via modulus would probably prove useful to people and I'd be happy to try helping contribute to those ends either way.
I too have run into issues with the developer container size particularly when trying to re-use the developer container. In order to circumvent this issue two things come to mind:
- we can easily bump the size of the image (as you suggested); this works up til a certain point: we can try to make the file large enough that it is unlikely anyone will run into issues compiling kernel modules but we may need to be sensitive about using too much disk space.
- we can mount the image, dump the contents of the image into a temporary directory, and then run the chroot there; this approach allows us to use as much space as we need without explicitly needing to allocate it.
Approach 1. seemed like the obvious/easy route, but approach 2. sounds interesting if there might be situations where people would need somewhat unbounded space for compilations. Other than the observation that 1. seems superficially simpler, and that 2. might be more future-proof, I personally don't have very strong opinions in favor of one vs the other--which of them currently seems more compelling to you?
from modulus.
Ok, @squat thanks so much for clarifying the partition/truncation stuff, I think I got things working with a bigger base image. Just went with quick and dirty resize via truncate -s
followed by resizing the filesystem while having dev image losetup
ed. This method could also be used to pass in an arg to allow for people to directly control size of volume they’d have
Currently AFK but I finally have my in-tree modules compiling away without running out of space, could post more later, thanks again for your help :)
from modulus.
@PaulCapestany that’s great! Would you consider contributing the changes in a PR? It would be great to include the image resizing as well as any of the new kernel modules you are working on.
Thanks for the update.
from modulus.
Sure thing. Should be able to shoot off a PR later today/tomorrow
from modulus.
@squat I just opened PR #6 for the arbitrary-image-volume resizing feature we've been discussing here.
I'm still fiddling around with the general-purpose kernel module compilation stuff, but wanted to at least get this much out for now
from modulus.
Related Issues (13)
- compiling modules fails in 4.10 kernels HOT 1
- Systemd failures HOT 1
- Seeing `No space left on device` errors when using SystemD HOT 3
- Missing glxserver_nvidia submodule? HOT 4
- coreos-overlay did not match any file(s) known to git HOT 1
- Unable to compile Nvidia module on Flatcar Linux HOT 2
- Add Nvidia driver Flatcar compatibility matrix HOT 3
- Nvidia drivers failing to compile with CL 1520.6.0 HOT 5
- question: does this nvidia driver work with the latest stable flatcar kenerl (5.15)? HOT 3
- Nvidia Docker runtime and Kubernetes Device Plugin HOT 8
- DevicePlugin keeps Terminating HOT 14
- Systemd instructions now fail when compiling Nvidia HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modulus.