2

I made a mistake and deleted the contents of my /boot directory, including GRUB (btw this is easy to do, there is no notice that it will make your system unbootable)!

I was going to try to re-copy GRUB into the directory before I rebooted but I forgot, and rebooted, and, no surprise, it wouldn't boot. I have an encrypted filesystem, and an encrypted home directory.

Now on a liveUSB, trying all kinds of forum advice (without posting myself)....no luck. I have managed to mount my encrypted drive (yay), but the boot-repair package and grub-repair both throw up errors. here is my pastebin: http://paste.ubuntu.com/14875709/

Has anyone run into this situation and can possibly help me?

fdisk:

Device       Start       End   Sectors  Size Type   
/dev/sda1     2048   1050623   1048576  512M BIOS boot   
/dev/sda2  1050624   1550335    499712  244M Linux filesystem   
/dev/sda3  1550336 976771071 975220736  465G Linux filesystem   
/dev/sdb1  *      128 3911679 3911552  1.9G  b W95 FAT32  

Tried the grub-install, update-grub sequence suggested below - it threw up a bunch of warnings of:

/run/lvm/lvmetad.socket: connect failed: No such file or directory  
WARNING: Failed to connect to lvmetad. Falling back to internal scanning.  

but seemed successful, with grub-install ending:

Installation finished. No error reported.  

and update-grub ending:

Adding boot menu entry for EFI firmware configuration  
done  

btw I should mention I also (previously) edited /etc/default/grub and added

GRUB_ENABLE_CRYPTODISK=y  

as that was suggested in a different forum - is that necessary?

Anyway upon reboot, it immediately asks for the encrypted disk passphrase, then seems to accept it, gives me a grub menu, then after going through most of the boot sequence gives me this error (may not be exact, I wrote it down):

drm:intel_pipe_config_compare error: mismatch in ips_enabled (expected 1, found 0)  

It sends me to a busybox emergency shell prompt with the suggestion that I cat /proc/cmdline because:

/dev/mapper/ubuntu--vgroot does not exist  

However, it does exist, I am able to mount it via liveCD, it is just encrypted. So I'm stuck again.

Update: I tried editing '/etc/lvm/lvm.conf' as advised, now when I reboot I get the grub menu, but then after selecting Ubuntu it goes to the emergency shell again with the same error:

drm:intel_pipe_config_compare [i915] ERROR mismatch in ips_enabled (expected 1, found 0)
  • Could you post the output of gdisk p q or fdisk p q if gdisk doesn't work? – ncomputers Feb 7 '16 at 5:55
1

Since you're talking about Ubuntu, I'm going to assume you use that.

To fix, do the following:

  • first, ensure you're working on the installed system, not the live system. A live image usually has its own root filesystem that makes reinstalling grub harder than it could be. Assuming you mount your installed root filesystem on /mnt, you can do this by running the following commands (all as root, so use sudo or something along those lines if needs be):

    mount -o bind /dev /mnt/dev
    mount -t process proc /mnt/proc
    mount -t sysfs sys /mnt/sys
    chroot /mnt
    

    This last command starts a shell inside your installed system. Run the next commands in that shell.

  • reinstall grub to the MBR: grub-install --boot-directory=/boot /dev/sda. This assumes your computer has only one harddisk, or that if it has more, it is set up to boot from sda. If that's not the case, adjust as appropriate.
  • regenerate the grub menu for good measure: update-grub.
  • now exit from that shell, and reboot.

Things should work again. If not, please update your question with some more details on how things fail.

Update: looks like things still fail due to update-grub wanting to talk to lvmetad, which runs in the host system, not the guest. The easiest way to fix that is to (temporarily) disable use of that daemon. To do so, edit /etc/lvm/lvm.conf, find the setting that says use_lvmetad = 1 and set it to 0. Then run update-initramfs -u -k all to regenerate the initramfs.

  • thanks - I updated with more info .....hope you or someone has more ideas! I am worried about the data on my encrypted volume :( – troff Feb 9 '16 at 5:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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