modprobe: cannot parse modules.dep error
Saravanan Chanemouganandam
schane at osmozis.com
Wed Dec 26 03:58:52 PST 2007
Hello Vda,
Execuse me for the late reply as I was on christmas holidays.
well, I have included your "test code" in the modprobe.c file and performed
the fresh rootfs again using only busybox and iptables for simpler
1.) compiled and installed BusyBox v1.1.4-pre0 to nfs development rootfs
"/home/Mybusybox/uCrootfs/"
2.) compiled and installed iptables ( with NO_SHARED_LIBS=1)
/home/Mybusybox/uCrootfs/sbin and
/home/Mybusybox/uCrootfs/lib
3.) installed kernel modules to
/home/Mybusybox/uCrootfs that installs the module dependencies
/home/Mybusybox/uCrootfs/lib/modules/2.6.16-cm-x270/
Now, when executing iptables it finds modules.dep and other files
under /lib/modules/2.6.16-cm-x270/ but tries to load module "ip_tables" and
throws error as
sara:/lib/modules/2.6.16-cm-x270$ iptables -t nat -A POSTROUTING -o br_wan -j
MASQUERADE
modprobe: module ip_tables not found.
modprobe: failed to load module ip_tables
modprobe: module ip_tables not found.
modprobe: failed to load module ip_tables
modprobe: module ip_tables not found.
modprobe: failed to load module ip_tables
modprobe: module ip_tables not found.
modprobe: failed to load module ip_tables
cm-debian:/lib/modules/2.6.16-cm-x270$
I then removed modules.dep ( as all support tables are built into kernel) and
it throws the following output.
sara:/lib/modules/2.6.16-cm-x270$ iptables -t nat -A POSTROUTING -o br_wan -j
MASQUERADE
modprobe: cannot parse modules.dep
modprobe: could not parse modules.dep
modprobe: cannot parse modules.dep
modprobe: could not parse modules.dep
modprobe: cannot parse modules.dep
modprobe: could not parse modules.dep
modprobe: cannot parse modules.dep
modprobe: could not parse modules.dep
Still the problem persists and couldn't find why it tries to load the required
modules when all filter tabels are built into kernel image.
thanks
Sara
Le Vendredi 21 Décembre 2007 17:44, Denys Vlasenko a écrit :
> On Tuesday 18 December 2007 11:08, Denys Vlasenko wrote:
> > On Tuesday 18 December 2007 09:32, Saravanan Chanemouganandam wrote:
> > > Hi all,
> > >
> > > I am running into the following problem when invoking a netfilter
> > > iptables ( v1.3.8) and xtables support in the buildroot's busybox
> > > (v1.7.2) system. The netfilter packet configuration and support modules
> > > are compiled and built into the linux-2.6.16 kernel image.
> > >
> > > When a 'C++' application code calls the iptables through
> > > sprintf(buff, "%s -t mangle -A PREROUTING %s -j MARK --set-mark 512",
> > > Config.iptables, Config.link[i]);
> > > it throws the modprobe error.
> > >
> > > iptables -t mangle -A PREROUTING -d 88.160.215.156 -p icmp -j MARK
> > > --set-mark 512
> > > modprobe: cannot parse modules.dep
> > > modprobe: cannot parse modules.dep
> > > iptables -t mangle -A PREROUTING -s 88.160.215.156 -p icmp -j MARK
> > > --set-mark 512
> > > modprobe: cannot parse modules.dep
> > > modprobe: cannot parse modules.dep
> > > iptables -t mangle -A PREROUTING -d 88.160.215.156 -p tcp --dport http
> > > -j MARK --set-mark 512
> > > modprobe: cannot parse modules.dep
> >
> > Can you try the following in modprobe.c?
> >
> > static struct dep_t *build_dep(void)
> > {
> > ...
> > filename = xasprintf("/lib/modules/%s/modules.dep", un.release);
> > fd = open(filename, O_RDONLY);
> > if (ENABLE_FEATURE_CLEAN_UP)
> > free(filename);
> > if (fd < 0) {
> > /* Ok, that didn't work. Fall back to looking in
> > /lib/modules */ fd = open("/lib/modules/modules.dep", O_RDONLY);
> > if (fd < 0) {
> > - bb_error_msg_and_die("cannot parse modules.dep");
> > + bb_error_msg("cannot parse modules.dep");
> > + return NULL;
> > }
> > }
> > ...
>
> Any news?
> --
> vda
More information about the busybox
mailing list