Bug 1218783

Summary: grub: Should Remove magic number header field check on aarch64
Product: [openSUSE] openSUSE Tumbleweed Reporter: W <bin456789>
Component: BootloaderAssignee: Bootloader Maintainers <bootloader-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: guillaume.gardet, mchang
Version: Current   
Target Milestone: ---   
Hardware: aarch64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description W 2024-01-13 13:52:13 UTC
I want to boot up alpine linux from openSUSE Tumbleweed aarch64 grub.efi but failed.

Files are:
https://download.opensuse.org/ports/aarch64/tumbleweed/repo/oss/EFI/BOOT/grub.efi
https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/aarch64/netboot/vmlinuz-virt
https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/aarch64/netboot/initramfs-virt

```
menuentry "alpine" {
    search --no-floppy --file --set=root /vmlinuz-virt
    linux /vmlinuz-virt alpine_repo=http://dl-cdn.alpinelinux.org/alpine/v3.19/main modloop=http://dl-cdn.alpinelinux.org/alpine/v3.19/releases/aarch64/netboot/modloop-virt
    initrd /initramfs-virt
}
```

grub shows:
```
error: ../../grub-core/loader/arm64/efi/linux.c:61:invalid magic number.
error: ../../grub-core/loader/arm64/efi/linux.c:302:you need to load the kernel
first.

Press any key to continue...
```

Reference:
The magic number header field check on aarch64 has remove on grub 2.12.
I think openSUSE should follow up.
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=69edb31205602c29293a8c6e67363bba2a4a1e66
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=067bd35cd420034a068f5951947e6470533d1d48
Comment 1 Michael Chang 2024-01-29 08:16:45 UTC
Hello,

The patch removing the magic number check has been submitted to openSUSE:Factory and will be released in a few days.

https://build.opensuse.org/request/show/1142178

It has also been verified by the alpine kernel and initrd link in the Description.

Set the resolution to fixed, feel free to reopen if it doesn't work after updating to the released package.