Recreate initramfs with realtek.ko for kernel 5.4.x

 

Recreate initramfs with realtek.ko for kernel 5.4.x

 

1. Edit dracut.conf

# mcedit /etc/dracut.conf


add_drivers+="realtek r8169"
 

2. Backup initramfs

# cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.$(date +%m-%d-%H%M%S).bak

3. Rebuild initramfs with multipath

>CentOS/RHEL 6

# dracut -v -f -a multipath --include /etc/multipath /etc/multipath

>CentOS/RHEL 7

# dracut --force --add multipath --include /etc/multipath

4. Verify

# ls -lrt /boot/initramfs-$(uname -r).img

5.  Check if realtek is included

# lsinitrd /boot/initramfs-5.4.17-2102.202.5.el7uek.x86_64.img |grep realtek

-rw-r--r--   1 root root 33784 May 23 08:24 usr/lib/modules/5.4.17-2102.202.5.el7uek.x86_64/kernel/drivers/net/ethernet/realtek/r8169.ko.xz
-rw-r--r--   1 root root   4732 May 23 08:24 usr/lib/modules/5.4.17-2102.202.5.el7uek.x86_64/kernel/drivers/net/phy/realtek.ko.xz

 6. Reboot

# reboot

Comments

Popular posts from this blog

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

Reduce (shrink) and resize raw disk at Proxmox

How to clean DB from old logs in Magento 1.x