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

----> I mentioned before making sure your bootloader has been updated. Has it been at any point? When was (what FreeBSD version) this system first installed?

you didn't explained how to update it. I have no idea what to do. The system has been installed on 31-03-2022.
 
Post #56. We've come so far already. I read and I've copied and pasted the method on my Desktop. But,I feel that this is not the right moment to recover the system using the hard way. I suspect that I can fix the errors without using a so "destructive" method. I wanna try a softer method before,changing the offending parameters only.
 
What I would like to know is why,when I have changed the values of some "canmount" option,it seems that I have overcame the point where it was frozen before (post 71). Understanding this,I could get to the solution faster.
 
I had once seriously broken my root dataset.
Here is how i fixed it:
- Boot with an usb stick
- Did an altroot import of the zpool of this dataset , "zpool import -f -R /mnt/altroot nomadbsd-zroot "
- Make mount directory "mkdir /mnt/test"
- Performed a legacy mount of / on it, ie "mount -t zfs nomadbsd-zroot/ROOT/default /mnt/test"
- Made a backup of etc , "cp -vfR /mnt/test/etc directory /mnt/test/etc_old"
- Performed a "chflags -R noschg /mnt/test"
-Grabbed base.txz , kernel.txz from:
-Untarred these files into the mounted /mnt/test, ie "cd /mnt/test ; tar xvfz base.txz ; tar xvfz kernel.txz
-After it my system rebooted normally.
-then i did "pkg update -f" to reinstall all packages

This method works even if you did by accident
Code:
rm -fR /usr/local
rm -fR /usr/bin
rm -fR /bin
I don't now if it's clear what i want to achieve & how.

So,it seems there is no more experiments to try to fix the error,except this one...so I will document what I get. I haven't booted from USB stick,but from the UFS/ FreeBSD installation and I did :

Code:
# zpool import -f -R /mnt/zroot zroot
# mkdir /mnt/test
# mount -t zfs zroot/ROOT/31-03-2022-b /mnt/test
# cp -vfR /mnt/test/etc directory /mnt/test/etc_old
# cp: /mnt/test/etc_old is not a directory
# mkdir /mnt/test/etc_old
# cp -vfR /mnt/test/etc directory /mnt/test/etc_old
......
/mnt/test/etc/X111 -> /mnt/test/etc_old/etc/X111
---> cp: directory: No such file or directory

/mnt/test/etc = 626 elementi da 2.0 MiB (2045691 byte)
/mnt/test/etc_old = 627 elementi da 2.0 MiB (2045691 byte)


# chflags -R noschg /mnt/test
# cd /mnt/test
# tar xvfz /usr/home/marietto/Desktop/Files/UFS-disk/Fix-error/base.txz

tar: Error exit delayed from previous errors : WHY ? (anyway I've copied all the extracted files pasting them FROM /usr/home/marietto/Desktop/Files/UFS-disk/Fix-error/base/ TO /mnt/test using thunar,I hope that's good)

# tar xvfz /usr/home/marietto/Desktop/Files/UFS-disk/Fix-error/kernel.txz

OK
REBOOT...
 
Pray? If you've done what i described you just did a freebsd install.
My last advice gave a look at modication dates in /etc/ & /etc/rc.d. Giving up.
 
So,copy every file from the broken installation to an external disk and make a fresh reinstall,I suppose. That's the best way for NOT understanding what's wrong and for NOT finding the real fix. I'm here to learn,not to do the same thing again and again. I want to understand what's broken and how to fix it. Otherwise my failure is your failure (likewise my success is your success). Is there someone here who loves to be defeated by a damaged system ? The reinstallation is the easiest way but also a common defeat.
 
With the precious help of @graham Perrin,I've found the 50% of the solution. He told me to detach every external disk attached to the PC. I did that and I found that this disk :

Code:
=>        40  1953525095  da4  GPT  (932G)
          40      532480    1  efi  (260M)
532520        1024    2  freebsd-boot  (512K)
533544         984       - free -  (492K)
534528     4194304    3  freebsd-swap  (2.0G)
4728832  1948794880    4  freebsd-zfs  (929G)
1953523712        1423       - free -  (712K)

interferes with the booting of this disk :

Code:
=>       40  976773095  ada0  GPT  (466G)
         40     532480     1  efi  (260M)
532520       1024     2  freebsd-boot  (512K)
533544        984        - free -  (492K)
534528    4194304     3  freebsd-swap  (2.0G)
4728832  972044288     4  freebsd-zfs  (464G)
976773120         15        - free -  (7.5K)

it means that if I boot FreeBSD with da4 disk attached I get the error. If I boot FreeBSD without it,I don't get it. This is the content of the disk :

Code:
# zpool import -f -R /mnt/zroot2 zroot2
ok

marietto@marietto:/mnt/zroot2 # ls
boot    dev     tmp     usr     var     zroot   zroot2

marietto@marietto:/mnt/zroot2 # cd zroot2

marietto@marietto:/mnt/zroot2/zroot2 # ls
Data          Informations               backup-freebsd-zfs

So,now should be easy to understand what to do for someone of you. I still don't know.But I don't want to detach the disk every time I want to use FreeBSD.
 
Back
Top