Created attachment 850170 [details] emerge --info Hi, I'm trying to run memtest86+ from grub. I installed it and run grub-mkconfig, now I have additional entry "Memtest86+" in grub, in it there is only one entry "*Memtest86+ 64bit UEFI", when I select it I got error: > error: not a valid root device. > > Press any key to continue... > # emerge -pv memtest86+ grub > > These are the packages that would be merged, in order: > > Calculating dependencies... done! > [ebuild R ~] sys-apps/memtest86+-6.10::gentoo USE="bios64 boot efi64 (-bios32) (-efi32) (-iso32) -iso64" 0 KiB > [ebuild R ] sys-boot/grub-2.06-r4:2/2.06-r4::gentoo USE="device-mapper libzfs nls -doc -efiemu -fonts -mount -sdl (-test) -themes -truet > ype" GRUB_PLATFORMS="efi-64 -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -pc -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 0 KiB > # grub-mkconfig -o /boot/grub/grub.cfg > Generating grub configuration file ... > (…) > Adding boot menu entry for UEFI Firmware Settings ... > Found memtest image: /boot/memtest86plus/memtest64.bios > Found memtest image: /boot/memtest86plus/memtest.efi64 > done
Hi, Can you attach the generated grub.cfg here, and also tell me if 6.01 or 6.00 works better?
Same problem with 6.00 and 6.01. My /boot partition is mdraid raid1 with metadata 1.0. UUID of my raid partition: 8afc6b17-cf11-762c-e60a-804ceed9a825 UUID of filesystem: 0CAA-660F
Created attachment 850180 [details] /boot/grub/grub.cfg
Interesting... the root parameters (to find grub's root, /boot) are exactly the same between the linux kernel entries and the memtest entries. The only difference I see is that the memtest entries are missing the gzio module load. Could you try adding an "insmod gzio" around line 659 of your config, just before the "insmod part_gpt" lines, and see if that helps?
Still same error.
Can you attach that modified grub.cfg just so I can make sure it has the change I intended? Thanks
Created attachment 850182 [details] /boot/grub/grub.cfg after change
Ok that's exactly what I had in mind. Just to be sure, all your linux kernel entries boot just fine, right?
Yes, everything is working, except memtest86+.
Can you change "chainloader" to "linux" around line 669-670, and see if that helps?
I get black screen and I have to hard reset. I figured that I can run memtest86+ with this: > setparams 'Memtest86+ 64bit UEFI' > insmod part_gpt > insmod part_gpt > insmod diskfilter > insmod mdraid1x > insmod fat > set root='(hd0,gpt1)' > chainloader "/memtest86plus/memtest.efi64" , but can't figure it how to use "search" to do it right.
Yeah we need a way to tell grub that it can't use mdraid for the chainload, it needs to pick one of the raid members. AND I think I've found a possible solution: https://lists.gnu.org/archive/html/grub-devel/2022-02/msg00001.html Can you try using this search line? search --no-floppy --fs-uuid --set=root --efidisk-only 0CAA-660F
Created attachment 850190 [details] new grub.d config generator Can you try replacing your /etc/grub.d/39_memtest86+ file with this one? What I've done is (for EFI entries only) ditch the prepare_grub_to_access_device builtin and instead just use a single search command
Created attachment 850244 [details] new grub.d config generator Sorry, wrong order of args on that last one, this one should work better
Still same error, but now grub entry is only: > setparams 'Memtest86+ 64bit UEFI' > > search --no-floppy --fs-uuid --set=root 0CAA-660F --efidisk-only > > chainloader "/memtest86plus/memtest.efi64" I tried to add back insmods, but it didn't change anything.
Maybe you can drop to a grub shell and experiment with some search options that can manage to find a single raw hd device... and maybe searching with --file instead of --uuid could work better? I wish I had an mdraid /boot setup to test with, I guess I could try in a VM soon
I gave grub console some try and noticed few things: Search gives more results, but $root get only first result. > grub> search --no-floppy --fs-uuid --set=root 0CAA-660F --efidisk-only > grub> echo $root > md/129 > grub> search --no-floppy --fs-uuid 0CAA-660F --efidisk-only > md/129 md/129 hd0,gpt1 hd1,gpt1 > grub> search --file /memtest86plus/memtest.efi64 > md/129 hd0,gpt1 hd1,gpt1 > grub> chainloader (md/129)/memtest86plus/memtest.efi64 > error: not a valid root device. > grub> chainloader (hd0,gpt1)/memtest86plus/memtest.efi64 > error: not a valid root device. > grub> chainloader (hd1,gpt1)/memtest86plus/memtest.efi64 > error: not a valid root device.
Thanks for the testing... doesn't really seem like --efidisk-only is doing what it's supposed to. I'm not sure how we're going to get it to (automatically) pick one of the raid members for root. I was really hoping that switching from "chainloader" to "linux" would work, since then it would not rely on EFI loading mechanisms, and just read from md/129 just like your linux kernel entries. I wonder if adding "set gfxpayload=keep" would allow the "linux" boot method to work better for you.
Created attachment 862148 [details] 39_memtest86+ I had the same issue. The attached grub.d config generator works for me. Would you like to give it a try?
So with just the chainloader -> linux change, it was quite enough, but with the extra gfx* options, it did work better?
memtest86+ doesn't seem to scale on HiDPI screens. Without the gfx options, it only uses ~1/4 of a 1080p screen. The texts were quite small and barely readable. The gfx options were taken from here: https://gitlab.archlinux.org/archlinux/packaging/packages/memtest86plus/-/blob/main/60_memtest86%2B-efi
*edit: at least doesn't scale on my system
I can't test it, I switched to /boot on USB DOM module to not deal with /boot on RAID any more.
(In reply to Kai-Chun Ning from comment #19) > Created attachment 862148 [details] > 39_memtest86+ > > I had the same issue. The attached grub.d config generator works for me. > Would you like to give it a try? I had run into this same issue and used this grub.d config file to fix it. I can boot normally into memtest now.