I am facing a boot issue with a Rocky Linux 9 virtual machine running on VMware Workstation.
During maintenance, I attempted to expand the root ( / ) partition, which is configured using LVM. Unfortunately, the resize operation was performed incorrectly. After rebooting, the virtual machine no longer boots normally and instead enters Dracut Emergency Mode.
Current Symptoms:
The system boots directly into dracut emergency shell.
Common LVM utilities such as lsblk, pvs, vgs, and lvs return “command not found”.
When checking /dev/mapper using
ls -la /dev /mapper. only rl-swap is present
the lvm rl-root is missing ,which prevents the system from mounting the root filesystem.
As a result, the operating system cannot continue the boot process.
I need help to
reactivate or recover the missing rl-root and restor access filesystem .
Try booting into Rocky CD and choose something like “Rescue Rocky Linux” and then choose 3) for regular shell. There you will have all the LVM utilities and access to the devices.
The volume groups will probably be deactivated, so you might need to activate them with vgchange –-devices <PV> -ay <VG>. From there you can try repairing the lvms or the file system. You did not specify what exactly went wrong. Could you elaborate on this?
There is the utility called vgcfgrestore which allows you to restore backed up lvm configuration. By default lvm backs up the configuration under /etc/lvm/backup on every change like lvresize etc. It may be useful if you should somehow be able to access it (I assume it is on your broken root partition).