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.

7
  • The easy solution is to create a persistent live drive with Debian 10. See this link. – sudodus Dec 8 '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 8 '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 8 '19 at 19:47
  • @A.B not sure what creates it. – Daniel M. Dec 9 '19 at 7: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: drive.google.com/file/d/1Y8Rk9oULjALe6Q8QrfFfBoCuym5N9TmE/… – Daniel M. Dec 9 '19 at 8:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.