Dracut recovery shell
If your system doesn't boot up normally you may find yourself in a dracut shell.
dracut is a low-level tool for generating an initramfs image
If the system can not find the device to boot to it may place you in the dracut shell.
You may not see the normal directories on the drive, such as boot. The ramdisk kernel was missing
important information.
However, the kernel configuration files will likely have the details needed so you will simply need
to create a new grub configuration file. However, the first command may not work, it
didn't on a Centos7 system that booted into dracut, but the second command did work and recovered the system.
First command to generate a new /boot/grub2/grub.cfg:
grub2-mkconfig -o /boot/grub2/grub.cfg
However, if /boot isn't visible then this command series may allow you to create a new initramfs, YMMV...
mv /boot/intramfs-version...img /boot/initramfs-version...img.bak
dracut -v /boot/initramfs-version.img
reboot
it didn't find boot, however the command for dracut seemed to take a while...
man pages:
dracut-cmdline
dracut
note the commands available:
|