Dracut help

George Toft george at georgetoft.com
Tue Nov 29 22:17:21 MST 2016


OS: CentOS 7

I'm building an image for a diskless workstation, and it turns out about 
25% of the clients don't work (great description).

The problem is the laptop NIC hardware.  What I found works are the 
older laptops that use the e1000 NIC, but some newer ones don't work - 
they are using something else.  I tried to create the initramdisk using 
dracut:

dracut --force -m "nfs network base" drive3testing.img 
3.10.0-327.36.3.el7.x86_64

and when I look at the modules included, I get:

[root at localhost tftpboot]# lsinitrd drive3testing.img | grep ethernet
drwxr-xr-x   4 root     root            0 Nov 29 21:54 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet
drwxr-xr-x   3 root     root            0 Nov 29 21:54 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel
drwxr-xr-x   2 root     root            0 Nov 29 21:54 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e
-rw-r--r--   1 root     root       389989 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
drwxr-xr-x   2 root     root            0 Nov 29 21:54 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek
-rw-r--r--   1 root     root        51205 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek/8139cp.ko
-rw-r--r--   1 root     root        68877 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek/8139too.ko
[root at localhost tftpboot]#

yet the number of ethernet kernel modules are far greater:

[root at localhost tftpboot]# find 
/usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet 
-type f -exec basename {} \;
alx.ko
atl1c.ko
atl1e.ko
atl1.ko
atl2.ko
b44.ko
bnx2.ko
bnx2x.ko
cnic.ko
tg3.ko
bna.ko
at91_ether.ko
macb.ko
xgmac.ko
cxgb3.ko
cxgb4.ko
cxgb4vf.ko
enic.ko
de2104x.ko
de4x5.ko
dmfe.ko
tulip.ko
uli526x.ko
winbond-840.ko
xircom_cb.ko
dnet.ko
be2net.ko
ethoc.ko
ipg.ko
e1000.ko
e1000e.ko
fm10k.ko
i40e.ko
i40evf.ko
igb.ko
igbvf.ko
ixgbe.ko
ixgbevf.ko
jme.ko
mvmdio.ko
skge.ko
sky2.ko
mlx4_core.ko
mlx4_en.ko
mlx5_core.ko
myri10ge.ko
pch_gbe.ko
netxen_nic.ko
qla3xxx.ko
qlcnic.ko
qlge.ko
8139cp.ko
8139too.ko
r8169.ko
sfc.ko
epic100.ko
smsc9420.ko
tlan.ko
[root at localhost tftpboot]#

So I thought I found the answer, and shoved that list into the dracut 
command like so:

[root at localhost tftpboot]# dracut --force -m "nfs network base `find 
/usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet 
-type f -exec basename {} \;`" drivewipe3testing.img 
3.10.0-327.36.3.el7.x86_64
dracut module 'alx.ko' cannot be found or installed.
dracut module 'atl1c.ko' cannot be found or installed.
dracut module 'atl1e.ko' cannot be found or installed.
dracut module 'atl1.ko' cannot be found or installed.
dracut module 'atl2.ko' cannot be found or installed.
dracut module 'b44.ko' cannot be found or installed.
dracut module 'bnx2.ko' cannot be found or installed.
dracut module 'bnx2x.ko' cannot be found or installed.
dracut module 'cnic.ko' cannot be found or installed.
dracut module 'tg3.ko' cannot be found or installed.
dracut module 'bna.ko' cannot be found or installed.
dracut module 'at91_ether.ko' cannot be found or installed.
dracut module 'macb.ko' cannot be found or installed.
dracut module 'xgmac.ko' cannot be found or installed.
dracut module 'cxgb3.ko' cannot be found or installed.
:
dracut module 'epic100.ko' cannot be found or installed.
dracut module 'smsc9420.ko' cannot be found or installed.
dracut module 'tlan.ko' cannot be found or installed.
[root at localhost tftpboot]#

I even tried to just list the directory name like so:

[root at localhost tftpboot]# dracut --force -m "nfs network base `find 
/usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet 
-type d -exec basename {} \;`" drivewipe3testing.img 
3.10.0-327.36.3.el7.x86_64

But that did didn't help much:

[root at localhost tftpboot]# lsinitrd drivewipe3testing.img | grep ethernet
Arguments: --force -m 'nfs network base ethernet atheros alx atl1c atl1e 
atlx broadcom bnx2x brocade bna cadence calxeda chelsio cxgb3 cxgb4 
cxgb4vf cisco enic dec tulip emulex benet icplus intel e1000 e1000e 
fm10k i40e i40evf igb igbvf ixgbe ixgbevf marvell mellanox mlx4 mlx5 
core myricom myri10ge oki-semi pch_gbe qlogic netxen qlcnic qlge realtek 
sfc smsc ti'
drwxr-xr-x   4 root     root            0 Nov 29 22:04 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet
drwxr-xr-x   3 root     root            0 Nov 29 22:04 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel
drwxr-xr-x   2 root     root            0 Nov 29 22:04 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e
-rw-r--r--   1 root     root       389989 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
drwxr-xr-x   2 root     root            0 Nov 29 22:04 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek
-rw-r--r--   1 root     root        51205 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek/8139cp.ko
-rw-r--r--   1 root     root        68877 Oct 24 09:50 
usr/lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/net/ethernet/realtek/8139too.ko
[root at localhost tftpboot]#


Listing of /etc/dracut.conf (space-saving mode - comments left out):

[root at localhost tftpboot]# grep -v "^#" /etc/dracut.conf | grep -v "^$"
add_dracutmodules+="nfs"
[root at localhost tftpboot]#

What am I doing wrong?

-- 
Regards,

George Toft



More information about the PLUG-discuss mailing list