When I boot up I get a screen saying:

Gave up waiting for root device

Then it lists common problems:

ALERT! /dev/mapper/ubuntu--vg-root does npt exist. Dropping to a shell!

Then I get an initramfs prompt.

Is this fixable without a backup?

I can't remember exactly what I did to make this stop working...

(My hard disk is NOT encrypted.)

share|improve this question

Try a temporary workaround

In initramfs prompt type:

vgchange -ay

Sample output:

logical volume(s) in volume group "vg1000" now active

Followed by:

exit

If you have a LVM snapshot of root partition, that's a bug #360237. I solve this issue removing/deleting that snapshot.

If not your case, try fix doing this.

Another related bugs: #1396213, #29858, #1163406

share|improve this answer
1  
This saved me after 2 days logged out of my machine in initramfs with a similar error. Can someone explain what vgchange -ay actually does? and why it worked? thank you. – Massagran Sep 8 '15 at 19:55
    
vgchange -ay in the (initramfs) prompt returns /bin/sh: vgchange: not found for me :( – knocte Oct 2 '16 at 10:17

Ubuntu's LVM autodetect didn't work at all for me either. To fix it, I made a script in

/etc/initramfs-tools/scripts/local-top/forcelvm

with the following contents:

#!/bin/sh
PREREQ=""
prereqs()
{
   echo "$PREREQ"
}
case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac
. /scripts/functions
# Begin real processing below this line

# This was necessary because ubuntu's LVM autodetect is completely broken. This
# is the only line they needed in their script. It makes no sense.
# How was this so hard for you to do, Ubuntu?!?!?
lvm vgchange -ay

Then did

# chmod +x `/etc/initramfs-tools/scripts/local-top/forcelvm`

for good measure and

# update-initramfs -u -k all

That fixed everything, while persisting after a system update.

share|improve this answer
  1. Backup

    /usr/share/initramfs-tools/scripts/local-top/lvm2
    
  2. Edit

    /usr/share/initramfs-tools/scripts/local-top/lvm2
    
  3. Between modprobe -q dm-mod and activate_vg "$ROOT" add this line to initialize your lvm:

    lvm vgchange -ayactivate_vg "$ROOT"
    
  4. Rebuild your initramfs:

    sudo update-initramfs -u
    
  5. Rebuild your grub cfg:

     sudo update-grub
    

Enjoy! :-)

share|improve this answer
    
what if /usr/share/initramfs-tools doesn't exist for me? – knocte Oct 2 '16 at 10:18
    
That's a terrible idea. Make your changes in /etc/initramfs-tools/scripts for them to persist between system updates. – enigmaticPhysicist Oct 8 '16 at 16:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.