boot from mountroot

My freebsd 13.2 desktop crashed a while ago, I tried boot-repair which went wrong, I kept the drive with its data in cold storage for quite a while. When I try recovery again now, after a long time, freebsd gets to mountroot prompt, ? showed
gpt/zfs0, ada1, ada0, gpt/swap0, gt/gptboot0, gpt/efiboot0, nvd0p1-4, nvd0
(soon after the crash I tried boot-repair and it went wrong !)


fsck -y
mount -u /
mount -a -t ufs
swapon -a


as given in

From a ubuntu desktop I see the nvme drive icon with the name zroot, but the zpool could not be imported.


zpool import -f


pool: zroot
id: 17885777953876293356
state: ONLINE
status: Some supported features are not enabled on the pool.
(Note that they may be intentionally disabled if the
'compatibility' property is set.)
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:

zroot ONLINE
nvme0n1 ONLINE


Is there something that I could do from a memstick freebsd? How do I get to the installed freebsd on the nvme drive from the memstick? What
chroot
commands or other commands that I may type? I wish to save the data in the nvme drive before I reinstall. Please help. Thank you.
 
Last edited:
If it worked, I am unable to mount the zpool and examine and recover data. What are the steps that I need to follow?

Thanks
Code:
buntu@ubuntu:~$ sudo zpool import zroot
cannot import 'zroot': pool was previously in use from another system.
Last accessed by <unknown> (hostid=0) at Thu Oct 27 02:37:17 2022
The pool can be imported, use 'zpool import -f' to import the pool.
ubuntu@ubuntu:~$ sudo zpool import zroot -f
cannot import 'zroot': no such pool or dataset
    Destroy and re-create the pool from
    a backup source.
ubuntu@ubuntu:~$ sudo zpool import nvme0n1
cannot import 'nvme0n1': no such pool available
ubuntu@ubuntu:~$ sudo zpool import disk-by-id/17885777953876293356
cannot import 'disk-by-id/17885777953876293356': no such pool available
 
I have installed freebsd 14.0 in a hard disk to connect the nvme drive and check the freebsd partitions

Is there a way to attach the nvme zfs pools to this new hard disk installation?

Thanks
 
I couldn't resolve the boot issue, removed the disk and tried freeBSD which also experienced strange problems, was on Ubuntu for the last 17 months, tried to boot into the freeBSD with the problems described in this thread, picked up a conversation with ChatGPT and tried various commands. ChatGPT gave me diversions, took me round and round, ZFS was playing hide and seek (Now you see me, now you don't), ChatGPT missed the information that the disk was on kernel security 3, and after I emphasized this to be root issue, ChatGPT has come close to identifying a solution, which interestingly included a suggested to import the pool with readonly=on and resetting kernel.security level, and saving changes to a what would open as a readonly file in readonly=on zpool import !!! It was a 344 page conversation when saved as a marked down text, published at https://amsyvah.github.io/BSD/ for help. It is also makes an interesting reading to understand how A.I works in matters related to code, system administration, its diversions and its swiftness. For inputs of terminal commands, its outputs together with my questions, the response flashed back the same instant as I hit enter. It was fascinating and was a cause for concern at the same time:

Marked down id masked copy of ZFS boot recovery steps with help from ChaptGPT entire conversation as it is after ChatGPT upgrade
 
My freebsd 13.2 desktop crashed a while ago, I tried boot-repair which went wrong, I kept the drive with its data in cold storage for quite a while. When I try recovery again now, after a long time, freebsd gets to mountroot prompt, ? showed

(soon after the crash I tried boot-repair and it went wrong !)

I would not trust an ubuntu repair tool to repair a FreeBSD system.


fsck -y
mount -u /
mount -a -t ufs
swapon -a


as given in

From a ubuntu desktop I see the nvme drive icon with the name zroot, but the zpool could not be imported.


zpool import -f





Is there something that I could do from a memstick freebsd? How do I get to the installed freebsd on the nvme drive from the memstick? What
chroot
commands or other commands that I may type? I wish to save the data in the nvme drive before I reinstall. Please help. Thank you.

In order to repair system with broken boot, one must understand the situation before attempting any fixes. Blindly using some random tool to attempt repair will undoubtedly result in a situation where the only recourse is to reinstall from scratch.

Everyone should read boot(8).

Sorry for being so brutal about this but this is the fact lacking knowledge of boot blocks and boot and when this kind of trouble strikes can be very costly after the fact.
 
Thank you for your comments cy@ Your observations are true. However what you quoted were from my posts from 17 months ago. What I did during the last week is on this MD file. Marked down id masked copy of ZFS boot recovery steps with help from ChaptGPT entire conversation as it is after ChatGPT upgrade. My most recent post is here:
 
Back
Top