add 2nd m.2 nvme drive, won't boot

So this is an ASUS X570-Plus motherboard.

I've been using this as my main desktop with FreeBSD since 2021. There's one m.2/nvme drive attached as the boot drive. It has been working fine.

It's time for more storage, so I installed a second m.2 drive (Crucial P3 Plus PCIe 4.0). On this motherboard, the second m.2 slot is under a piece of metal that is removed, which I did, put in the drive, put the piece back.

The computer shows the FreeBSD boot menu, but it only gets as far as:
Trying to mount root from ufs:/dev/nvd0p2

And says it can't do that & fails. The /boot/efi is on that same drive (p1), so it must see it?

Why won't it boot?

Remove the second nvme drive and no problem.

Oh, this is 13.3-RELEASE-p5.
 
It may be that with two drives installed, your first one is actually seen by the OS as the second one, therefore the bootloader is looking for the root partition on the wrong drive.

Try the following: from the bootloader screen, choose "Escape to loader prompt", then:
set root_disk_unit=1
boot

If it doesn't work, also try with set root_disk_unit=0 and set root_disk_unit=2.

You can also try physically swapping the two drives.
 
Trying to mount root from ufs:/dev/nvd0p2
OK so if you added second drive try this at mountroot prompt:

ufs:/dev/nvd1p2

Then when booted I like to add serial number of the nvme you want to boot from and use it in /etc/boot.hints.
Sort of a hardware level label.
Example from manual. You want to use nvd0 as your boot drive. So adjust to suit.
hint.nda.3.sn="CY0AN07101120B12P"
Relevant example;
hint.nvd.0.sn="111111111111111"
 
fstab is telling it to try and boot from nvd0p2 and that is invalid. Just because it finds the EFI partition on nvd1p1 doesnt mean it has to boot from there.

Easy fix is to swap the two drives physically.
 
There's no EFI partition on nvd1 though. nvd1 is an entirely new drive. And fstab is on nvd0p2. So I don't understand this.
 
Anything is possible but I doubt it.

mountroot use the force!!!

mountroot:?

QuestionMark will show all your partitions that loader can see.
I bet you will see nvd0 nvd1p1 nvd1p2
 
So I don't understand this.
It can be confusing. What used to be nvd0 is now nvd1.

Why not remove new drive and use hints to 'lock' in your current FreeBSD drive to nvd0.
You can than easily find the serial number from dmesg or diskinfo -v /dev/nvd0.
Then reboot and install new drive without hassle.
 
So this line from diskinfo?
S64ANG0R523532V # Disk ident.

And you're saying that in /etc/boot.hints I would put:

hint.nvd.0.sn="S64ANG0R523532V"

And then add the second drive as before?
 
Well the /etc/boot.hints didn't do anything. What if I swap the drives in /etc/fstab?
I feel like this could get me into a problem....
 
Alright, I swapped the physical drives. Seems to have done the trick.

I don't know why this was necessary, between the boot hints and *especially* that the BIOS has the drives numbered the way I expected. It's the OS that has them reversed.
 
Heh, get this, my old add-on network card (facing my internal network) died while I was doing this, but I had a spare. Put that in, and it swapped my network interfaces on me! So I guess it's a day for that. At least I got it straightened out promptly.
 
Back
Top