Solved FreeBSD won't boot

Hi,
I'm new here :) and new to FreeBSD, and I'm willing to learn!

I have installed FreeBSD 12.1 on my virtual machine software (vmware workstation), all seemed to work fine, however, after the first reboot, system won't boot, that's the error I get:

1577312417899.png


This is the /etc/fstab file:
1577312452006.png


I tried running this:
Code:
fsck -y /

In single user mode and then restarted a few times, did not help.

It seems like /dev/da0p2 is readonly only during boot, because if I press Ctrl-D a few seconds after the errors appears, the boot completes successfully.

Thanks :)
 
More information:

In /etc/rc.d/fsck:
Removing the preen flag from fsck allows the system to boot correctly:

Code:
                check_startmsgs && echo "Starting file system checks:"
                if checkyesno background_fsck; then
                        fsck -F -y #-p
                else
                        fsck -y #-p
                fi

For some reason, running fsck with preen flag -p enabled fails with NO WRITE ACCESS and UNEXPECTED INCONSISTENCY.

Any ideas why?
Thanks
 
My guess is that your file system has had inconsistencies that fsck was prohibited from correcting by that flag. You've ran fsck without -p on it, fixed the filesystem, now it boots again. My bet is that you can add that flag back into the rc.d script and it will boot up fine. Normally next time that happens I'd boot into single user mode and do fsck manually on the file system instead of editing the script.
 
Thank you for your reply blackhaz, but I managed to resolve the issue myself :)

The problem was that for some reason, there was a symlink in
/usr/local/etc/rc.d to /etc/rc.d,
instead of a regular directory in /usr/local/etc/rc.d, and that caused the fsck script to run twice, and that caused the problem.
I checked it with a new fresh install of the same version of FreeBSD, and /usr/local/etc/rc.d, as far as a new fresh install is concerned, should NOT be a symlink to /etc/rc.d, but a regular directory on it's own.

Running:
# rm /usr/local/etc/rc.d
# mkdir /usr/local/etc/rc.d


Solved the problem :)
I hope this will help somebody in the future :)
 
Back
Top