I have linux mint 19 installed on
/dev/sda5. Recently I connected an external drive and installed Ubuntu 18.04 LTS on that (
/dev/sdb2). After that, I could no longer boot my original Mint installation (except the external drive was present). It just went into the black grub screen with prompt.
My assumption was, that grub was newly installed on the external drive (which is expected, as I want that to be bootable on its own), and somehow the old grub installation then was forgotten. So I repaired grub, through use of a live cd and chroot method.
But now if I reconnect the external drive, I cannot choose to boot from that in BIOS boot selection.
It seems my two grub installations are somehow incompatible, but why and how can that be fixed?
Additional Info: Both disks have grub2 installed, both use EFI and gpt. I have one EFI partition on
sda and have another one on
sdb, as without EFI partition grub wouldn't install (and I did not want to reference the EFI partition on sda, as I want the Ubuntu to be able to boot on its own at other machines).
Update: I have found
/boot/efi/EFI/ubuntu present in my (repaired) Mint 19 installation (without external drive attached). There are no other folders in
/boot/efi/EFI I don't know if that means anything, as Mint 19 is based on Ubuntu, and there is no
/boot/efi/EFI/mint or similar directory there. The EFI partition on the external drive is completely empty as is the
/boot/efi folder on my ubuntu installation. I guess I will have to put some research into how to enforce the usage of the right EFI partition.
Just now I got an update of grub2, that gave an error when it tried to run
Installing for x86_64-efi platform. grub-install: error: cannot find EFI directory.
But the system does boot normally. There is no EFI partition mounted.
Ok, it seems there are general problems with installing EFI on anything else than the first partition (usually
/dev/sda), see eg here. The fstab on my external Ubuntu install has this line:
# /boot/efi was on /dev/sda1 during installation UUID=8A3D-B724 /boot/efi vfat umask=0077 0 1
That proves, that the installation ignored the option for EFI partition that I chose.