I have installed LUbuntu using LVM on a machine can only boot using EFI. It already had /dev/sda1 as EFI partition. LUbuntu installer used the rest HDD to create LVM Physical Volume with one single root Logical Volume and no other LVs and for some reasons did not install any bootmanger on EFI partition. Not sure what went wrong.
Thus I ended up with unbootable system.
To rectify the problem I booted the USB stick with LUbuntu Checked if it really boots in EFI mode:
$ ls -al /sys/firmware | grep efi drwxr-xr-x 5 root root 0 mar 12 12:19 efi
as suggested in the answers here:
and used this procedure:
i.e. and run the following commands:
sudo mount /dev/sda2 /mnt sudo mount /dev/sda1 /mnt/boot/efi for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done sudo chroot /mnt grub-install /dev/sda update-grub
The problem is that afterwards LUbuntu does not boot in UEFI mode. It can boot in BIOS mode and standard Grub menu appears, however other OS requires UEFI boot as well as certain customisation options do not work.
When I actually check
/mnt/boot/efi nothing new there. No changes. Aparrently
grub-install does not copy necessary files to EFI partition.
Where's the problem?
I understand the commands up until grub-install, however I am not familiar with grub2 enough to really understand what are the related config files and how exactly grub takes all the components to boot in EFI + LVM mode.
Could you please also let me know how I can add to grub menu another OS sitting idle on another primary partition.
It used to boot via EFI and its boot cfg still is saved on EFI partition.