-1

So I'm totally new to linux. I don't want to install to my internal HDD. So I've been trying to install it independently on a usb so i can boot it on any pc (UEFI or BIOS).

So i created a live usb and formatted another usb where i want to put linux on. I go on the live linux, install linux to the empty usb and choose bootloader to install on my Usb. But when it's finished installing, i see grub traces on my internal hdd by efi partitions and stuff.

And i can't boot my usb to boot linux on a different pc.

I've been searching on google for two days straight!! I've seen quite some people asking this but i didn't understand the answer since I'm a beginner. I don't understand so much of linux at all so please answer detailed.

0

1 Answer 1

1

The Ubuntu install process (not grub-installer itself, which will write to a target) writes to the sda's EFI partition regardless of what you tell it. There have been several bugs filed on this, with other potentially worse issues like having the machine's native boot entry changed. See bugs 1173457, 1229488, ... and many more if you search. Add yourself to any bugs you feel affect you.

The solution is simple, just mount the USB's EFI partition and copy everything from the hard disk's EFI partition. Then, copy the Ubuntu bootloaders shimx64.efi and grubx64.efi from .../EFI/ubuntu to .../EFI/Boot/ and rename the .../EFI/.Boot/ shimx64.efi to bootx64.efi. That's the bootloader used for removable media. It still requires the grub.cfg file be in EFI/ubuntu, so leave it there. Remember, these are all just files on a FAT filesystem. You can copy and rename them from the Windows filemanager just as easily as from a Linux system.

Do back up your hard disk's EFI partition, using USB installs may change things. Know what the boot order is, since even that may be changed after a USB install.

1
  • Hey! Thank you very much for ur answer! It seems like this will work (i've seen related answers like this on the internet). The thing is I don't know so much about Linux. Would it be possible to write what i have to do step by step and where and how i can find/do it? I would very much appreciate it! Thanx!
    – Steve B
    Jun 9, 2016 at 15:42

You must log in to answer this question.

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