-
Notifications
You must be signed in to change notification settings - Fork 68
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
If /usr/src is global DKMS "just works" #251
Comments
Hi! Sorry for the delay. Props on your digging - you figured out quite a lot here! The current Bedrock Linux 0.7 Poki documentation for cross-stratum feature compatibility, including any need for extra steps to make something work, is here. (The installation instructions tries to get people to learn about this page before installing Bedrock). The cross-stratum feature page includes a dkms section which does document the binutils constraint you figured out: the I don't know how to make Bedrock automate enforcing these constraints, which leaves it up to the user. I found a number of people were unpleasantly surprised by broken modules they couldn't figure out, which lead me to disable cross-stratum dkms by default in The concern with making Can you elaborate on why you think Other than my previously mentioned now rectified oversight about documenting the need to manually enable cross-stratum functionality once you're aware of the constraints at hand, I think things are about as good as we can trivially get them here. Making one stratum's
To make sure we're on the same page, AFAIK mixing kernels and dkms modules from different strata usually works, provided you enable the cross-stratum functionality and manually pair the Very minor, but I figure I should point it out just in case it helps: restricting when compiling is a good habit, and we are certainly compiling with |
Hi! Thanks for your detailed response!
I'm a developer, we don't read documentation :P
My thought was that the user could easily keep track of which kernels have module X installed (I was confused at first to find out that Arch's Alternative: Maybe adding DKMS functionality to
First thing that immediately came to mind was creating a private mount namespace for those consumers where Forcing udev into it's own mount namespace doesn't sound like a good idea though. |
Of course!
;)
Yeah, for better or worse I think this is our best option in the immediate future.
There are other use cases that Bedrock can make work cross-stratum, but don't just-work. For these users have to jump through some hoops. In addition to the dkms issue which prompted this discussion, there's also nVidia driver shenanigans, as well as some caching issues with application menus, and probably others that aren't immediately coming to mind. I hadn't considered it before, but the idea of a subsystem which provides user-friendly automation for this hoop-jumping could certainly provide a lot of value. I'll have to give it more thought before committing to the idea, but at the moment I find it promising. The hardest part, of course, is coming up with the name for the subsystem.
This is certainly an interesting idea. Bedrock 0.7 Poki's minimum kernel version predates a lot of mount namespace tooling, but the upcoming 0.8 Naga is likely to bump the minimum kernel version up enough to open such possibilities here. I'm planning on using mount namespaces in Naga as a solution to another set of issues, and thus we'll have good infrastructure for managing namespaces there anyways. I share your concern about applying this to udev. Another concern is that it isn't obvious to me we'll have a method to force everything at play into its own namespace. A particularly difficult case, for example, would be a busybox-based distro's init script which calls One of the challenging parts of Bedrock is coming up with improvements for one subsystem without impairing others. As cool as it would be for I haven't dug deeply into the corresponding modprobe/udev/etc documentation or code, but it seems plausible there's a way to configure them to look in another location. If that's available, Bedrock may be able to enforce the configuration values accordingly. kmod modprobe does have a promising looking A sort of last-resort option would be to (ab)use FUSE and mount our own filesystem on |
Howdy!
The setup
What I did
So I was giving cross-stratum DKMS a try in my fresh Bedrock VM (didn't work)
I noticed that
/lib/modules
is a global path, but/usr/src
is not (!)I found out that DKMS needs the kernel sources of the running kernel in
/usr/src
to function at allFirst thing I did was symlink the kernel source in the Debian stratum to the Arch stratum, didn't work
Then I made
/usr/src
global, DKMS started working as expected(I created
/bedrock/strata/bedrock/usr/src
, moved the contents of every/usr/src
into/bedrock/strata/bedrock/usr/src
and then made/usr/src
a global path inbedrock.conf
)Now you don't need to install DKMS in the kernel providing stratum and pacman (other package managers not tested) can automatically install DKMS modules
The DKMS modules persist between reboots and between kernels
TL;DR
/usr/src
moved to a global pathImages
(ignore the warnings about missing kernel sources, that's on me)
pacman automatically installing DKMS
Cross-stratum DKMS working
Arch and Debian kernel side-by-side
The text was updated successfully, but these errors were encountered: