Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Kernel module loading is broken on 3.8.0-25? #104

Closed
ku1ik opened this issue Jul 5, 2013 · 13 comments
Closed

Kernel module loading is broken on 3.8.0-25? #104

ku1ik opened this issue Jul 5, 2013 · 13 comments

Comments

@ku1ik
Copy link

ku1ik commented Jul 5, 2013

I upgraded my kernel on Ubuntu 13.04 recently (just by apt-get upgrade) and restarted.
Since then when I try to enable firewall on a raring VM with ufw enable I get following:

[Errno 2] libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.8.0-25-generic/modules.dep.bin'
ip6tables v1.4.12: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

I checked /lib/modules/ directory and it's not there but that's the same raring image that worked before so the issue must be hidden somewhere else.

Full output (from vagrant up to the above error) here:
https://gist.github.com/sickill/5935636

@fgrehm
Copy link
Owner

fgrehm commented Jul 5, 2013

@sickill funny that you mentioned that, my laptop just crashed for some weird reason and I was only able to boot again by rolling back to 3.8.0-19, I can't really reboot right now to dig into it but I'll keep an eye on this. tks for reporting!

@fgrehm
Copy link
Owner

fgrehm commented Jul 13, 2013

@sickill quick update, been using 3.8.0-25 over the last week and things are working fine. were you able to dig into the issue? I was able to reproduce the problem with ufw you mentioned but I have no idea how to fix it =/ I'll give a shot at using an older kernel to check if things work fine when I have a chance

@ku1ik
Copy link
Author

ku1ik commented Jul 13, 2013

@fgrehm unfortunatelly I haven't found the cause of the problem.

@fgrehm
Copy link
Owner

fgrehm commented Jul 13, 2013

Does booting with a different version work?
On Jul 13, 2013 4:14 PM, "Marcin Kulik" notifications@github.com wrote:

@fgrehm https://github.com/fgrehm unfortunatelly I haven't found the
cause of the problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/104#issuecomment-20924983
.

@ku1ik
Copy link
Author

ku1ik commented Jul 16, 2013

Unfortunatelly (but fortunately for me) I switched to Fedora recently and I don't have this old Ubuntu installation anymore to check on some different kernel.

@fgrehm
Copy link
Owner

fgrehm commented Jul 16, 2013

@sickill No worries, I'll have a look at it from here. So you've been using vagrant-lxc on Fedora? If yes, did it require any manual intervetion? Would you mind adding some notes to this wiki entry? :)

@fgrehm
Copy link
Owner

fgrehm commented Jul 16, 2013

@sickill oh, just noticed you've created #113, sorry about that :)

@fgrehm
Copy link
Owner

fgrehm commented Jul 17, 2013

updates on this one: I've just upgraded to 3.8.0-26 and I still can't use ufw on vagrant-lxc containers. I'll try this out with vanilla lxc templates to check if it works.

@fgrehm
Copy link
Owner

fgrehm commented Jul 29, 2013

@sickill I'm not sure what's going on here, I've added a link to this issue to our Troubleshooting section of the Wiki in case someone hits the same problem.

I'm up for fixing things from vagrant-lxc side if the problem is there :)

@fgrehm fgrehm closed this as completed Jul 29, 2013
@fgrehm
Copy link
Owner

fgrehm commented Sep 5, 2013

So I've hit this today while trying to run Docker inside a vagrant-lxc container. It used to work just fine on the past but I think they might have changed something at some point or maybe I messed up with something else :P

For now I just went ahead and shared /lib/modules with the guest container and Docker was able to work without issues. I'm not sure what are the implications of that I believe it shouldn't be a problem for dev environments. If things end up working fine I'll just add an entry to our troubleshooting wiki page

@fgrehm
Copy link
Owner

fgrehm commented Sep 5, 2013

Turns out that my issue was actually related to not providing lxc.customize 'aa_profile', 'unconfined'

@abevoelker
Copy link
Contributor

I was getting a similar (but different) error related to kernel modules when trying to install the iptables-persistent package in a container running within Ubuntu 12.04 w/ the 3.8.0-33 kernel:

vagrant@precise-base:~$ sudo apt-get -y install iptables-persistent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
iptables-persistent is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 20 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up iptables-persistent (0.5.3ubuntu2) ...
FATAL: Could not load /lib/modules/3.8.0-33-generic/modules.dep: No such file or directory
dpkg: error processing iptables-persistent (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 iptables-persistent
E: Sub-process /usr/bin/dpkg returned an error code (1)

Turns out the container's /lib/modules directory is empty, I'm assuming for security reasons:

vagrant@precise-base:~$ sudo find /lib/modules
/lib/modules

Neither installing iptables-persistent on the host machine nor adding lxc.customize 'aa_profile', 'unconfined' fixed the issue for me. I'm sure it's really dangerous, but the fix I'm using for now is to just share /lib/modules on the host with the container:

config.vm.synced_folder "/lib/modules", "/lib/modules"

@iamjvn
Copy link

iamjvn commented Jun 22, 2017

It seems this recent change has broken the synced_folder "/lib/modules" workaround.

lxc-start 20170622002807.856 ERROR    lxc_utils - utils.c:open_without_symlink:1682 - Too many levels of symbolic links - lib in /usr/lib/x86_64-linux-gnu/lxc/lib/modules was a symbolic link!
lxc-start 20170622002807.857 ERROR    lxc_conf - conf.c:mount_entry:1708 - Too many levels of symbolic links - failed to mount '/lib/modules' on '/usr/lib/x86_64-linux-gnu/lxc/lib/modules'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants