0

I currently have Debian installed on my external USB pen drive (SanDisk Ultra Flair 64GB). I take this drive around with me and use it as a portable OS on many different UEFI computers (particularly public ones). The problem I am facing is that, every time I boot it on a computer, it automatically creates a system bootorder entry. I do not want this entry to be created for many reasons. My question is, is it possible to prevent this entry from being created every time I boot it?

For clarification: This is a full OS installed on the pen drive, not a live installation medium. It boots via UEFI directly from the drive when I specify in the boot menu to boot from it (i.e: bootx64.efi). It creates the unwanted "debian" entry in the UEFI boot menu. I want to prevent it from creating this entry.

This is what the bootorder looks like before booting (I select the SanDisk Ultra Flair Option):

Windows Boot Manager
EMMC: Internal Drive
USB: SanDisk Ultra Flair
EFI Internal Shell

And this is what it looks like after booting:

debian
Windows Boot Manager
EMMC: Internal Drive
USB: SanDisk Ultra Flair
EFI Internal Shell

If (and only if) this is not possible for whatever reason, could I instead manually delete the entry from inside the OS?

EDIT: After doing some tests, I concluded that in fact it does not create the entry on the other computers, which is what I expect, however it still creates it on mine, which I don't want either.

Daniel M.
  • 287
  • 4
  • 13
  • The easy solution is to create a persistent live drive with Debian 10. See [this link](https://unix.stackexchange.com/questions/118965/how-to-create-a-debian-live-usb-with-persistence/538571#538571). – sudodus Dec 08 '19 at 19:23
  • are you sure it's created by Debian, and not directly by the UEFI boot menu? I'd expect Debian to update such menu only when for example installing a newer version of the GRUB related packages. – A.B Dec 08 '19 at 19:36
  • Do you then have a /EFI/debian folder in the ESP? With Ubuntu you have to have the /EFI/ubuntu on external drive as the version of shim renamed to bootx64.efi wants to find files in EFI/ubuntu. Not sure if Debian is the same way or not. You could rename that folder, and see if system still boots. If not you cannot change it. If you can change it you could back it up and remove it, so UEFI cannot see it in ESP. – oldfred Dec 08 '19 at 19:47
  • @A.B not sure what creates it. – Daniel M. Dec 09 '19 at 07:51
  • @oldfred Does this screenshot help - I plugged in the USB drive to my other computer, mounted both the rootfs and ESP, and examined it with `ls`: https://drive.google.com/file/d/1Y8Rk9oULjALe6Q8QrfFfBoCuym5N9TmE/view?usp=sharing – Daniel M. Dec 09 '19 at 08:04
  • No. It is whether Debian has a total stand alone /EFI/Boot/bootx64.efi once installed or if that file also needs addition files in /EFI/debian. Only if totally stand alone could you then delete the other folders & UEFI would have nothing to find. rename /EFI/debian to something else and see if it boots. If not you have to change back. – oldfred Dec 09 '19 at 13:25
  • After doing some tests I concluded that it does in fact not create the entry on other computers, as expected, however it still creates it on mine, which it shouldn't. – Daniel M. Jan 31 '20 at 07:40

0 Answers0