0

Similar to this question, but a bit different I think? How to remove Ubuntu from EFI partition

I've installed Ubuntu 18.04 on a 32GB usb stick, with its own EFI partition and swap partition on the stick.

However, when I plug it into a machine and boot Ubuntu off it, it decides to install its own bootloader or boot option to the on-board hard drive. I don't quite know the mechanism for this - when I start to boot from the USB drive, the first time some text comes up briefly on screen about failing to boot, then disappears; the second time it boots fine.

I've tried this on two separate Windows machines, neither of which have any other operating systems: 1. MBR-based 64 bit windows 7 desktop 2. UEFI 64 bit windows 10 laptop, with Secure Boot enabled

So far as I understand it, I should be able to install onto the USB stick with an EFI partition so that it doesn't need to do anything with the internal EFI partition at all - am I correct in this?

I explicitly want to make no changes to the internal hard disk, especially on the laptop, as it's a company laptop. I'm aware I can probably remove the bootloader entry from the internal EFI partition using efibootmgr or something, but it would be a faff to do that repeatedly.

Tl;dr: I have a USB Ubuntu 18.04 with an internal EFI partition. How do I use this without it editing the internal EFI partition or boot menu of the computer I boot it with? I explicitly want to avoid an appearance of a dual-boot prompt or internal GRUB2 installation

For info, install method was:

1) Formatted USB with Gparted with appropriate partion types & sizes

2) Disconnected all hard drives from my desktop

3) Plugged in Ubuntu 18.04 live usb stick and the USB I wanted to install to such that it was the only hard drive, with legacy compatibility switched off, and installed 18.04 onto it selecting efi, root and swap partitions as appropriate.

JazJ
  • 1
  • Do I understand correctly, you say that when you boot your USB it installs GRUB on the HD of your computers? – schrodingerscatcuriosity Aug 05 '19 at 12:38
  • Yes - at least, it seems to? Certainly when the USB isn't plugged in, I can go to a boot options menu and select 'Ubuntu' from it. I presume that this couldn't happen if Grub wasn't being installed on the internal drive - some persistent change has been made such that the internal boot system is aware that sometimes it has Ubuntu available.

    I don't know perfectly what change was made - I can go and look at the internal EFI using my Ubuntu install, I suspect, but I don't wanna mess with it as it's a work laptop. I know also that update-grub found and automatically updated the internal EFI.

    – JazJ Aug 05 '19 at 12:51
  • 1
    Booting a live system certainly shouldn't install GRUB by itself, and it would be impossible if you disconnected your HDs during the installation. There must be some piece of information missing here... – schrodingerscatcuriosity Aug 05 '19 at 14:00
  • Ah - to clarify it's a portable install, rather than a live image with a persistence file. And Grub wasn't installed on the HDD when I installed Ubuntu to the USB - as you say, it was disconnected. Grub seemed to be being installed to the HDD of any computer I plug the USB into when I try to boot from it, leaving behind an Ubuntu boot option after the usb was unplugged. – JazJ Aug 06 '19 at 16:46

0 Answers0