NVMe SSDs and grub2

(posted on "System Hardware" as I've never had issues with SATA drives (ie /sda) and grub2)

Good afternoon!

Laptop (Dell m7720) with 2 NVMe drives:
#sysctl kern.disks
kern.disks: nvd1 nvd0

The partitions where I've successfully installed FreeBSD:
/dev/nvd1p7 efi
/dev/nvd1p8 ufs

The system currently boots via grub2 Win10/Mint18.2, AND will boot BSD if I specify which OS to boot on startup (using F12 key) but I'll be dipped if I can add BSD to grub2 menu. I won't bore you with ALL the iterations I've placed (over and over!) in 40_custom...but they are variations of

insmod chain
set root=(nvd1,nvd1p7)
chainloader+1

error: disk 'nvd1,ndv1p7' not found.

Guidance please!
Thanks,
MarkB
 
Last edited:
UPDATE: the following works in 40_custom!
EVEN THOUGH (in linux) my drives list as '/dev/nvme0n, nvme1n1, nvme2n1' using the 'lsblk' command, and nvme1n1p7 is my 200MB efi partition AND nvme1n1p8 = UFS filesytem for BSD.

Hope this helps others.
MarkB


Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "FreeBSD ufs hd1" {
 insmod ufs
 set root=(hd1,gpt7)
 chainloader (${root})/efi/boot/BOOTx64.efi
 boot
}
 
Last edited by a moderator:
Well, the loader environment is *NOT* the same as the operating system, this goes for both FreeBSD and Linux. Devices (disks) and partitions can have different names and even different numbering (some start from zero) in the loader environment.
 
Back
Top