1

I've installed LUbuntu on a system and it boots nicely in BIOS mode. Unfortunately I need to boot the system in EFI mode, so I booted the stick again. Made sure that it booted in EFI, mounted necessary partitions:

ls -al /sys/firmware | grep efi
drwxr-xr-x  5 root root 0 mar 12 12:19 efi
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

But when I run grub-install it cannot find 64 binaries:

sudo chroot /mnt
grub-install -v
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: Looking for /sys/firmware/efi ...
grub-install: info: ...found.
grub-install: info: ... but x86_64-efi platform not available.
grub-install: info: Looking for /proc/device-tree ...
grub-install: info: ... not found.
Installing for i386-pc platform.
-- ciach

And again system boots nicely in BIOS mode but nothing new appears on /mnt/boot/efi and grub does not work in EFI mode.

How to rectify the problem? Do I need to install some additional packages?

I am trying to install grub-efi package, but Aptitude informs me about the conflict:

# aptitude install grub-efi
The following NEW packages will be installed:
  grub-efi grub-efi-amd64{ab} grub-efi-amd64-bin{a} 
  grub-efi-amd64-signed{a} 
0 packages upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1222 kB of archives. After unpacking 12.3 MB will be used.
The following packages have unmet dependencies:
 grub-pc : Conflicts: grub-efi-amd64 but 2.04-1ubuntu26.9 is to be installed
 grub-efi-amd64 : Conflicts: grub-pc but 2.04-1ubuntu26.9 is installed
The following actions will resolve these dependencies:

     Remove the following packages:                   
1)     grub-gfxpayload-lists [0.7 (focal, now)]       
2)     grub-pc [2.04-1ubuntu26.9 (focal-updates, now)]

Accept this solution? [Y/n/q/?]

Please note that I do not want to loose the possibility to boot in BIOS mode.

In such case can I safely remove grub-pc?

3
  • 2
    Did you install grub-efi-amd64-bin?
    – Hermann
    Commented Mar 17, 2021 at 17:07
  • @Hermann please find the details abouve Commented Mar 17, 2021 at 17:23
  • @Hermann indeed grub-efi-amd64-bin does not conflict with the other packages! Thanks for info. Commented Mar 17, 2021 at 17:30

1 Answer 1

1

@Hermann found the solution. grub-efi-amd64-bin does not conflict with other packages:

aptitude install grub-efi-amd64-bin
The following NEW packages will be installed:
  grub-efi-amd64-bin grub-efi-amd64-signed{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1173 kB of archives. After unpacking 12.1 MB will be used.
Do you want to continue? [Y/n/?]
-- ciach
grub-instal -v /dev/sda
grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: Looking for /sys/firmware/efi ...
grub-install: info: ...found.
Installing for x86_64-efi platform.
-- ciach

and now by LUbuntu nicely boots in EFI mode.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .