Wednesday, July 7, 2021

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

No comments:

Post a Comment

Cybermap

Internet Storm Center Infocon Status

Internet Storm Center Infocon Status
Internet Storm Center Infocon Status