0

No matter what i do I can't for the life of me install Grub2 on the USB stick i want to boot from it keeps installing itself to my internal SSD. I've tried manually partitioning according to 3 different tutorials, i've tried manually installing it on my usb with sudo grub-install /dev/sda (sda is my USB since the internal drive is labeled nvme not sda)

It just won't work. Strange thing is it even says that it installed the bootloader but it didn't, it's just using the bootloader installed to the nvme ssd.

I looked at the other forum posts but none of the solutions seem to work.I'm a pretty big noob when it comes to Linux, do i need to manually create an efi partition on the USBdisk? Does this EFI partition need to be at the front of the disk? I'm sorry if this is a stupid question but i'm really at a loss as to why it won't write a bootloader to my USBdisk..

  • 2
    You need to create ESP on external drive, if you want full install with its boot loader on the external drive. Ubuntu's Ubiquity seems to be only installer that installs to internal drive, no matter what you do. There are work arounds. Most suggest either physcially or logically in UEFI turning off internal drive. Some have removed boot/esp flag from internal drive before selecting install, but you must restore it, before rebooting. Posted work around to manually unmount & mount correct ESP during install #23 & #26 https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 – oldfred Jul 27 '20 at 20:34
  • 1
    Says SSD, but applies to any external drive or even sdb drive if internal & you want it separate. https://askubuntu.com/questions/1167910/unable-to-properly-boot-linux-from-external-ssd/1167940#1167940 – oldfred Jul 27 '20 at 20:37

1 Answers1

0

Bootable USB Template

Sudodus, the creator of mkusb has been kind enough to make a template for creating bootable ISO files.

https://phillw.net/isos/linux-tools/uefi-n-bios/dd_grub-boot-template-for-uefi-n-bios.img.xz

This template creates BIOS and EFI Boot partitions and installs GRUB. It leaves the rest of the disk open and ready for whatever you need booted.

The grub.cfg file is set up to boot ISO files but can be modified to boot anything GRUB2 will boot.

If you are using Windows and have 7zip installed, Rufus or Etcher will install this template directly, otherwise the .img file should be extracted from the .xz first.

If you are using Linux, mkusb will install the image without needing to extract the .img file first.

  • If created using Rufus/Etcher reinstall GRUB for BIOS boot:

    sudo mount /dev/sdx2 /mnt

    sudo grub-install --boot-directory=/mnt/boot /dev/sdx

C.S.Cameron
  • 19,519
  • An example of the templates use can be found at: https://askubuntu.com/questions/1217832/how-to-create-a-full-install-of-ubuntu-20-04-to-usb-device-step-by-step/1253989#1253989 – C.S.Cameron Jul 28 '20 at 04:41