• grub cannot find partitions on NVMe drive

    I had previously installed Antergos to a ZFS pool on a SATA SSD, and that was working (save the occasional hiccup), but when I went to transition to an NVMe drive, things have not gone smoothly.

    I paritioned the NVMe identically to the SATA drive, (which is the default done by the installer on a UEFI ZFS install, p1 is fat32 for the ESP, p2 is the rest of /boot, and p3 is for the pool)copied the files from the /boot and /boot/efi partitions, (and made sure that the former is ext4, latter fat32), set the fat32 partition to boot,esp flags, re-installed grub, and… It can’t find the ext4 partition.

    When I do an ls at the grub prompt, it finds only (hd0), not (hd0,1) or anything of the sort, and being that the NVMe is the ONLY drive in the system, I’m guessing that it’s finding the drive, but not the partitions.

    Should I perhaps look elsewhere than grub for my odd combination?

  • Do you only copy the system from old drive to the new one? ?
    This will not work like this as nvme drives have different naming then ssd drives. and uuids will change also…

    You can try changing them inside /etc/fstab by getting the new uuids from ls -l /dev/disk/by-uuid/
    and also inside grub uuids are used so need to change them too inside /etc/default/grub (for resume)
    as far as i know grub will get uuids from /etc/fstab on regenerating grub.cfg

  • @joekamprad I have changed the UUID’s in /etc/fstab, (that was my first stumbling block and facepalming 😃 ), and grub complains that it cannot find the NEW UUID for /boot. I’m aware of the change from say /dev/sda to /dev/nvme0n1, does that matter if I’m using UUID’s in fstab? Does it matter anywhere else in the stack? 😕

    Like I said, when I do ls in grub I can only see (hd0), and not (hd0,1) and such like as I would expect to see, which I’m assuming means that grub cannot see the partitions, am I wrong in that assumption?

    As for copying, I created identical partitions on the NVMe drive to the SATA one, formatted, used cp to copy over the data in the /boot and ESP partitions, added the 3rd as a mirror to the zpool and removed the SATA after resilvering was complete, so I’m at least confident that the / root partition was transferred correctly. 😄

  • @Ranko-Kohime said in grub cannot find partitions on NVMe drive:

    @joekamprad I have changed the UUID’s in /etc/fstab, (that was my first stumbling block and facepalming ), and grub complains that it cannot find the NEW UUID for /boot. I’m aware of the change from say /dev/sda to /dev/nvme0n1, does that matter if I’m using UUID’s in fstab? Does it matter anywhere else in the stack?

    It think you are missing the letter such as /dev/nvme0n1p1 and p2 and p3 etc.

  • Do you use gpt ?.. And i am not sure about ZFS is involved also…

  • AFAIK, not all (especially older) motherboards support booting from an NVMe drive. If that’s the case, then another non-NVMe boot drive is needed.

  • @joekamprad Yes, the disk is GPT formatted.

  • @manuel It’s a Lenovo T580, which has an option for NVMe, (and, you even need to buy a special tray for the NVMe if you ordered a SATA model, as there’s no 2280 slot on the motherboard), so it does support native NVMe booting.

  • Have you checked the device names and partitions. They should be /dev/nvme0n1p1 and so on /dev/nvme0n1p2 etc… You have it different. Have you double checked!

  • @ricklinux I’m not sure where I would be using the partition numbers? In /etc/fstab ? In /boot/grub/grub.cfg ? I really don’t know where I’d need to use the /dev/nvme0n1p1(2,3) path, as I thought that UUID’s were used to disambiguate in situations where the motherboard were to swap the path between 2 drives. (n1 became n2, and n2 became n1, for example)

  • @Ranko-Kohime I was just pointing out you said "I’m aware of the change from say /dev/sda to /dev/nvme0n1, does that matter if I’m using UUID’s in fstab? "

    You have /dev/nvme0n1 and on my system using an m.2 drive which i originally had Windows 10 and Linux installed has /dev/nvme01p1, /dev/nvme01p2, /devnvme01p3 and so on. I have switched my system around so i now have only Windows on the m.2 drive and i put Antergos on an SSD drive separate. I have done this because UEFI set up with EFI is tricky and the specifications aren’t being exactly followed by all the manufacturers. I found this set up to be the least troublesome for me. But my point is you don’t have the partition naming in the device …that being p1, p2, p3 at least that’s what you wrote.

    So i’m saying check it again with gparted and make sure it’s correct naming and in all the places. As an example i show you the gparted of Windows and also my Antergos partitions on an SSD.

    Screenshot from 2019-04-27 09-57-22.png

    Screenshot from 2019-04-27 09-57-29.png

  • @ricklinux Ahh. In my earlier post I was referring to the devices, not the partitions, which is why I omitted the partition numbers.

  • So, one thing I noticed as I was poking around, was that I’m using grub-zfs, which I assume (since I don’t really know at this point), came from the Antergos repo, but has since been removed. Does anyone know if this means that the standard grub now supports ZFS natively?

  • @Ranko-Kohime I just stick with the et4. UEFI has enough issues as it really isn’t even designed to be used with grub. Systemd boot is better implementation according to what i have read on all of it. Having said that i prefer a boot screen with some kind of boot logo as compared to the plain systemd boot. For me it just gets too complicated to use some of the other file systems. But everything has it’s purpose and everyone has their own needs, wants, likes and dislikes and their own opinions. I try to stick with hardware facts. Somethings just don’t work with certain hardware. Most people including myself have enough problems just dealing with normal Linux issues related to the particular distro we are using. So i stick with what works the best for most applications.
    ext4 for me for now! I have tried many different setups with my hardware on UEFI. I have my Windows 10 on an m.2 drive which has it’s own EFI partition and i have Antergos installed on it’s own SSD which has a /boot and /efi / and swap. I could have /home also but didn’t bother and i really didn’t need a swap but the automatic installation created it. I have 32 GB memory so it’s pointless. And yes i have grub installed.

grub127 partitions12 nvme2 Posts 14Views 211
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.