Score:1

Adding MemTest86 to Grub if boot partition resides on NVME drive

uy flag

I want to add MemTest86 to Ubuntu 20.04 grub menu. I followed Official MemTest86 guide, but they presume that the system EFI partition is on the SATA drive (/dev/sdX). I have NVME drive for the system partitions, so below entry does not work. If I choose 'MemTest86' entry in grub menu it can't find the place. How I should modify /etc/grub.d/40_custom?

df | grep efi
#/dev/nvme0n1p1                   98304     30865     67439  32% /boot/efi

sudo nano /etc/grub.d/40_custom
menuentry 'MemTest86' {
    insmod part_gpt
    insmod fat
    set root='nvme0n1,gpt1'
    chainloader ($root)/EFI/memtest86/BOOTX64.efi
}

Score:1
cn flag

I just recently did this myself. Type "c" at the grub menu to get a command line. Then "ls" to get a list of all drives. The drive/partitions are all (hd#,gpt#), regardless of what they are physically. So, what I did was list the root of each drive until I found efi. My (hd0) is Ubuntu HD. (hd1) is a 2TB HD for backups. (hd2) is my Windows nvme drive. I found efi with "ls (hd2,gpt1)/". I set root to that and it worked. I also put "insmod gzio" at the beginning, but that probably isn't necessary.

Alexander avatar
uy flag
Yes, it worked. In my case drive/partition was (hd5,gpt1)
Score:0
us flag

I read that the format of (hd#,gpt#) is called Grub Legacy Device Naming Scheme or IDE Legacy Device Naming Scheme.

During boot-up, at Grub menu, type "c" to get into Grub command line mode, then type "ls" to get a list of device names.

Additionally, type "ls -l" to see more details, including UUIDs that can be matched with info from Disks or Gparted to find specific disks and partitions.

See: https://docs.oracle.com/cd/E36784_01/html/E36801/gkvii.html

and under subheading "For NVMe drives:" at

https://www.memtest86.com/tech_configuring-grub.html

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.