grub-devel
[Top][All Lists]
Advanced

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

Re: UEFI Secureboot not succeeding with Grub 2.06 and later version


From: Daniel Kiper
Subject: Re: UEFI Secureboot not succeeding with Grub 2.06 and later version
Date: Thu, 8 Jul 2021 15:27:54 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Jul 08, 2021 at 07:04:46AM +0000, Sayanta Pattanayak wrote:
> Hi Daniel,
>
> Thanks for your reply and hope you had a great vacation.

Yeah, I had nice time.

> We use Upstream 2.06 tagged version. Mentioning below the Build Commands and 
> Console Output.

Thanks! Please look below.

[...]

> kern/disk.c:196: Opening `hd0,gpt2'...
> disk/efi/efidisk.c:482: opening hd0
> disk/efi/efidisk.c:511: m = 0xfe6e8dc0, last block = 6efff, block size = 200, 
> io align = 0
> disk/efi/efidisk.c:531: opening hd0 succeeded
> partmap/gpt.c:93: Read a valid GPT header
> partmap/gpt.c:115: GPT entry 0: start=2048, length=40959
> partmap/gpt.c:115: GPT entry 1: start=43008, length=409599
> kern/fs.c:56: Detecting ext2...
> kern/verifiers.c:88: file: /Image type: 3

If you use LoadImage() interface this should not happen.

I think the following code in grub-core/loader/arm64/linux.c is a culprit:

  285 static grub_err_t
  286 grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
  287                 int argc, char *argv[])
  288 {
  289   grub_file_t file = 0;
  290   struct linux_arch_kernel_header lh;
  291   grub_err_t err;
  292
  293   grub_dl_ref (my_mod);
  294
  295   if (argc == 0)
  296     {
  297       grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected"));
  298       goto fail;
  299     }
  300
  301   file = grub_file_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
This ---------------------------------> ^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can do test and replace GRUB_FILE_TYPE_LINUX_KERNEL with 
GRUB_FILE_TYPE_NONE.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]