Ubuntu – Installing grub2 in efi-mode in usb flash drive


I've two different OS, which one is ubuntu. I'm using a PC, NOT a Mac. I use Chimera bootloader that don't find Ubuntu. So, i'd like to install grub 2 in EFI-mode on flash-drive USB. In this way, i can load Ubuntu only if the usb flash-drive is connected.

I followed this guide https://help.ubuntu.com/community/UEFIBooting replacing "/dev/sda" in

sudo efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "GRUB2" --loader "\\EFI\\grub\\grub.efi"

with the usb-pen directory. Then, i've copied the grub.cfg file that exists in Ubuntu partition.Result? Grub2 loads, but when i select the menu entries, grub2 doesn't find any command, or disks.
How can i fix this problem?

P.S. Here, there are the photo of the error(when i select ubuntu entry in grub2), the usb-drive's contents and the grub.cfg file http://paste.ubuntu.com/7283661/

Best Answer

  • I realize I'm a bit late in answering this, but I wanted to do something similar to your setup and ran into the same problem. I finally found a fix and wanted to share it.

    It looks like some sort of bug in grub-install. In your USB drive you have this:


    Simply make a copy of the folder thenameIgavetomygrub and all of its content (in your case it looks like you called it "grub") into the same EFI folder on the usb drive, and rename that copy as "ubuntu".

    Then it should work. At least it did for me.