linux - Unable to install kernel driver rpm during %post section kickstart RHEL7 -
i'm trying install custom driver rpm custom built. have kickstart file bundled rhel7.2 iso %post
section. in %post
, have yum install of driver rpm seems installed, notice depmod logs fatal errors when driver rpm gets installed:
installing : kmod-xnxx-1.0-1_test.x86_64 depmod: fatal: not load 3.10.0-327.el7.x86_64: no such file or directory warning: %post(kmod-xnxx-1.0-1_test.x86_64) scriptlet failed, exit status 1 non-fatal postin scriptlet failure in rpm package kmod-xnxx-1.0-1_test.x86_64 verifying : kmod-xnxx-1.0-1_test.x86_64 installed : kmod-xnxx-1.0-1_test.x86_64 complete!
as rpm gets installed, runs depmod -a , dracut rebuild ramdisk. i'm not sure why these errors re occurring during anaconda post install? i've confirmed same kernel "3.10.0-327.el7.x86_64" being used during post have no idea why module doesn't installed correctly without "depmod" errors. recall past running kernel during anaconda install has differences kernel gets installed. i'm not sure if attributed issue i'm having post. suggestions on how overcome great. thanks!
below spec file i'm using build kernel driver rpm(kmod) against kernel 3.10.0-327.el7.x86_64:
%define build_kernel 3.10.0-327.el7.x86_64 %define current_kernel %(uname -r) %define destdir /lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net/ summary: driver name: kmod-xnxx version: 1.0 release: 1_test license: gpl group: hardware driver buildarch: x86_64 buildroot: %{buildroot} %description creating xn4xx kernel module rpm %prep %install mkdir -p %{buildroot}%{destdir} if [ “%{build_kernel}” != “%{current_kernel}” ]; echo “this rpm %{build_kernel} kernel version. ensure using right module/kernel” exit 1 fi ls %{destdir} > /dev/null 2> /dev/null if [ $? != 0 ]; echo “%{destdir} not there. unable install driver.” exit 1 fi install -m 644 %(pwd)/build/xnxx.ko %{buildroot}%{destdir}xnxx.ko %clean rm -rf %{buildroot} %post /sbin/depmod -a %{current_kernel} /sbin/dracut -v -f /boot/initramfs-%{current_kernel}.img %{current_kernel} %files %defattr(-,root,root) %{destdir}xnxx.ko %changelog
Comments
Post a Comment