Linux – Missing root VG, dropped to an initramfs shell

bootinitramfslinux-mintlvm

My Linux Mint 17.1 (64-bit) uses LVM on its OS drive (an SSD). I must have done "something" to wreck my system, because last time I rebooted, the boot failed. Instead, I got the message "Alert! /dev/mapper/mint–vg-root does not exist. Dropping to a shell!" and an initramfs shell. I've no idea how to continue.

I'm usually up to date with normal system updates, but don't use a custom kernel or anything like that. I also go for long periods without rebooting, so I've no idea whether this is a recent problem or just went undetected for want of rebooting.

I know neither grub nor initramfs, nor do I have any experience recovering from this sort of thing. Of course, I'm in urgent need of accessing my data!

Other posts say this may be caused by upgrading to a kernel with no lvm2 support, and say it can be fixed with this or that Live DVD. The thing is, I can no longer boot from USB or DVD, because I still just end up on this screen.

My next step is to disconnect the SSD to see if I can then boot from other media, but that's not really a solution.

Assuming I figure out how to boot from media, what can I do? What more do I need to tell you about my situation?

screen shot

Update:

"lvm lvs" and "lvm pvs" says the following. I don't know how this output is supposed to look when everything works. Does this mean they're all in a similar (bad) state, or what?

enter image description here

I have one SSD with two LV's for root and swap, and another LV based on two PV's on each of two separate drives. The number and naming of LV's and VG's is as I expected.

However, I don't know how to read the other columns. It appears that all volumes are in similar state (either all good or all bad), but I may be wrong.

"fdisk -l" is not available on my initramfs shell, but I figured out booting from media, so this is the output of that command (after mounting the volume) when run from a LinuxMint 17.1 Live USB (which is the same as the current OS):

$ fdisk -l
$ fdisk -l /media/mint/verylonguuidstring
last_lba(): I don't know how to handle files with mode 40755
$ fdisk -v
fdisk (util-linux 2.20.1)
$

Hmm, not much of a result. Here is the result from a Live CD named REDO Backup & Restore which I use on occasion. This gives much better results, or at least, actual output.

enter image description here

At least, all my disks can be mounted and seem to be intact, so it's just booting that's the problem.

Update!

I did a daring thing, which seems to have worked. Having booted on a different medium, I mounted the boot partition and modified /boot/grub/grub.cfg. In that file, the "offending" identifier "/dev/mapper/mint–vg-root" appeared a number of times. I changed all of them to "/dev/mapper/ssd_vg-root_lv", saved, and rebooted. And lo! It works, I can now boot my normal OS to my usual desktop. Phew!

Only, the GRUB selection screen remained waiting for 10 seconds, but I managed to turn down the "TIMEOUT" setting in "/etc/default/grub".

@Bratchley, @nkms, I'm very grateful for your support!

Best Answer

Make sure your "/boot/grub/grub.cfg" lists the correct VG and LV. In my case, the VG is named "ssd_vg" and the LV is named "root_lv", so the grub.cfg file needs to reference "/dev/mapper/ssd_vg-root_lv" (note use of slashes and dashes!).

Related Question