Solved Mounting ZFS from FreeBSD Installer SHELL to modify /etc/fstab - New SDD Installed

Hi
My HP laptop is installed with FreeBSD 13.0 ZFS. The machine has a M2 500GB SSD.

Today, I installed a new SSD 2.5" Samsung 870 1TB. I assumed things will go well, however the newly installed SSD took precedence over M2 and was identified as ada0 instead of ada1. :( So, unable to boot into the system.

I came across this link in the forum. Hence, I booted from FreeBSD Installer and choose shell. However, I am unable to move forward. I am unable to located /etc/fstab file; my assumption being that if I change this file replacing ada0 with ada1 everything should work. Please correct me if I am wrong.

I created a directory on /tmp which is VD used by the Installer as follows:
Code:
mkdir /tmp/mydata
zpool import -fa -R /tmp/mydata

However, unable to locate the /etc/fstab. Only the following directories are mounted on my data:
Code:
tmp, usr, var, zroot-(empty folder)

Would appreciate if anyone could guide or point me to links to resolve this issue.

Thanks.
 
Just changing fstab won't do a thing, what about bootstrapping? You're trying to fix an issue happening at the system level (device identification) yet turning to the OS level.

At this stage fstab hasn't even been used since your system is trying to access a completely different device.

As datasmurf suggested you should look into your bios settings to see if you can fix anything in there.
 
Hi,

I am absolutely no ZFS expert and pretty noob with FreeBSD but I have the feeling that your problem seems more related to your motherboard settings than ZFS.
It happens sometimes, bios can mixed things up when disks have been added or removed, just take a look at the boot order to make sure your initial boot order still remained.
 
Could you try zfs mount zroot/ROOT/default? Assuming your pool has name zroot.
Tired this as suggested from the FreeBSD Installer Shell.
Attached is the Error Message.
 

Attachments

  • Error_MSG01.png
    Error_MSG01.png
    496.4 KB · Views: 69
Just changing fstab won't do a thing, what about bootstrapping? You're trying to fix an issue happening at the system level (device identification) yet turning to the OS level.

At this stage fstab hasn't even been used since your system is trying to access a completely different device.

As datasmurf suggested you should look into your bios settings to see if you can fix anything in there.
Ok, Actually it was in fact the FSTAB.
I Actually, again booted the machine and it landed up to the Root Prompt after error loading rc.conf.

The mistake I made earlier is that I did not notice the prompt message 1 line above to Press CTRL-D to enter MultiUser Mode. This enables the RW for the file system.

Hence, I logged as root in multiuser mode. navigated to /etc/ direct and made a copy of fstab to fstab.back and modified as follows:

Code:
cp /etc/fstab /etc/fstab.back

Original File before SSD Installation:
Code:
cat /etc/fstab.back

# Device    Mountpoint    FStype    Options    Dump    Pass#
/dev/ada0p1    /boot/efi    msdosfs    rw    2    2
/dev/ada0p3    none    swap    sw    0    0
linprocfs       /compat/linux/proc        linprocfs     rw       0     0
linsysfs       /compat/linux/sys        linsysfs     rw       0     0
tmpfs       /compat/linux/dev/shm   tmpfs     rw,mode=1777       0     0

Modified File:
Code:
cat /etc/fstab

# Device    Mountpoint    FStype    Options    Dump    Pass#
/dev/ada1p1    /boot/efi    msdosfs    rw    2    2
/dev/ada1p3    none    swap    sw    0    0
linprocfs       /compat/linux/proc        linprocfs     rw       0     0
linsysfs       /compat/linux/sys        linsysfs     rw       0     0
tmpfs       /compat/linux/dev/shm   tmpfs     rw,mode=1777       0     0

Now I rebooted the machine and all was well as before.
Hence, my original assumption that FSTAB was the issue was unfortunately correct.

Thanks.
 
Hi,

I am absolutely no ZFS expert and pretty noob with FreeBSD but I have the feeling that your problem seems more related to your motherboard settings than ZFS.
It happens sometimes, bios can mixed things up when disks have been added or removed, just take a look at the boot order to make sure your initial boot order still remained.
Bios also played a role, but the reflection of the BIOS has to be changed in the FSTAB as well. See solution above.
 
Tired this as suggested from the FreeBSD Installer Shell.
Attached is the Error Message.
That looks like a 12.x ZFS, it cannot access ZFS created with 13.0. 13.0 switched to the new OpenZFS implementation. FreeBSD 12.x still uses the 'old' ZFS implementation. 13.0 can import a ZFS from older versions (10, 11, 12) but you cannot use the old versions (10, 11, 12) to import a 13.0 ZFS.
 
That looks like a 12.x ZFS, it cannot access ZFS created with 13.0. 13.0 switched to the new OpenZFS implementation. FreeBSD 12.x still uses the 'old' ZFS implementation. 13.0 can import a ZFS from older versions (10, 11, 12) but you cannot use the old versions (10, 11, 12) to import a 13.0 ZFS.
My installation was a fresh install of 13.0 with ZFS, hence I assume that the installation was performed with OpenZFS. Please correct me if I am wrong!

Is there any additional step I need to perform to let 13.0 to adopt OpenZFS?
 
Back
Top