Booting a NVMe drive
Solution 1
Had the same ordeal. It was found that the fix required multiple steps to get working correctly. I'll briefly explain, while the exact and thorough steps can be found below via link to the official ubuntu forums.
Basically you have to locate your /boot on a seperate drive along with installing grub to the same drive. The "boot" drive is SATA and obviously seen and bootable through BIOS with a GPT Partition and scheme like so:
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdc: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 1075MB 1074MB ext4 legacy_boot
2 1075MB 1085MB 10.5MB bios_grub
3 1085MB 500GB 499GB ext4
You MUST include the legacy_boot
on the /boot partition (partition 1), and bios_grub
on the unknown
partition 2.
Your NVMe drive mus be GPT partitioned as well. During install you must choose to do "SOMETHING ELSE" when installing and tell the installer to mount your previously defined /boot partition and to install grub onto that same drive.
Solution 2
After a couple of weeks of screwing around (make sure you are booting off the right device!), I found the following worked for me:
- With GPartEd erase the SATA drive and create a GPT partition table on it.
- If there's already an EFI partition on any device, delete it.
- In the installer set up to boot from the SATA drive (creates the bios_grub & EFI partitions), then create a 500MB (maybe less?) partition for /boot, and another partition for the OS. This system directory is here mainly as a backup in case the NVME drive dies.
- Optionally set up another partition (could even be on the NVME device) for /home.
sdb
├─sdb1 bios_grub
├─sdb2 EFI System Partition
├─sdb3 boot
└─sdb4 system
- Run the installer again, with the same settings as the first time. Set a partition on the NVME device as /, and /dev/sdb3 set to /boot again. Make sure that the SATA drive is the boot device. I have 2 partitions on the NVME device... the first is mounted as /home, the second is mounted as / for the OS. This has a GPT partition table as well.
nvme0n1
├─nvme0n1p1 home home
└─nvme0n1p2 sys
MadHatter
Updated on September 18, 2022Comments
-
MadHatter over 1 year
Note: this is kind of follow-up of this post: https://superuser.com/questions/1318478/booting-nvme-drive-with-a-bootloader, but I decided to post here since I'm trying to install and boot Ubuntu.
Summary: I'm installing Ubuntu on a NVMe drive, on a mainboard that doesn't support NVMe boot. I'm doing this by:
- Having a SATA drive.
- Booting the installation pendrive in UEFI mode.
- Creating an EFI partition on the SATA drive.
- Installing the
/
filesystem on the NVMe drive. - Installing the boot loader on the SATA drive.
The system is correctly installed, but as it reboots, it goes in grub rescue, saying that the volume is unknown.
Note that as I create the main partition on the NVMe drive, the installer leaves 1 Mb of "free space" at the beginning, so I suspect that the true EFI boot partition goes there.
Suggestions? Thanks.
-
oldfred over 5 yearsIf an UEFI system, I would expect it to support NVMe, otherwise you would not have the connectors for it on motherboard. What motherboard? Many systems have needed NVMe firmware updates & UEFI updates also. New 4K drives have that space normally whether 35 year old MBR or newer gpt partitioning. Post this above & preserve formatting.
lsblk -f
-
MadHatter over 5 yearsI have no M.2 connectors on the mb. I use the nvme drive on a PCIe 4x card. It's a Lenovo S30 workstation. Should I run
lsblk -f
at grub rescue prompt? I'll do it as soon as I get home. Thanks! -
oldfred over 5 yearsGrub only has a few terminal commands related to booting. Many NVMe drives have needed firmware updates.
-
Matthew Gaskins about 5 yearsubuntuforums.org/… Had the same ordeal, I thoroughly explained my issue and after some great help from some great folks got it sorted. Happy reading. :)
-
Organic Marble over 2 yearsI had given up until I ran across this q&a. Many thanks.
-
Organic Marble over 2 yearsI had given up until I ran across this q&a. Many thanks.