So I'm trying to install debian on a 64GB USB so i can move it anywhere. I've installed arch before and it worked great, but upgrading the system on a slow connection just for installing an app is deal breaking.
My problem is that i installed debian normally, then chrooted into it , installed both grub-pc for bios booting and then formatted the efi partition and installed efi manually with --removable flag, that should make booting possible from any pc, but it creates two efi entries and neither one of them is bootable. The bios - booting works.
Here's the efibootmgr output :
Boot0009* UEFI: SanDisk PciRoot(0x0)/Pci(0x1d,0x0)/USB(0,0)/USB(3,0)/HD(1,GPT,85231161-1ef9-47e4-9ed1-8050dfef85a6,0x800,0xb2c800)0000424f Boot000A* UEFI: SanDisk PciRoot(0x0)/Pci(0x1d,0x0)/USB(0,0)/USB(3,0)/HD(4,GPT,95891a20-98ac-4278-bdb7-db05d238a165,0xd0b800,0x8f000)0000424f
My partition layout:
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: BDC6AD14-48B9-48D3-B26E-95A84C9DDDAB Device Start End Sectors Size Type /dev/sdc1 2048 11718655 11716608 5.6G Microsoft basic data /dev/sdc2 11718656 11724799 6144 3M BIOS boot /dev/sdc3 11724800 13678591 1953792 954M Linux filesystem /dev/sdc4 13678592 14264319 585728 286M EFI System /dev/sdc5 14264320 120174591 105910272 50.5G Linux filesystem
To install grub i used :
# grub-install --target=i386-pc /dev/sdX --recheck # grub-install --target=x86_64-efi --efi-directory=esp --removable --recheck
PS: Yes i removed the previous efi boot entry with
efibootmgr -b num -B before formatting the esp.
efibootmgroutput indicates the firmware has recognized a filesystem the UEFI firmware can read on both partitions
\EFI\boot\bootx64.efiin place on either of them? Is Secure Boot enabled on your system? Newer systems with Secure Boot enabled tend to just ignore .efi files that aren't signed with a key the firmware is able to verify. If you were using an old version of installation media from before April 2021 or so, its version of GRUB may have been blacklisted by recent UEFI Secure Boot revocation list updates.
\EFI\boot\bootx64.efishould be case insensitive, some UEFI implementations have actually been found to be case sensitive.