3

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
}

2 Answers2

2

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.

Phil
  • 36
0

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

saeng
  • 301