[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can't install Debian to CF card in SATA adapter



On Sun, Jan 22, 2023 at 12:45:12PM +0100, Thomas Schmitt wrote:
> Hi,
> 
> Mike wrote:
> > booting to the EFI Shell, I
> > can access the EFI parition, cd to EFI/debian and manaully call
> > shimx64.efi, giving the following output:
> >
> > Reloc 0 block size 0 is invalid
> > Relocation failed: Unsupported
> 
> The web has remarkably few info on that problem.
> The best i found is
>   https://www.mail-archive.com/edk2-devel@lists.01.org/msg39858.html
>   "These messages are printed by the "shim" UEFI application:
>     https://github.com/rhboot/shim/blob/master/shim.c
>     probably when it attempts to load "grub"."
> leading to
>   https://github.com/rhboot/shim/commit/956717e2b375d7c7f0faafec8f12a7692708eb9awhich meanwhile wandered from shim.c to pe.c, line 108:
>   https://github.com/rhboot/shim/blob/17f02339ed1be9e90738603fe3c95ae7dc300061/pe.c
> The function is named "relocate_coff". The web explains in detail what
> COFF is and what relocation means in that context.
> 
> All in all i get the impression that shimx64.efi complains about grubx64.efi
> being a bad binary.
> (Next i would try to compare that grubx64.efi with a grubx64.efi that is
> known to work.)
>

Hi Thomas,

Thanks for taking the time to look into this.

I too found details on Google to be somewhat lacking.  I had assumed the
error was with loading the shim, so you're feedback gives something to
think about.  I have checked the sha512 of the shim  and believe it to be
working (By believe, I mean it's a running server but apt-get may have
replaced stuff since it last rebooted) and it appears to be the same.
The grub efi is different.  I have tried copying the grub efi from the
known working system but this did not help.

I don't think that it's a bad grub binary, as I have reinstalled several
times, with the same result.  I have tried installing with EFI and /boot
on a 6TB HDD and that worked fine, as did a 120GB SSD.  I had failures,
with the aforementioned error using a 256MB, 1GB and 2GB CF card in a
SATA adapter, as well as when using a 8GB USB flash drive in the
on-board USB port.

I'm a bit perplexed as to the difference between a SATA > CF adapter and
any other drive.  I thought one would send instructions along the lines
of "give me block x" and receieve "<block of data>".  Surely the host
would not be able to tell a difference.  I was equally perplexed that I
got the exact same error when using a USB drive.

Regards,
Mike.

Attachment: signature.asc
Description: PGP signature


Reply to: