# Error in /boot/loader.conf gives me a mountroot> prompt



## Michael Faklis (Mar 20, 2020)

I was adding packages, on a quest to get all of my built-in devices working, and got a note to add *vfs.root.mountfrom=zfs:tank* to */boot/loader.conf*.  Upon reboot I get a string of lines *Solaris: NOTICE: Cannot find the pool label for 'tank'*, them *Mounting from zfs:tank failed with error 5.*, ending up with a prompt *mountroot>*.  I know I must remove that offensive line from loader.conf, but I can't get past that mountroot> prompt.

I attempted booting from a live CD, but I find myself clueless how to get the filesystem on my hard disk mounted in this live CD environment.

*I request some direction as to how to get this fixed.*

I'm running FreeBSD 12.1 Release amd64 downloaded 2020Mar09.  The live CD is also from the same release.  I'm using an old MacBook (late 2006 model).  My hard disk used the ZFS filesystem with the default "use entire disk".


----------



## 20-100-2fe (Mar 20, 2020)

Can you try and type zfs:zroot/ROOT/default at the mountroot> prompt?


----------



## George (Mar 20, 2020)

Can you boot into single user mode?

Or, in the live CD, chose the option shell. Figure 2.3, “Welcome Menu”
There you should be able to mount your zfs partition. e.g. `mount /dev/ada0p2 -o rw /mnt`. Then edit the file /boot/loader.conf, with either ee, or vi..

But I am not 100% sure on that. ;D


----------



## Michael Faklis (Mar 20, 2020)

Elazar said:


> Can you boot into single user mode?
> 
> Or, in the live CD, chose the option shell. Figure 2.3, “Welcome Menu”
> There you should be able to mount your zfs partition. e.g. `mount /dev/ada0p2 -o rw /mnt`. Then edit the file /boot/loader.conf, with either ee, or vi..
> ...


Y


20-100-2fe said:


> Can you try and type zfs:zroot/ROOT/default at the mountroot> prompt?


Thank you.  This worked like a charm, so I was able to fix the problem in loader.conf.

Would you be able to tell me where I should have been able to learn this?


----------



## Emrion (Mar 20, 2020)

This kind of problem doesn't allow to boot in single user mode since the system can't mount the root anyway.
You can also boot on a FreeBSD disk/stick, import the pool & `zfs mount zroot/ROOT/default`, but it's far longer than the *20-100-2fe* solution.

FYI, the solution is writed on the screen just before `mountroot>` among other typical answers (depending the file system you actually use).

PS : also, take a look at the boot environments (`bectl`). It's useful when you are unsure about the change you make in vital configuration files.


----------



## 20-100-2fe (Mar 20, 2020)

Michael Faklis said:


> Thank you.  This worked like a charm, so I was able to fix the problem in loader.conf.
> 
> Would you be able to tell me where I should have been able to learn this?



The name 'tank' appears in the Handbook and other documents about ZFS, it's not a real name.
When you install FreeBSD (e.g. in a VM) and type 'mount', you see the dataset mounted on / is 'zroot/ROOT/default'.
The error message says it can't find zfs:tank, so the expected syntax is zfs:<dataset>, hence zfs:zroot/ROOT/default.


----------



## George (Mar 21, 2020)

Messing up one's loader.conf file is one of those painful experiences every FreeBSD user goes through at some point.


----------

