ZFS Mounting local filesystem ; eval : zfs not found - eval: touch not found - /etc/rc : date not found

Hello to everyone.

My main FreeBSD 13.1 installation froze at some point of the booting process showing these messages :

Code:
Mounting local filesystem
eval : zfs not found
eval: touch not found
/etc/rc : date not found

I have no idea what's wrong and why. Please,can someone give me some suggestions to help me to fix these errors ? because I can't use ianymore that installation since those errors froze it totally. Maybe the solution is here :


but I don't know if those commands,adapted to my situation,can help to fix the errors or they could further damage it. I don't want to risk issuing commands that I don't understand. Very thanks.
 
Looks like your root filesystem is missing /bin, /usr/bin and /sbin. Some of it is still there because it does start the /etc/rc script which means that /sbin/init and /bin/sh are still there. But /usr/bin/touch, /sbin/zfs and /bin/date seem to have disappeared. Boot to single user mode and investigate further.

In a pinch you could extract those files from base.txz from the installation media.
 
i remember a similar post when the problem was the incorrect dataset was mounted as root
which was missing /bin and stuff
2 dataset had mountpoint set to / and canmount on
 
Looks like your root filesystem is missing /bin, /usr/bin and /sbin. Some of it is still there because it does start the /etc/rc script which means that /sbin/init and /bin/sh are still there. But /usr/bin/touch, /sbin/zfs and /bin/date seem to have disappeared. Boot to single user mode and investigate further.

In a pinch you could extract those files from base.txz from the installation media.

touch,zfs and date are on the proper places.
 
i remember a similar post when the problem was the incorrect dataset was mounted as root
which was missing /bin and stuff
2 dataset had mountpoint set to / and canmount on

I think that this could be compatible with what I did today. Can you help me to fix it ?
 
This is the disk broken :

Code:
# zfs list

NAME                                           USED  AVAIL     REFER  MOUNTPOINT

zroot                                          412G  33.9G       96K  /mnt/zroot/zroot
zroot/ROOT                                     399G  33.9G       96K  none
zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736     8K  33.9G      321G  /mnt/zroot
zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042     8K  33.9G      343G  /mnt/zroot
zroot/ROOT/13.1-RELEASE_2022-09-01_041825        8K  33.9G      308G  /mnt/zroot
zroot/ROOT/31-03-2022-a                        512K  33.9G     43.4G  /mnt/zroot
zroot/ROOT/31-03-2022-b                        399G  33.9G      318G  /mnt/zroot
zroot/tmp                                     15.0M  33.9G     15.0M  /mnt/zroot/tmp
zroot/usr                                     11.2G  33.9G       96K  /mnt/zroot/usr
zroot/usr/home                                 192K  33.9G      192K  /mnt/zroot/usr/home
zroot/usr/ports                               11.2G  33.9G     11.2G  /mnt/zroot/usr/ports
zroot/usr/src-                                  96K  33.9G       96K  /mnt/zroot/usr/src-
zroot/var                                     1.26G  33.9G       96K  /mnt/zroot/var
zroot/var/audit                                 96K  33.9G       96K  /mnt/zroot/var/audit
zroot/var/crash                               1.11G  33.9G     1.11G  /mnt/zroot/var/crash
zroot/var/log                                 3.91M  33.9G     3.91M  /mnt/zroot/var/log
zroot/var/mail                                 130M  33.9G      130M  /mnt/zroot/var/mail
zroot/var/tmp                                 18.1M  33.9G     18.1M  /mnt/zroot/var/tmp
 
This is the disk where I was when I gave the wrong command :

Code:
nomadbsd-zroot                                         67.7G   221G       96K  /mnt/nomadbsd-zroot/nomadbsd-zroot
nomadbsd-zroot/ROOT                                    33.0G   221G       96K  none
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812     8K   221G     31.9G  /mnt/nomadbsd-zroot
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125     8K   221G     32.1G  /mnt/nomadbsd-zroot
nomadbsd-zroot/ROOT/default                            33.0G   221G     32.6G  /mnt/nomadbsd-zroot
nomadbsd-zroot/home                                    30.9G   221G     30.9G  /mnt/nomadbsd-zroot/home
nomadbsd-zroot/usr                                     3.89G   221G       96K  /mnt/nomadbsd-zroot/usr
nomadbsd-zroot/usr/obj                                   96K   221G       96K  /mnt/nomadbsd-zroot/usr/obj
nomadbsd-zroot/usr/ports                                769M   221G      769M  /mnt/nomadbsd-zroot/usr/ports
nomadbsd-zroot/usr/ports/distfiles                       96K   221G       96K  /mnt/nomadbsd-zroot/usr/ports/distfiles
nomadbsd-zroot/usr/ports/packages                        96K   221G       96K  /mnt/nomadbsd-zroot/usr/ports/packages
nomadbsd-zroot/usr/src                                 3.14G   221G     3.14G  /mnt/nomadbsd-zroot/usr/src
nomadbsd-zroot/var                                      424K   221G       96K  /mnt/nomadbsd-zroot/var
nomadbsd-zroot/var/audit                                104K   221G      104K  /mnt/nomadbsd-zroot/var/audit
nomadbsd-zroot/var/crash                                 96K   221G       96K  /mnt/nomadbsd-zroot/var/crash
nomadbsd-zroot/var/mail                                 128K   221G      128K  /mnt/nomadbsd-zroot/var/mail
 
No one can help here ? If I don't restore that zfs pool ? I can't do anythng else. All my important data are there. I'm totally lost.
 
Boot to single user, then have a look at zpool list, I'm wondering if both pools are loaded. The name and mountpoints of nomadbsd-zroot appear to look good, no clashes or conflicting mounts there. You could simply try to export that other pool, if only to make sure it's not in the way.

I'm assuming that zroot pool is the one with your data? Why are they all mounted on /mnt? Is that because of an import with a install disk?
 
Like i said in your previous post verify :
- zpools have different names
- you don't do overmount of directories which contain already data when you do "zpool import". (I'm almost certain you do this)
- when you import pools with identical dataset mountpoints as the host use altroot import.
 
Boot to single user, then have a look at zpool list, I'm wondering if both pools are loaded. The name and mountpoints of nomadbsd-zroot appear to look good, no clashes or conflicting mounts there. You could simply try to export that other pool, if only to make sure it's not in the way.

I'm assuming that zroot pool is the one with your data? Why are they all mounted on /mnt? Is that because of an import with a install disk?

Actually I'm on the nomadbsd system. And zfs list shows that the zroot pool (where I have all my data) is not mounted. I have also turned off the disk where I have installed nomadbsd and I have booted my third freebsd installation,thinking that this might have been enough to fix the conflict. But unfortunately it hasn't. I'm almost sure that the conflict arises because I have set the canmount of the zroot pool in the wrong way. How can reverse it ?

maybe :

Code:
zpool import -f -R /mnt/zroot zroot
zfs set canmount=off zroot
zpool export zroot

?
 
Boot something, import the offending pool, set canmount back to 'off', export pool. Boot system normally.
 
Useful command: zfs list -r -o name,canmount,mountpoint zroot

Double check your mountpoints too.

For reference, this is a fairly standard install:
Code:
dice@maelcum:~ % zfs list -r -o name,canmount,mountpoint zroot
NAME                                          CANMOUNT  MOUNTPOINT
zroot                                         on        /zroot
zroot/ROOT                                    on        none
zroot/ROOT/13.1-RELEASE-p3_2022-11-16_162652  noauto    /
zroot/ROOT/13.1-RELEASE-p4_2022-12-05_005351  noauto    /
zroot/ROOT/13.1-RELEASE_2022-11-06_211508     noauto    /
zroot/ROOT/default                            noauto    /
zroot/tmp                                     on        /tmp
zroot/usr                                     off       /usr
zroot/usr/home                                on        /usr/home
zroot/usr/ports                               on        /usr/ports
zroot/usr/src                                 on        /usr/src
zroot/var                                     off       /var
zroot/var/audit                               on        /var/audit
zroot/var/crash                               on        /var/crash
zroot/var/log                                 on        /var/log
zroot/var/mail                                on        /var/mail
zroot/var/tmp                                 on        /var/tmp
 
Useful command: zfs list -r -o name,canmount,mountpoint zroot

Double check your mountpoints too.

For reference, this is a fairly standard install:
Code:
dice@maelcum:~ % zfs list -r -o name,canmount,mountpoint zroot
NAME                                          CANMOUNT  MOUNTPOINT
zroot                                         on        /zroot
zroot/ROOT                                    on        none
zroot/ROOT/13.1-RELEASE-p3_2022-11-16_162652  noauto    /
zroot/ROOT/13.1-RELEASE-p4_2022-12-05_005351  noauto    /
zroot/ROOT/13.1-RELEASE_2022-11-06_211508     noauto    /
zroot/ROOT/default                            noauto    /
zroot/tmp                                     on        /tmp
zroot/usr                                     off       /usr
zroot/usr/home                                on        /usr/home
zroot/usr/ports                               on        /usr/ports
zroot/usr/src                                 on        /usr/src
zroot/var                                     off       /var
zroot/var/audit                               on        /var/audit
zroot/var/crash                               on        /var/crash
zroot/var/log                                 on        /var/log
zroot/var/mail                                on        /var/mail
zroot/var/tmp                                 on        /var/tmp

Code:
# zfs list -r -o name,canmount,mountpoint zroot


NAME                                          CANMOUNT  MOUNTPOINT


zroot                                         off       /mnt/zroot/zroot
zroot/ROOT                                    on        none
zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736  noauto    /mnt/zroot
zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042  noauto    /mnt/zroot
zroot/ROOT/13.1-RELEASE_2022-09-01_041825     noauto    /mnt/zroot
zroot/ROOT/31-03-2022-a                       noauto    /mnt/zroot
zroot/ROOT/31-03-2022-b                       on        /mnt/zroot
zroot/tmp                                     on        /mnt/zroot/tmp
zroot/usr                                     off       /mnt/zroot/usr
zroot/usr/home                                on        /mnt/zroot/usr/home
zroot/usr/ports                               on        /mnt/zroot/usr/ports
zroot/usr/src-                                on        /mnt/zroot/usr/src-
zroot/var                                     off       /mnt/zroot/var
zroot/var/audit                               on        /mnt/zroot/var/audit
zroot/var/crash                               on        /mnt/zroot/var/crash
zroot/var/log                                 on        /mnt/zroot/var/log
zroot/var/mail                                on        /mnt/zroot/var/mail
zroot/var/tmp                                 on        /mnt/zroot/var/tmp

everything's good here ?
 
To verify if you don't have "double mountpoints",
Code:
zfs list -s mountpoint

Code:
# zfs list -s mountpoint


NAME                                                    USED  AVAIL     REFER  MOUNTPOINT


nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812     8K   221G     31.9G  /
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125     8K   221G     32.1G  /
nomadbsd-zroot/ROOT/default                            33.0G   221G     32.6G  /
nomadbsd-zroot/home                                    31.0G   221G     31.0G  /home
zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736              8K  33.9G      321G  /mnt/zroot
zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042              8K  33.9G      343G  /mnt/zroot
zroot/ROOT/13.1-RELEASE_2022-09-01_041825                 8K  33.9G      308G  /mnt/zroot
zroot/ROOT/31-03-2022-a                                 512K  33.9G     43.4G  /mnt/zroot
zroot/ROOT/31-03-2022-b                                 399G  33.9G      318G  /mnt/zroot
zroot/tmp                                              15.0M  33.9G     15.0M  /mnt/zroot/tmp
zroot/usr                                              11.2G  33.9G       96K  /mnt/zroot/usr
zroot/usr/home                                          192K  33.9G      192K  /mnt/zroot/usr/home
zroot/usr/ports                                        11.2G  33.9G     11.2G  /mnt/zroot/usr/ports
zroot/usr/src-                                           96K  33.9G       96K  /mnt/zroot/usr/src-
zroot/var                                              1.26G  33.9G       96K  /mnt/zroot/var
zroot/var/audit                                          96K  33.9G       96K  /mnt/zroot/var/audit
zroot/var/crash                                        1.11G  33.9G     1.11G  /mnt/zroot/var/crash
zroot/var/log                                          3.91M  33.9G     3.91M  /mnt/zroot/var/log
zroot/var/mail                                          130M  33.9G      130M  /mnt/zroot/var/mail
zroot/var/tmp                                          18.1M  33.9G     18.1M  /mnt/zroot/var/tmp
zroot                                                   412G  33.9G       96K  /mnt/zroot/zroot
nomadbsd-zroot                                         67.9G   221G       96K  /nomadbsd-zroot
nomadbsd-zroot/usr                                     3.89G   221G       96K  /usr
nomadbsd-zroot/usr/obj                                   96K   221G       96K  /usr/obj
nomadbsd-zroot/usr/ports                                769M   221G      769M  /usr/ports
nomadbsd-zroot/usr/ports/distfiles                       96K   221G       96K  /usr/ports/distfiles
nomadbsd-zroot/usr/ports/packages                        96K   221G       96K  /usr/ports/packages
nomadbsd-zroot/usr/src                                 3.14G   221G     3.14G  /usr/src
nomadbsd-zroot/var                                      424K   221G       96K  /var
nomadbsd-zroot/var/audit                                104K   221G      104K  /var/audit
nomadbsd-zroot/var/crash                                 96K   221G       96K  /var/crash
nomadbsd-zroot/var/mail                                 128K   221G      128K  /var/mail
nomadbsd-zroot/ROOT                                    33.0G   221G       96K  none
zroot/ROOT                                              399G  33.9G       96K  none
 
Verify,
Code:
zfs get canmount nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812 nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125 nomadbsd-zroot/ROOT/default zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736 zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042 zroot/ROOT/13.1-RELEASE_2022-09-01_041825 zroot/ROOT/31-03-2022-a zroot/ROOT/31-03-2022-b
all should have canmount off or noauto
 
Verify,
Code:
zfs get canmount nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812 nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125 nomadbsd-zroot/ROOT/default zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736 zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042 zroot/ROOT/13.1-RELEASE_2022-09-01_041825 zroot/ROOT/31-03-2022-a zroot/ROOT/31-03-2022-b
all should have canmount off or noauto

Code:
# zfs get canmount nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812 nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125 nomadbsd-zroot/ROOT/default zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736 zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042 zroot/ROOT/13.1-RELEASE_2022-09-01_041825 zroot/ROOT/31-03-2022-a zroot/ROOT/31-03-2022-b


NAME                                                   PROPERTY  VALUE     SOURCE


nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812  canmount  noauto    local
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125  canmount  noauto    local
nomadbsd-zroot/ROOT/default                            canmount  noauto    local
zroot/ROOT/13.1-RELEASE-p2_2022-11-11_174736           canmount  noauto    local
zroot/ROOT/13.1-RELEASE-p3_2022-11-17_193042           canmount  noauto    local
zroot/ROOT/13.1-RELEASE_2022-09-01_041825              canmount  noauto    local
zroot/ROOT/31-03-2022-a                                canmount  noauto    local
zroot/ROOT/31-03-2022-b                                canmount  on        local

At the moment I'm trying to fix that error,but don't forget that what I want to do is,when I'm running NomadBSD,to mount the zpool zroot showing all the directories there.
 
I've rebooted. Unfortunately it didn't work :

index.jpg
 
Basic troubleshooting guide is to cut away everything that's not explicitly required. Export all the other pools so you're only left with the important one. Do NOT import the others until you've got the zroot pool properly booting again. You are adding a lot of unnecessary clutter and complexity which only leads to more confusion, bring it down to the basics. Then fix any issues that may arise. Once you have that system back up and running properly again should you consider adding the various other pools. Work methodically, take it step by step. Checking each step before moving onto the next.
 
Everytime I reboot the PC and I go with nomadbsd,I don't see different pools than the nomadbsd-zroot pool. So I have nothing to export. Below you see what I see now. I have just rebooted the PC and I haven't mounted any external pool.

Code:
# zfs list

NAME                                                    USED  AVAIL     REFER  MOUNTPOINT

nomadbsd-zroot                                         67.9G   221G       96K  /nomadbsd-zroot
nomadbsd-zroot/ROOT                                    33.0G   221G       96K  none
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-10_231812     8K   221G     31.9G  /
nomadbsd-zroot/ROOT/13.1-RELEASE-p5_2022-12-11_012125     8K   221G     32.1G  /
nomadbsd-zroot/ROOT/default                            33.0G   221G     32.6G  /
nomadbsd-zroot/home                                    31.0G   221G     31.0G  /home
nomadbsd-zroot/usr                                     3.89G   221G       96K  /usr
nomadbsd-zroot/usr/obj                                   96K   221G       96K  /usr/obj
nomadbsd-zroot/usr/ports                                769M   221G      769M  /usr/ports
nomadbsd-zroot/usr/ports/distfiles                       96K   221G       96K  /usr/ports/distfiles
nomadbsd-zroot/usr/ports/packages                        96K   221G       96K  /usr/ports/packages
nomadbsd-zroot/usr/src                                 3.14G   221G     3.14G  /usr/src
nomadbsd-zroot/var                                      424K   221G       96K  /var
nomadbsd-zroot/var/audit                                104K   221G      104K  /var/audit
nomadbsd-zroot/var/crash                                 96K   221G       96K  /var/crash
nomadbsd-zroot/var/mail
 
/me looks at the top of the screen. Hmm, it says FreeBSD forums there, for a minute I though I had accidentally moved to the NomadBSD forums. That zroot is the broken FreeBSD install, right? Then why are booting NomadBSD?
 
Yes,the zroot pool belongs to the FreeBSD 13.1 system,not to the nomadBSD system. I'm "working" on NomadBSD because I'm experimenting with bhyve. Yesterday I needed to get some files from the FreeBSD system and I tried to mount it (while I was on Nomad). I gave a wrong command and I started to see that error. Actually I can't boot FreeBSD / ZFS anymore. I'm forced to go with Nomad or with another FreeBSD installation that I have,which has been installed on a UFS fs.
 
Back
Top