Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Fabian Arrotin: Remotely reinstalling a node on CentOS 8 with DuD (Driver Disk Update / kernel module for nic/hba)

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Fabian Arrotin: Remotely reinstalling a node on CentOS 8 with DuD (Driver Disk Update / kernel module for nic/hba)


๐Ÿ’ก Newskategorie: Unix Server
๐Ÿ”— Quelle: arrfab.net

Recently in the CentOS Infra, we got a new sponsor giving us access to a server that has a HBA needing a kernel module that was deprecated in the RHEL8 (and thus CentOS 8) kernel by default.

What can you do in such situation ? Answer is easy : Elrepo ! They provide (for years now) kernel modules ready to go for network cards, raid/hba controllers, wifi nics, etc, and for various versions of RHEL/CentOS and other rebuilds using same kernel.

I wanted to give it a try on a node I have at least remote KVM/ipmi access, to reset the node in case of problem. Let's use the following ~8y old IBM blade for this example , that has the following network interface card and also hba :

# lspci |egrep -i 'ethernet|Serial'
0c:00.0 Serial Attached SCSI controller: Broadcom / LSI SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] (rev 03)
16:00.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 03)
# lspci -n |egrep '0c:00.0|16:00.0'
0c:00.0 0107: 1000:0070 (rev 03)
16:00.0 0200: 19a2:0710 (rev 03)
# ethtool -i eth0|grep driver
driver: be2net
# modinfo be2net|grep 0710
alias:          pci:v000019A2d00000710sv*sd*bc*sc*i*
# lsmod|grep sas
mpt2sas               249763  2
# modinfo mpt2sas|grep 0070
alias:          pci:v00001000d00000070sv*sd*bc*sc*i*

As you can see above, we were searching for the kernel module in use, and compare in kernel module the pci id. We know which kmod to search for and which pci id the kmod is supposed to support. Let's verify this in CentOS 8 : Let's try with network module :

# modinfo be2net|grep 0710 || echo "Sorry, doesn't seem supported"
Sorry, doesn't seem supported

Ouch, be2net is present but doesn't support our pci id so it was deprecated ... we need a different one. Let's try now with the hba :

# modinfo mpt2sas|grep 0070 || echo "Sorry, doesn't seem supported"  
Sorry, doesn't seem supported

empty so also not supported. By chance, Elrepo has this packaged as rpm :

  • http://elrepo.reloumirrors.net/elrepo/el8/x86_64/RPMS/kmod-mpt3sas-28.100.00.00-3.el8_2.elrepo.x86_64.rpm
  • http://elrepo.reloumirrors.net/elrepo/el8/x86_64/RPMS/kmod-be2net-12.0.0.0-5.el8_2.elrepo.x86_64.rpm

Of course we can also use a DuD as Elrepo already provides such .iso images.

In our case though, we have to do things differently, as we need two kmods and also no way to fetch it through network ( Obviously, as we need first nic kernel module/driver ) ...

So here was my idea :

  • build a DuD .iso that has both kmods/kernel modules
  • inject that .iso inside the initrd.img (as we need kernel module loaded before we can reach network for stage2 and no way to grab network driver through network obviously)

Let's go back on the CentOS 7 node that needs to be reinstalled with CentOS 8 :

# yum install -y genisoimage createrepo_c
# cd $(mktemp -d)
# mkdir -p {./dd/rpms/x86_64/,./dd/src}
# echo -e "Driver Update Disk version 3\c" > ./dd/rhdd3
# pushd dd/rpms/x86_64/
# wget http://elrepo.reloumirrors.net/elrepo/el8/x86_64/RPMS/{kmod-mpt3sas-28.100.00.00-3.el8_2.elrepo.x86_64.rpm,kmod-be2net-12.0.0.0-5.el8_2.elrepo.x86_64.rpm}
# createrepo_c ./
# popd
# pushd dd/src
# wget http://elrepo.reloumirrors.net/elrepo/el8/SRPMS/{kmod-be2net-12.0.0.0-5.el8_2.elrepo.src.rpm,kmod-mpt3sas-28.100.00.00-3.el8_2.elrepo.src.rpm}
# popd
# mkisofs -quiet -lR -V OEMDRV -input-charset utf8 -o mpt3sas-be2net-kmod.iso ./dd

Now that we have mpt3sas-be2net-kmod.iso we can use it with inst.dd= .. but as we have no network, anaconda needs to find it early in the process. So let's inject it into initrd.img ( you can do the same with kickstart )

Let's retrieve vmlinuz and initrd.img to remotely kick a CentOS 8 reinstall on itself (node is actually running CentOS 7)

# pushd /boot
# mirror_url="http://mirror.centos.org/centos/8/"
# curl --location --fail ${mirror_url}/BaseOS/x86_64/os/images/pxeboot/initrd.img > initrd.img.install
# curl --location --fail ${mirror_url}/BaseOS/x86_64/os/images/pxeboot/vmlinuz > vmlinuz.install
# popd
# echo mpt3sas-be2net-kmod.iso |cpio -c -o >> /boot/initrd.img.install 
2005 blocks

Now that we have injected .iso into initrd.img, we can reference it for anaconda/install process as /<name>.iso. Let's then just use kexec (usual) to remotely launch the install and use also VNC to see if everything is working : network should respond and be configured, and then we'll be able to see storage too.

# pushd /boot
# yum install -y kexec-tools
# kexec -l vmlinuz.install --append="net.ifnames=0 biosdevname=0 ksdevice=eth2 inst.repo=http://mirror.centos.org/centos/8/BaseOS/x86_64/os/ inst.lang=en_GB inst.keymap=be-latin1 inst.dd=/mpt3sas-be2net-kmod.iso inst.vnc inst.vncpassword=DuDTest ip=172.22.0.16 netmask=255.255.254.0 gateway=172.22.1.254 nameserver=172.22.0.1 hostname=test.ci.centos.org pcie_aspm=off" --initrd=initrd.img.install && kexec -e

From that point it is like described in the previous link about kexec and kick a reinstall : kernel boots, loads initrd.img (but this time we see the DuD iso image being loaded and then it starts anaconda as usual. We can from there connect over vnc to finish the install (we have network and hba kernel module loaded and able to configure hardware)

Once machine is installed and rebooted, we can just ssh into it and clearly we can see that both rpm/kmods were installed ok (otherwise, no network nor storage and of course no install :) )

# modinfo mpt3sas|egrep 'filename|signer'
filename:       /lib/modules/4.18.0-193.14.2.el8_2.x86_64/weak-updates/mpt3sas/mpt3sas.ko
signer:         ELRepo.org Secure Boot Key
# modinfo be2net|egrep 'filename|signer'
filename:       /lib/modules/4.18.0-193.14.2.el8_2.x86_64/weak-updates/be2net/be2net.ko
signer:         ELRepo.org Secure Boot Key
# rpm -qa|grep elrepo
kmod-be2net-12.0.0.0-5.el8_2.elrepo.x86_64
kmod-mpt3sas-28.100.00.00-3.el8_2.elrepo.x86_64
# yum installl -y elrepo-release

Of course, as shown above, don't forget to also install elrepo-release pkg, to then access newer kmods when needed, in case of a rebase between major.minor releases.

Hope you found that useful in case you need to upgrade working hardware but with deprecated drivers in the CentOS 8 kernel.

...



๐Ÿ“Œ Fabian Arrotin: Remotely reinstalling a node on CentOS 8 with DuD (Driver Disk Update / kernel module for nic/hba)


๐Ÿ“ˆ 199.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Remotely kicking a CentOS install through ligthweight 1Mb iso image


๐Ÿ“ˆ 64.66 Punkte

๐Ÿ“Œ Fabian Arrotin: Using CentOS 7 armhfp VM on CentOS 7 aarch64


๐Ÿ“ˆ 62.11 Punkte

๐Ÿ“Œ Fabian Arrotin: Using newer PHP stack (built and distributed by CentOS) on CentOS 7


๐Ÿ“ˆ 62.11 Punkte

๐Ÿ“Œ Fabian Arrotin: Using CentOS 7 armhfp VM on CentOS 7 aarch64


๐Ÿ“ˆ 62.11 Punkte

๐Ÿ“Œ Fabian Arrotin: Using CentOS 7 armhfp VM on CentOS 7 aarch64


๐Ÿ“ˆ 62.11 Punkte

๐Ÿ“Œ Fabian Arrotin: Deploying Openstack through puppet on CentOS 7 - a Journey


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Music recording on CentOS 7 DAW


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Fixing heat/fan issue on Thinkpad t490s running CentOS 8/Stream


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Fixing heat/fan issue on Thinkpad t490s running CentOS 8/Stream


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Deploying Openstack PoC on CentOS with linux bridge


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Enabling SPF record for centos.org


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Zabbix, selinux and CentOS 7.3.1611


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Using Ansible Openstack modules on CentOS 7


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Lightweigth CentOS 7 i686 desktop on older machine


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Using a RaspberryPI3 as Unifi AP controller with CentOS 7


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Diagnosing nf_conntrack/nf_conntrack_count issues on CentOS mirrorlist nodes


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Updated mirrorlist code in the CentOS Infra


๐Ÿ“ˆ 52.48 Punkte

๐Ÿ“Œ Fabian Arrotin: Implementing Zabbix custom LLD rules with Ansible


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Deploying OpenShift 4 on bare-metal and disabling dhcp


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Using NFS for OpenStack (glance,nova) with selinux


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Linking Foreman with Zabbix through MQTT


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Renew/Extend Puppet CA/puppetmasterd certs


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Deploying OpenShift in KVM/libvirt guests


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ Fabian Arrotin: Using connection delegation with mitogen for Ansible


๐Ÿ“ˆ 42.85 Punkte

๐Ÿ“Œ CentOS Blog: CentOS 8 and CentOS Stream updates, and feeds.centos.org


๐Ÿ“ˆ 38.53 Punkte

๐Ÿ“Œ CentOS Blog: Update: State of CentOS Linux 8, and CentOS Stream


๐Ÿ“ˆ 31.42 Punkte

๐Ÿ“Œ How to Install Spaceview Disk Space Analyzer (Disk Utility) in Ubuntu โ€“ A Best Disk Usage Indicator for Linux


๐Ÿ“ˆ 30.41 Punkte

๐Ÿ“Œ Full Tutorial : How to Clone a Smaller Boot Disk onto a Larger Disk for Free with Clonezilla & Delete Disk Partition


๐Ÿ“ˆ 30.41 Punkte

๐Ÿ“Œ Gigabit 4 Port NIC with Intel I350 Chip, 1Gb Netzwerkkarte Compare to Intel I350-T4 NIC ...


๐Ÿ“ˆ 29.66 Punkte

๐Ÿ“Œ Broadcom 9400 Tri-Mode HBA: Adapterkarte fรผr SAS/SATA und PCIe-NVMe


๐Ÿ“ˆ 29.12 Punkte

๐Ÿ“Œ QEMU SCSI MegaRAID SAS HBA Emulation megasas_ctrl_get_info memory corruption


๐Ÿ“ˆ 29.12 Punkte

๐Ÿ“Œ Beschleunigt รผber 2000 SAS-Gerรคte mit nur 7 Watt: der HBA ExpressSAS H1280 GT von Starline ...


๐Ÿ“ˆ 29.12 Punkte

๐Ÿ“Œ RAID-Controller als HBA betreiben


๐Ÿ“ˆ 29.12 Punkte











matomo