Last active
February 14, 2023 08:57
-
-
Save axlroden/3c001f0648197ab30ace1ec535938ac3 to your computer and use it in GitHub Desktop.
Centos 6.10 add updated i40e ixgbe drivers to netinstall iso
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Easiest done from a minimal clean 6.10 stock install as you need to be on same kernel as iso. | |
# Be root.. | |
yum install -y p7zip p7zip-plugins genisoimage gcc make kernel-devel | |
# download and extract iso | |
cd /tmp | |
mkdir centint | |
wget https://vault.centos.org/6.10/isos/x86_64/CentOS-6.10-x86_64-netinstall.iso | |
7z x -y -o/tmp/centint/ -r /tmp/CentOS-6.10-x86_64-netinstall.iso | |
# For kickstart automation, you can adjust the file | |
nano /tmp/centint/isolinux/isolinux.cfg | |
# example file below | |
# To save space on iso (228M), the rescue/test images will not be needed if you are doing remote netinstall | |
rm -rf /tmp/centint/images | |
# extract initrd | |
cd /tmp/centint/isolinux | |
mkdir initrd-new | |
mv initrd.img initrd.img.xz | |
xz --format=lzma initrd.img.xz --decompress | |
cd initrd-new | |
cpio -ivdum < ../initrd.img | |
# Download drivers and compile/install | |
cd /tmp | |
# Latest driver I could download that compiled properly | |
wget https://downloadmirror.intel.com/29659/eng/i40e-2.11.21.tar.gz | |
wget https://sourceforge.net/projects/e1000/files/ixgbe%20stable/5.11.3/ixgbe-5.11.3.tar.gz/download -O ixgbe-5.11.3.tar.gz | |
tar xvzf i40e-2.11.21.tar.gz | |
tar xvzf ixgbe-5.11.3.tar.gz | |
cd /tmp/i40e-2.11.21/src | |
make | |
make install | |
cd /tmp/ixgbe-5.11.3/src | |
make | |
make install | |
# Copy drivers | |
cp -r /lib/modules/2.6.32-754.35.1.el6.x86_64/updates/drivers/ /root/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/updates/ | |
# Prepare for depmod - manual way | |
egrep 'i40e|ixgbe' /lib/modules/2.6.32-754.35.1.el6.x86_64/modules.symbols | |
egrep 'i40e|ixgbe' /lib/modules/2.6.32-754.35.1.el6.x86_64/modules.alias | |
egrep 'i40e|ixgbe' /lib/modules/2.6.32-754.35.1.el6.x86_64/modules.dep | |
# Take this data and remove "old" content from the modules files on the initrd files, and insert this new data. | |
nano /root/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.symbols | |
nano /root/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.alias | |
nano /root/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.dep | |
### USE AT OWN RISK ### | |
# If not doing manually, automatic adjusting can be done, may delete stuff it shouldn't (works for these versions though) | |
cd /root/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/ | |
sed -i '/ixgbe/d' modules.symbols modules.alias modules.dep | |
sed -i '/i40e/d' modules.symbols modules.alias modules.dep | |
cd /lib/modules/2.6.32-754.35.1.el6.x86_64/ | |
egrep 'ixgbe|i40e' modules.symbols >> /tmp/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.symbols | |
egrep 'ixgbe|i40e' modules.alias >> /tmp/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.alias | |
egrep 'ixgbe|i40e' modules.dep >> /tmp/centint/isolinux/initrd-new/modules/2.6.32-754.el6.x86_64/modules.dep | |
# Depmod | |
# for Depmod to run we got to adjust modules kernel folder | |
cd /root/centint/isolinux/initrd-new/modules/ | |
mv 2.6.32-754.el6.x86_64 2.6.32-754.35.1.el6.x86_64 | |
depmod -a -v -b /root/centint/isolinux/initrd-new | |
mv 2.6.32-754.35.1.el6.x86_64 2.6.32-754.el6.x86_64 | |
# Generate ISO | |
mkisofs -r -V "Centos 6.10-nics" -b isolinux/isolinux.bin -c isolinux/boot.cat -cache-inodes -J -l -no-emul-boot -boot-load-size 4 -boot-info-table -o /tmp/centos6-nics.iso /tmp/centint | |
# Remember to install RPM of nic drivers during kickstart, or you will have no network when the system boots for the first time. | |
# .spec files are included in the driver packages if you can't find an rpm online. | |
# Remember to compile on the kernel you install if you are installing newer kernel during kickstart. | |
yum install newer-kernel-package-here | |
# reboot to kernel | |
yum install -y rpm-build | |
cp /tmp/ixgbe-5.11.3.tar.gz /root/rpmbuild/SOURCES/ | |
cp /tmp/i40e-2.11.21.tar.gz /root/rpmbuild/SOURCES/ | |
cp /tmp/ixgbe-5.11.3/ixgbe.spec /root/rpmbuild/SPECS/ | |
cp /tmp/i40e-2.11.21/i40e.spec /root/rpmbuild/SPECS/ | |
rpmbuild -ba /root/rpmbuild/SPECS/ixgbe.spec | |
rpmbuild -ba /root/rpmbuild/SPECS/i40e.spec | |
# Upload rpm files to your repo or server for install during kickstart | |
# RPM Files in | |
/root/rpmbuild/RPMS/x86_64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default vesamenu.c32 | |
#prompt 1 | |
timeout 600 | |
display boot.msg | |
menu background splash.png | |
menu color border 0 #ffffffff #00000000 | |
menu color sel 7 #ffffffff #ff000000 | |
menu color title 0 #ffffffff #00000000 | |
menu color tabmsg 0 #ffffffff #00000000 | |
menu color unsel 0 #ffffffff #00000000 | |
menu color hotsel 0 #ff000000 #ffffffff | |
menu color hotkey 7 #ffffffff #ff000000 | |
menu color scrollbar 0 #ffffffff #00000000 | |
label linux | |
menu label ^Install via kickstart with NIC drivers | |
menu default | |
kernel vmlinuz | |
append initrd=initrd.img ksdevice=link ks=https://www.example.com/kickstart.ks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment