I was updating Ubuntu 16.04, and it hung at:
Setting up grub2-common (2.02~beta2-36ubuntu3.17) ... Setting up grub-efi-amd64-bin (2.02~beta2-36ubuntu3.17) ... Setting up grub-efi-amd64 (2.02~beta2-36ubuntu3.17) ... Installing for x86_64-efi platform.
I now know this was probably stupid, but I switched the machine off after a while, and Ubuntu no longer boots properly. In the grub prompt I located the relevant files and ran:
root=(hd0,gpt2) linux /vmlinuz-4.10.0-33-generic initrd /initrd.img-4.10.0-33-generic boot
and then it boots in grub, up until "Please unlock disk sda3_crypt:"
I have tried the usual passphrase, and every combination I can think of but it won't unlock - "cryptosetup failed".
I recall an issue with the keyboard layout swapping two of the characters round when I first made the passphrase, so I wonder if it is something to do with this? It seems the boot is working, but is it possible to restore the GUI version of this unlock prompt? I thought that might help to enter the correct passphrase if it's something to do with the keyboard layout.
I have since then also booted a live CD and used boot-repair, but that did not restore the GUI.
OK, update: I used crytosetup -v luksOpen /dev/sda3 sda3_crypt, from the >initramfs prompt that was left after it failed to decrypt/boot - it appears it is in US keyboard layout as suspected, I entered the passphrase by pressing the keys that would be the correct passphrase in US layout (instead of UK keyboard), and it says Key slot 0 unlocked, which I guess is progress? It just hangs here however.
Success! I think... Rebooted, and entered using the altered key combination, and it now decrypts - I think the above just gave me more chances to try out passphrases, which was the aim as I was fed up of rebooting - it then said, welcome to emergency mode.. I wasn't sure what that was and after a bit of faffing around (update-grub, grub-install etc. did not work), I rebooted and input "normal" instead of "boot" in grub and now I am in ubuntu full GUI. However boot is still broken, so how to fix - perhaps might have to leave this one until tomorrow, but seems like some success, any input on where to go from here would be much appreciated as I can only boot through grub at the moment (tried update-grub through ubuntu GUI, no errors, but didn't fix it).