I have built a working kmod rpm that successfully installs on RHEL7 (kernel 3.10.0-327.el7.x86_64). I've also created a driver disk image successfully as the rpm driver is needed during installation for a 10G network card and copied the image to a usb stick. When I boot from my RHEL7 iso dvd and give the "inst.dd" command, the anaconda installer is able to see the usb device mounted as a device with type "squashfs". When I select the usb device, anaconda cannot find the image on the usb device!? I've confirmed that the image has been correctly built by confirming the the contents of the driver disk image(see below). I've read here: https://www.marcanoonline.com/post/2016 ... iver-disk/ and here: viewtopic.php?t=51302 that the driver rpm that you build must provide 'kernel-modules' in order to tell the installer the minimum support kernel version for the module. I believe this where I'm missing out. Can anyone please tell me how to add this section to my spec file so that I can retest a new driver disk image of my rpm? Is it as simple as adding the following 'Provides: kernel-modules >= 3.10.0-327.el7.x86_64' to my spec file? How am I able to add this section into my working spec file? Any responses or suggestions from the community would be greatly appreciated! I'm beating myself up over this. Thanks for any help!
FYI - Below is a copy of my spec file and the contents of my kmod driver disk image.
xnxx.spec file
Code: Select all
%define build_kernel 3.10.0-327.el7.x86_64
%define current_kernel 3.10.0-327.el7.x86_64
%define destdir /lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net/
Summary: 10Gbe network interface driver
Name: kmod-xnxx
Version: 1.0
Release: 1
License: GPL
Group: Hardware driver
BuildArch: x86_64
BuildRoot: %{buildroot}
%description
Creating a xnxx kernel module RPM
%prep
%install
mkdir -p %{buildroot}%{destdir}
if [ “%{build_kernel}” != “%{current_kernel}” ]; then
echo “This rpm is for %{build_kernel} kernel version. Ensure that you are using right module/kernel”
exit 1
fi
ls %{destdir} > /dev/null 2> /dev/null
if [ $? != 0 ]; then
echo “%{destdir} is not there. Unable to install the driver.”
exit 1
fi
install -m 644 %(pwd)/BUILD/xnxx.ko %{buildroot}%{destdir}xnxx.ko
%clean
rm -rf %{buildroot}
%post
/sbin/depmod %{current_kernel}
%files
%defattr(-,root,root)
%{destdir}xnxx.ko
%changelog
#* Thu September 1 2017
kmod-xnxx-1.0-1-driver-disk.img
Code: Select all
# unsquashfs -ls kmod-xnxx-1.0-1-driver-disk.img
Parallel unsquashfs: Using 48 processors
11 inodes (36 blocks) to write
squashfs-root
squashfs-root/.rundepmod
squashfs-root/lib
squashfs-root/lib/modules
squashfs-root/lib/modules/3.10.0-327.el7.x86_64
squashfs-root/lib/modules/3.10.0-327.el7.x86_64/kernel
squashfs-root/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers
squashfs-root/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net
squashfs-root/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net/xnxx.ko
squashfs-root/rhdd3
squashfs-root/rpms
squashfs-root/rpms/x86_64
squashfs-root/rpms/x86_64/kmod-xnxx-1.0-1.x86_64.rpm
squashfs-root/rpms/x86_64/repodata
squashfs-root/rpms/x86_64/repodata/199d71afbb4aa89a896b609577c9e0ca070672c7f80ebe5f7273fb9283137e06-primary.sqlite.bz2
squashfs-root/rpms/x86_64/repodata/2c6c4525896c997a39ad4a421374d7349982417c02c563981950fa84b763ada9-other.xml.gz
squashfs-root/rpms/x86_64/repodata/64885ad83287e369f59153a2cd3be8d61432bcb1d1e2aa564d32229e0eafcd61-filelists.xml.gz
squashfs-root/rpms/x86_64/repodata/8854f6750331bb5d2c45aaa0433b5255fba8d20463098b93d263d360b1773273-other.sqlite.bz2
squashfs-root/rpms/x86_64/repodata/a7ea3e14da59f372a339c36195202b109fe94fa8a21bb84c9cf7ad2b74058c47-filelists.sqlite.bz2
squashfs-root/rpms/x86_64/repodata/c805aef0db12d76ea6a8a5fafa579a3f770737188c41472d1b683b4390d6bbe1-primary.xml.gz
squashfs-root/rpms/x86_64/repodata/repomd.xml