Pegasi Wiki

This wiki acts as a memo for our own work so why not share them? Feel free to browse and use out notes and leave a note while at it.

Fix initramfs from broken update

Overview

I updated my CentOS 7 virtual guest and after boot it could not locate my partitions. I had actually 2 instances, an LVM guest and a non-LVM guest. LVM guest waited for a few minutes until it told me some errors about dracut. Non-LVM guest waited indefinitely for vda partition mount.

Solution

I booted the virtual instance with CentOS 7 ISO, selected rescue mode, let it mount existing system as read-write to /mnt/sysimage and chrooted to it.

While chrooted I rebuilt my initramfs with following command:

dracut -H -f /boot/initramfs-3.10.0-957.27.2.el7.x86_64 3.10.0-957.27.2.el7.x86_64 || dracut -fv --regenerate-all

Where 3.10.0-957.27.2.el7.x86_64 is the kernel version, which you must check before issuing the command.

After that just sync and reboot. You may need to reboot twice.

Comments

All comments and corrections are welcome.

 stars  from 2 votes

Leave a comment

anonymous, 2019/10/21 05:30
This worked thanks! It just rebuilt something in the boot and rebooted itself first.
Enter your comment:
F​ C S K Q
 

  //check if we are running within the DokuWiki environment if (!defined("DOKU_INC")){ die(); } //place the needed HTML source codes BELOW this line