2

I found few threads that explain how to reinstall grub2 by the mean of chroot but none of them explain how to proceed if my / is encrypted and if there is a plain /boot partition. Thing is I installed Debian in EFI mode and it made an unbootable entry (Japanese character) in the UEFI boot menu.

I tried to make a new entry using efibootmgr from Ubuntu liveUSB but it is still unbootable. I'd like to reinstall grub from Ubuntu liveUSB but I don't know to chroot the encrypted / partition and how the separate /boot partition blends in.

  • Given your configuration, you might want to try my rEFInd boot manager, which tends to handle multi-distribution configurations better than GRUB. Try downloading the USB flash drive or CD-R version to see if it will boot both Debian and Ubuntu. (You may need to add extra boot options to identify your root filesystem by pressing F2 or Delete twice to boot Ubuntu.) If it works, you can install the PPA from Ubuntu or the Debian package in either Debian or Ubuntu. – Rod Smith Jan 10 '16 at 15:16
0

Try this:

Boot from an Ubuntu Live USB with a working connection to the internet.

Open a Terminal window (Applications ---- Accessories ---- Terminal).

Type the following commands:

sudo -i
apt-get update
apt-get install cryptsetup lvm2
fdisk -l
cryptsetup luksOpen /dev/sda? TAG #sda? is your root partition
vgchange -ay
vgscan
vgchange -ay [VOLUME GROUP NAME]
lvscan
/dev/[VOLUME GROUP NAME]/[LOGICAL VOLUME NAME] /mnt
modprobe efivars
mount /dev/sda? /mnt/boot/efi #sda? is your efi partition
mount --bind /dev /mnt/dev 
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/
chroot /mnt
apt-get install --reinstall grub-efi-amd64
or
apt-get install --reinstall grub-efi
update-grub
umount /mnt
vgchange -an
cryptsetup luksClose TAG

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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