Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201736 - localmount of linux-VServer guest shows modprobe error when usb is disabled
Summary: localmount of linux-VServer guest shows modprobe error when usb is disabled
Status: RESOLVED DUPLICATE of bug 186521
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-09 03:04 UTC by onox
Modified: 2007-12-14 21:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description onox 2007-12-09 03:04:03 UTC
When using baselayout-2, a starting linux-VServer show the following error:

FATAL: Could not load /lib/modules/2.6.19-hardened-r6/modules.dep: No such file or directory

This is caused by /etc/init.d/localhost on 61: modprobe -q usbcore
modprobe complains because the modules.dep file does not exist.

I fixed it by putting around the modprobe line:

if [ -f /lib/modules/`uname -r`/modules.dep ] ; then
    // modprobe line here
fi

Maybe there's a better way than 2 if's... but I'm not an expert with shell scripting
Comment 1 onox 2007-12-09 03:05:52 UTC
err... localmount, not localhost :)
Comment 2 Roy Marples (RETIRED) gentoo-dev 2007-12-10 10:36:00 UTC
Dunno about fixing this.
Your solution hides the real error of the kernel modules not being installed correctly. If you don't have any modules, or a vserver can't load them, then you should not enable module support in the kernel.
Comment 3 onox 2007-12-10 16:50:33 UTC
(In reply to comment #2)
> Dunno about fixing this.
> Your solution hides the real error of the kernel modules not being installed
> correctly. If you don't have any modules, or a vserver can't load them, then
> you should not enable module support in the kernel.
> 

/lib/modules/2.6.19-hardened-r6/modules.dep is present on the host, but not inside a vserver. I do want to load modules on the host. The baselayout script does use modprobe -q to silence errors in case the usb-core does not exist. This is good. Hoever, -q does not hide the error about the missing modules.dep... which is not present in a vserver.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-12-10 16:59:53 UTC
Then /proc/modules should not be present inside a vserver. It implies by its very existance that the running kernel supports modules.
Comment 5 SpanKY gentoo-dev 2007-12-10 17:05:41 UTC
as Roy said, checking for the existence of the .dep file is not the answer
Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2007-12-14 16:44:59 UTC
only a cosmetic bug

*** This bug has been marked as a duplicate of bug 186521 ***
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-12-14 21:06:05 UTC
It should also be noted with baselayout2 and upwards you can remove the modules init script from the boot runlevel in the vserver.