OK, so you have two separate installations, fighting for the control of the single Master Boot Record (MBR).
You probably had installed the encrypted one last, and it overwrote the first installation's GRUB in the MBR. The encrypted installation knows about itself, and it can detect the other installation and include it automatically in the GRUB menu if the os-prober
package is installed.
Now, when you updated the GRUB on the un-encrypted installation, its update system went on to upgrade its GRUB... overwriting the one currently in the MBR.
Now, the update-grub
command of the un-encrypted installation cannot detect the encrypted installation, because it's encrypted... unless you unlock the encryption for it manually:
cryptsetup open /dev/<LUKS partition> <LUKS partition>_crypt --type luks
This should make the LUKS partition ready for mounting at /dev/mapper/<LUKS partition>_crypt
. Now update-grub
will be able to take a peek inside it and find the kernel & initramfs within.
But before that, you would need to enable disk encryption support in the GRUB of the un-encrypted installation:
echo "GRUB_ENABLE_CRYPTODISK=y" >>/etc/default/grub
update-grub
grub-install /dev/sda
(Enabling encryption support will make update-grub
check for encrypted disks and add some commands for handling them in /boot/grub/grub.cfg
, but it will also require the regeneration of the GRUB core image, so a reinstall of the GRUB component in MBR is required. The grub-install /dev/sda
command will do that.)
If I'm reading os-prober
's scripts correctly, unlocking the encryption before running update-grub
might allow it to auto-detect the second installation. If that's not the case, you might have to write a "custom" GRUB configuration entry for it in /etc/grub.d/40_custom
, which will be included into /boot/grub/grub.cfg
generated by update-grub
.