1

I know that there are plenty of topics already and I've tried to follow them, but I'm still stuck and can't install the GRUB. I've tried to follow the steps from the accepted answer in this post.

I have the following partitions:

  • /dev/mmcblk1p1 - EFI Syste Partition fat32 512mb
  • /dev/mmcblk1p2 - ext4 26.68GB
  • /dev/mmcblk1p3 - linux-swap 1.94GB

I executed these commands:

$ sudo mount /dev/mmcblk1p2 /mnt
$ sudo mount /dev/mmcblk1p1 /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/mmcblk1
$ update-grub  

But I am getting the following errors:

grub-install: warning: this GPT partition label contains no BIOS Boot
Partition; embedding won't be possible. grub-install: warning:
Embedding is not possible. GRUB can only be installed in this setup by
using blocklists. However, blocklists are UNRELIABLE and their use is
discouraged.. grub-install: error: will not proceed with blocklists.

These are the boot options from BIOS: enter image description here

  • ubuntu is in legacy mode. you need grub-efi installed – ravery Mar 06 '18 at 08:17
  • @ravery can you please a bit more specific? I did install grub-efi package but what to do next? – Dmitrij Kultasev Mar 06 '18 at 08:29
  • You booted your live-session in legacy-mode. Boot your live-session in UEFI-mode and retry. – mook765 Mar 06 '18 at 08:37
  • @mook765 is it done in BIOS? I have no such option when I just boot from my USB drive. I have "try ubuntu without installing", "install ubuntu", "oem install", "check disc for defects" – Dmitrij Kultasev Mar 06 '18 at 08:44
  • @DmitrijKultasev Yes, you have to make the right choice in your bios-boot-menu. Check your bios-options if UEFI-boot-mode is enabled. – mook765 Mar 06 '18 at 09:30
  • @mook765 I've updated the question. What do I need to do there? – Dmitrij Kultasev Mar 06 '18 at 09:53
  • @DmitrijKultasev Looks like you have to choose UEFI: KingstonDataTraveller to boot in UEFI-mode from your USB-stick. – mook765 Mar 06 '18 at 11:51
  • @mook765 it is the USB drive where I have ubuntu ISO image. I choosed it and installed ubuntu and then stuck with grub as described in the question – Dmitrij Kultasev Mar 06 '18 at 11:58
  • @DmitrijKultasev Strange, your output indicates legacy-mode. You could stick with legacy-mode, but you would have to create a small (1MB) BIOS-boot-partition if you keep GPT-partition-table or you change to MBR-partitioning and reinstall. – mook765 Mar 06 '18 at 12:34

1 Answers1

0

I assume, you have a legacy BIOS disk image. and you try to replicate to other computer with UEFI. from all the steps you've done. watch this part! sudo mount /dev/mmcblk1p1 /mnt/boot/efi before doing that, of course you have to sudo mkdir /mnt/boot/efi

sudo chroot /mnt after this, of course you have to sudo apt install -y grub-efi or sudo apt install -y grub-efi-amd64-signed

grub-install /dev/mmcblk1 don't forget to add --target=x86_64-efi or --target=i386-pc and --force and --removable (this is because you want it on removable device, right?).

It may look like this: grub-install --target=x86_64-efi --force --removable /dev/mmcblk1 or grub-install --target=i386-pc --force --removable /dev/mmcblk1

Artur Meinild
  • 26,018