NVME Drives Keep Swapping (Changed Title)


#1

I’ve got a NVMe drive on the desktop that is not mounted nor needed for Manajro. (It has Windows installed on it.)

I want to hide it from the desktop. Anyone found a way to do it?

It gets mounted here, /run/media/hipster/xxxxxxxxxxx


#2

But if nvme partitions are not in fstab and file manager shows them, check if your file manager has a way to turn these off. I don’t have xfce (now), but other file managers by default disable, or can disable automount. But check your fstab does not have them first.

A related question to you.
I assume your system is uefi. Where is your manjaro $esp partition?
In nvme or in another drive?

If bios-legacy (unlikely event), isn’t nvme ‘sda’?


#3

Yes uefi. The $esp partition is on the nvme. Checking the other now.

This is from blkid

/dev/nvme1n1p1: UUID="708B-9467" TYPE="vfat" PARTUUID="1d28af51-3040-47a1-a284-854aaa497afb"
/dev/nvme1n1p1: UUID="708B-9467" TYPE="vfat" PARTUUID="1d28af51-3040-47a1-a284-854aaa497afb"
/dev/nvme1n1p2: UUID="c469af4b-1ac1-410b-816f-89287f62342d" TYPE="ext4" PARTUUID="5cd51f2c-30b7-40ea-b6bd-6e7bf71373c9"
/dev/nvme1n1p3: LABEL="Games" UUID="8c806d0b-3a4b-4c24-b42e-feb044ef64af" TYPE="ext4" PARTUUID="bbfeed9c-311f-45db-a1cc-14c156c34ffc"

#4

OK. This is turning into a whole other problem. What I want to do might not be possible until the board manufacturer or the nvme manufacturer get their act together.

Although the above is from /dev/nvme1n1 it is not correct. It is Manjaro. Windows is on that drive.

I have two nvme installed, same brand, same size. I installed Manjaro first on nvme0.

In Manjaro the drives keeps swapping between nvme0 & nvme1.

It seems to be working OK though although when they swap some things don’t work, eg Conky, because it is set for the other drive. With rebooting sometimes it is correct, the next reboot it is not, & so on & so forth.

So I better leave it for now till this issue settles down. Thanks @gohlip.


#5

Check your fstab entries are in UUID, not /dev/nvme1n1p3, etc…
Same for /etc/default/grub (resume=UUID=xxxxxxxxxxx)
Then see this topic that you have manjaro listed in efibootmgr.
And do the 2 commands…

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/nvme1n1 -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi

Important that the second command shows /dev/nvme1n1p1 for your /boot/efi at that point (since it ‘swaps’ between nvme0 and nvme1)
Verify with “findmnt /boot/efi” before doing the command.

Hope this settles the ‘other problem’ and then we can go look at the ‘original problem’.


What Does this Mean?
#6

Just a bit more before I go any further.

Just did a backup with clonezilla. Manajro IS installed on nvme1.

Although since rebooting it is now at nvme0. AAAAHHHHHH


#7

Ah…hope the ‘cloned from’ disk/partition and ‘cloned to’ disk/partition are not together in system.
And more other things to check (which I cannot recall now as I do not do much cloning and none of clonezillaing); Whatever first check that no 2 partitions have same UUID’s. and as said, there’s more things to clean up, like clearing unallocated spaces (I now remember this one) and ‘others’.


#8

This is from fstab>

UUID=708B-9467                            /boot/efi      vfat    defaults,noatime 0 2
UUID=c469af4b-1ac1-410b-816f-89287f62342d /              ext4    defaults,noatime 0 1

As for /etc/default/grub , that line is not in there. (I’m not using swap if that has anything to do with it.)


#9

OK. Did the first one> cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi

Checked with findmnt /boot/efi. Got this> /boot/efi /dev/nvme0n1p1 instead of /boot/efi /dev/nvme1n1p1.

This is from efibootmgr -v

Boot0000* Manjaro	HD(1,GPT,1d28af51-3040-47a1-a284-854aaa497afb,0x22,0xfa7de)/File(\EFI\MANJARO\GRUBX64.EFI)
Boot0001* Windows Boot Manager  HD(2,GPT,a8a14e07-ac8a-441c-ac0e-7d2da6f76098,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS

#10
  1. Confirmed this ?

This is very important. Please recheck. I noticed there were 2 output in blikd of /dev/nvme1n1p1.
Recheck with simpler command “lsblk -f”. Easier to see for duplicate UUID’s.

  1. Did this when " Got this> /boot/efi /dev/nvme0n1p1?
sudo efibootmgr -c -d /dev/nvme1n1 -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi
  1. Since now that I see your windows $esp is of different $esp (it’s okay), and it is in partition 2 of the other nvme disk, it is better you also copy manjaro efi file to that other windows $esp
sudo mount /dev/nvme0n1p2 /mnt
cp /boot/grub/x86_64-efi/core.efi /mnt/EFI/boot/bootx64.efi

important: as usual verify that windows $esp is indeed /dev/nvme0n1p2 before doing it.

Please confirm you have done 1. It is important.
Perhaps I should ask for these before responding (my usual request for info -but that was not for original problem)

sudo parted -l
sudo blkid
lsblk -f
efibootmgr -v
findmnt -s


#11

The trouble I’m having is this:
Sometimes at boot the drives are reversed. I now have manjaro installed on nvme0. (Clonezilla says it is on nvm1) Does it matter if it keeps changing like that? Do the commands need to be changed to match?

Also the double UUID was me copying the same thing twice. (I’m my own worst enemy)


#12

This is common for (non-nvme) disks. sda becomes sdb, sdc --> sde, etc…
That’s because of the bios, not OS. And that’s why we always use UUID’s.

For nvme, it is not common for people to have 2 or more nvme disks.
And for nvme + other disks, $esp is required to be on the nvme disk (not sure if this still applies or a motherboard firmware issue).
And a reminder I do not have any nvme disk.

As said, if we use UUID and not device mapping in fstab, default/grub, everywhere, it shouldn’t matter.

Clonezilla has done its job. It may call it nvm1 at the point of copying but it is not doing anything now that its job is done. Reminder - I don’t use clonezilla. Tested many years ago. Not needed to retest - won’t use it.

Yes!!! That’s why we must always verify each time we do commands that use device mapping, like the commands above.

Perhaps the following would be good (for me? :slightly_smiling_face:)


#13

Thanks for the help @gohlip. Appreciate it very much. However I am so tired & my head is not cooperating so I might leave it for now.

The system is booting where it should & no other issues are present.

Thanks again. :+1: Hopefully I get back to it at some point.


#14

Hi @gohlip could you explain why? This is very interesting to know about. I have such setup, 1 NVME SSD and 1 SATA SSD, each having ESPs -first one for Windows, second one for Linux(es). Also I remember Ubuntu always tried to install it’s grub on NVME’s ESP despite my manual setting to make use of SATA’s one.


#15

As said, I don’t know why that is so and if that still applies. But from the issues on this manjaro forum where there are problems, resetting the $esp to the nvme disk from the ssd disk solves the issue. And I don’t have any nvme disk.

I also ask if that is the case in this topic.
I said there…

However I cannot find any (credible) link that explicitly states the $esp has to be on the nvme device

So this applies to you too, I see. If I understand this wrong (and $esp is on the ssd not nvme), please correct my understanding.

What is your ‘take’ (opinion/assessment/theory) on this?
Appreciate your input.

Cheers.


#16

@gohlip
I did these two commands. Still the drives are swapping.

sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d/dev/nvme1n1 -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

Might leave it at that for now. The system is behaving. Thanks for the help. :sunglasses:


#17

Tried a bit more. Went into the bios & disable the other nvme. Still the system swaps drives. I’ve noticed also when I update-grub I get a warning.

Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-4.19-x86_64
Found initrd image: /boot/amd-ucode.img /boot/initramfs-4.19-x86_64.img
Found initrd fallback image: /boot/initramfs-4.19-x86_64-fallback.img
Found Windows Boot Manager on /dev/nvme0n1p2@/efi/Microsoft/Boot/bootmgfw.efi
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme1n1.
done

This line - /usr/bin/grub-probe: warning: unknown device type nvme1n1

That supposedly is the nvme with Manjaro.

Anything to be concerned about?


#18

Just rm -rf /boot/memtest86+


#19

Yes, it is the bios, not the OS. The bios determines what is hd0, hd1 and in your case nvme0 or nvme1.
And that may change with every boot. The OS may boot up with a differnt sda, sdb though. Watch out. As to where the $esp should be, as said, in a single nvme disk, it is the nvme (usually). For your 2 nvme disks, which one, either, I don’t know.

This, as @openminded said, you can remove memtest.
Read more here for further information. As you already know, that is a non-fatal error and can be ignored. In that link, I requested more information if that applies to other OS’s as well. If you have other OS’s, please let us know if that applies to them as well. It may well be specific to manjaro’s grub but we have a new (fedora) grub now. I do not have any nvme disk.

Cheers, good you have your system ‘behaving’. :grinning:


#20

Thanks guys. All sounds good. Might as well put this thread to bed. Been a few days now with no ill effect. :+1: