Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 924541

Summary: sys-apps/memtest86+-6.20-r1[boot,uefi64] does not produce /etc/grub.d/39_memtest86+ that adds memtest86+ to GRUB menus
Product: Gentoo Linux Reporter: Michał Dec <moog621>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: moog621
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: memtest's GRUB directives

Description Michał Dec 2024-02-14 10:31:08 UTC
When running `grub-mkconfig -o /boot/grub/grub.cfg`, I expect it to produce a GRUB config that includes the currently installed kernels and memtest as selectable items in the GRUB menu.

However, the file /etc/grub.d/39_memtest86+ is completely ill suited for such purpose. By studying the files produced by installing =sys-apps/memtest86+-6.20-r1[boot,uefi64], I can see that the main binary is installed in /boot/memtest86plus/memtest.efi64 as expected.

Therefore, the file /etc/grub.d/39_memtest86+ makes wrong assumptions at the start by looking for the realmode memtest binary (line 5) and knetbsd memtest binary (line 7).

Because of this, what ends up in /boot/grub/grub.cfg looks like this, when `grub-mkconfig` goes over this section:
```
### BEGIN /etc/grub.d/39_memtest86+ ###
### END /etc/grub.d/39_memtest86+ ###
```

So, installing with [boot,uefi64], should get us a GRUB directive that will correctly add memtest86's UEFI binary to the GRUB menu.

Reproducible: Always

Steps to Reproduce:
1. Have installed grub[grub_platforms_efi-64] and memtest86+[boot,uefi64]
2. Run `grub-mkconfig -o /boot/grub/grub.cfg`
3. Inspect file /boot/grub/grub.cfg after line "### BEGIN /etc/grub.d/39_memtest86+ ###"
Actual Results:  
Memtest is not added to the GRUB config

Expected Results:  
Memtest should be added to the GRUB config
Comment 1 Michał Dec 2024-02-14 10:32:28 UTC
Created attachment 884951 [details]
memtest's GRUB directives

This is the file described in the bug report. This file should exist, but its contents should be adjusted to the target we want to install memtest for.
Comment 2 Michał Dec 2024-02-14 16:41:27 UTC
Resolved. I needed to run dispatch-conf. Sorry.