Where are system logs to diagnose system startup problems?

motox

Cadet
Joined
Dec 22, 2021
Messages
7
Hello I have a problem that TrueNAS CORE system won't boot - it happenned on two machines. It stops at some point I can login as root without a password and services are running, and the serial console showed some errors with middlewared.

Perhaps I messed up with the system was because I enabled pkg FreeBSD repository and performed pkg update and installed pkg byobu

Anyway how can I see what was the reason? I mean some error message or anything that would point out why the system did not start?

Although I worked around the problem by "reinstalling-upgrading" the system - i.e. TrueNAS installer chose if I want to upgrade an existing installation and create a new boot environment, it imported the database and in the new boot environment everything seemed to work again, with previous settings preserved (I didn't check all but I they exists) - except that I don't have the byobu pkg installed anymore. But I would like to switch to the failed boot environment and find the reason so that I avoid in the future.

If the pkg update/install byobu is the reason, then perhaps the problem is that /etc is kind of a temporary file system? I'm not into details but perhaps it is not preserved? I don't know.

But perhaps the problem is somewhere else?
So is there any log for that? So that when the system starts partially and I have the root login (without providing password) then i can diagnose what the problem is?
 
Joined
Oct 22, 2019
Messages
3,641
Perhaps I messed up with the system was because I enabled pkg FreeBSD repository and performed pkg update and installed pkg byobu
On TrueNAS itself, or within a jail? :oops:

TrueNAS is an appliance, not a tinkerer's OS. Any such package management should be done in iocage jails. (Treat jails / plugins like they are each "mini" instances of a fully-fledged FreeBSD system.)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Adding to @winnielinnie's post: if you did any pkg install <something> on your TrueNAS host, you most likely broke it. Don't do that. It's not supposed to happen.
 

motox

Cadet
Joined
Dec 22, 2021
Messages
7
On TrueNAS itself, or within a jail? :oops:

TrueNAS is an appliance, not a tinkerer's OS. Any such package management should be done in iocage jails. (Treat jails / plugins like they are each "mini" instances of a fully-fledged FreeBSD system.)
I fully understand that, but I wanted byobu in the "TrueNAS itself" shell, apart from the jails ;)

Adding to @winnielinnie's post: if you did any pkg install <something> on your TrueNAS host, you most likely broke it. Don't do that. It's not supposed to happen.
Thank you @Patrick M. Hausen for confirmation! It narrows down my search.

But anyway, for the future or even to confirm my suspicions now: where do I find a log in the middle of a broken startup to find the cause of a startup problem?
 
Joined
Oct 22, 2019
Messages
3,641
But anyway, for the future or even to confirm my suspicions now: where do I find a log in the middle of a broken startup to find the cause of a startup problem?
Likely in the file /var/log/messages (before it gets rotated).


I fully understand that, but I wanted byobu in the "TrueNAS itself" shell, apart from the jails ;)
Not possible in this case. Would have to be within a Jail + mount points that the Jail can use.
 
Top