0

I have Ubuntu 18.04.2 LTS and grub 2 installed which boots from a sata SSD drive. This a BIOS system, not UEFI.

I have restored Windows 10 to an nvme drive, and fixed its boot structure and drivers using my 'Macrium Reflect' rescue USB. The nvme drive boots fine in VirtualBox. So I believe the Windows 10 disk is correctly configured.

% lsblk  -no name,serial,type,tran /dev/nvme0n1 
nvme0n1     S466NX0KB54472K disk nvme
└─nvme0n1p1                 part nvme

I want to use Grub 2 to be able to boot Windows 10 on this nvme drive.

Ubuntu can see my nvme drive perfectly well, and update-grub finds the Windows 10 system. Here is the generated section of /boot/grub/grub.cfg :

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 10 (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-chain-4E76C42676C4111F' {
    insmod part_msdos
    insmod ntfs
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root  4E76C42676C4111F
    else
      search --no-floppy --fs-uuid --set=root 4E76C42676C4111F
    fi
    parttool ${root} hidden-
    drivemap -s (hd0) ${root}
    chainloader +1
}

However, when booting the Windows 10 Entry from grub, I get 4 errors:

error: no such devices 4E...111F
error: not a partition
error: device format "lvmid/ozz..." invalid must be (f|h)dN, with 0 <= N < 120.
error: invalid signature

I guess that a nvme driver module is missing from initramfs. Or that --set=root needs a different specification.

Is that the case? If so, how do I get it into grub?

This seems like a bug to me...

0
error: no such devices 4E...111F
error: not a partition
error: device format "lvmid/ozz..." invalid must be (f|h)dN, with 0 <= N < 120.
error: invalid signature

These messages come from GRUB, so no initramfs is even loaded yet at that point.

The problem seems to be that your system BIOS is not capable of accessing the NVMe device at boot time (at least, not in legacy BIOS mode).

Since basically all the systems with built-in M.2 slots for NVMe drives are new enough to have UEFI firmware, some system firmware vendors seem to have opted to implement NVMe boot support within UEFI native mode only. Once your Linux is running, it can see the NVMe drive just fine, and so update-grub is able to read it, but at boot time, your GRUB is using legacy BIOS functions to enumerate the system disks, and for legacy BIOS, the NVMe drive simply does not exist. If the appropriate BIOS extension for NVMe access is not available, the BIOS sees the NVMe drive as a generic PCI/PCIe device that has nothing in common with any disk devices at all.

You should check your BIOS settings very carefully: if there is a setting referring to NVMe boot support and it is currently off, you should try enabling it. But if your NVMe drive is on an add-on card, it is very likely not bootable under legacy BIOS on a motherboard that has no built-in NVMe slots unless the card includes a BIOS extension ROM that would provide the necessary BIOS routines to access the NVMe drive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.