Moving a boot disk RH8/Centos8

I ran into an issue where I had a usb ssd drive that I built Centos 8 upon. After I relocated it to the onboard controller I preceded to boot the system and wallah!

Warning: /dev/centos/root does not exist
Warning: /dev/centos/swap does not exist
Warning: /dev/mapper/centos-root does not exist

To no surprise I went right into dracut# prompt. So what happened? Well I configured it as an LVM disk so when I relocated it the drive was on a different controller hence the config changed. So now what?

  1. Boot into rescue mode
  2. List the initramfs images
ls -ltrh /boot/initramfs-*
  1. Locate the kernel version you’re using and create a backup of it:
cp -iv /boot/initramfs-4.18.0-193.el8.x86_64.img /boot/initramfs-4.18.0-193.el8.x86_64.img.<date>
  1. Rebuild the kernel image for that specific kernel
dracut -f
  1. Select the new kernel image
ls -ltrh /boot/initramfs-*
  1. Specify the new kernel version (For Example):
dracut -f /boot/initramfs-4.18.0-193.el8.x86_64.img 4.18.0-193.el8.x86_64
  1. Generate a GRUB2 configuration file and reboot

Thats it, thansk to: