0

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.

4
  • The efibootmgr output indicates the firmware has recognized a filesystem the UEFI firmware can read on both partitions sdc1 and sdc4. Is \EFI\boot\bootx64.efi in 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.
    – telcoM
    Dec 21, 2022 at 20:22
  • 1. No, I double checked that there's no other boot efi on sdc1...it is formated as a simple fat32 so i can transfer files between systems...I formated it 3 times.. Plus that grub refuses to install the efi files to a non efi system partition even if it's formated as fat 32, and the only ESP is sdc4 2.Secure boot is disabled, i even tried installing grub-efi from another pc. 3.I used the lates debian netinst Dec 21, 2022 at 20:37
  • What actually happens when you attempt to boot in UEFI mode? Will it just not show the USB media in boot menus? Will it show it, but then fail to even load GRUB? Or will it load successfully but fail to the GRUB command prompt? Although the UEFI specification says the removable media boot path \EFI\boot\bootx64.efi should be case insensitive, some UEFI implementations have actually been found to be case sensitive.
    – telcoM
    Dec 22, 2022 at 18:03
  • It doesn't even load grub Dec 23, 2022 at 16:13

1 Answer 1

0

I've found the solution... I have deleted the first partition, which was formatted as fat32 and reformated it to exfat, reinstalled grub and now somehow works

I think this is a bug because the first partition was marked as basic data, not efi so i don't know why it made the system unbootable..

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 23, 2022 at 19:03

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.