Rescue Kernel

 

 

 


Remove rescue kernel

 

rm /boot/vmlinuz-0-rescue-*
rm /boot/initramfs-0-rescue-*
rm /boot/loader/entries/*-0-rescue.conf

 


建立 rescue kernel

 

 

# Centos 8

dracut

low-level tool for generating an initramfs/initrd image

dracut-config-rescue

This package provides the configuration to turn on the rescue initramfs generation with dracut.

The rescue image is automatically generated by dracut after a new kernel is installed,
 and this can be prevented by creating a file under /etc/dracut.conf.d/

/usr/lib/dracut/dracut.conf.d/02-rescue.conf
/usr/lib/kernel/install.d/51-dracut-rescue.install

echo 'dracut_rescue_image="no"' >> /etc/dracut.conf.d/local.conf

Re-generate initramfs and vmlinuz for Rescue Kernel

# dracut-config-rescue 提供此 script

/usr/lib/kernel/install.d/51-dracut-rescue.install  $(uname -r) /boot/vmlinuz-$(uname -r)

 


 

 

Creative Commons license icon Creative Commons license icon