SOLVED I think I've broken my installation...

jonf

Dabbler
Joined
Jan 28, 2021
Messages
18
Hi,

I've been exploring as much as I can with my TrueNAS server recently but I think I may have gone too far now :oops:. I discovered you can use something called 'pkg' in a shell console to add/remove/update certain services. I was doing this inside a jail without any issues and I thought I was being clever by deciding to do the same thing inside the main server's console.

This is where I fear I have done something I wasn't supposed to do. There were quite a few packages listed to add/update/reinstall after typing 'pkg upgrade', so naturally I decided to reboot the server for the changes to take effect. Now I'm greeted with the following screen on the server's console...

IMG_20210201_171413.jpg


It seems as though it can no longer find my boot drive, which would explain why I couldn't ping the server for some time after the reboot. Do I need the nuclear option of reinstalling TrueNAS, or is there a way to rescue this without losing my stuff?
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
Ouch, yes you will need to re-install the boot drive. You won't lose your data pool, but unless you have your configuration backed up, you may need to re-setup some of your shares and config. You most likely removed all the openzfs packages or some related kernel files by mistake..

For others following along 'pkg' is dangerous and should be avoided at all costs, unless you are a developer.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Reinstalling would be the quickest way to recover. Did you save your config in System->General before you started mucking around? If you did, then reloading the config would be the easiest way to get back to your known last good state. If not, you're stuck having to type all your configs back in by hand.

Your data pool is still safe, and will still be there.
 

jonf

Dabbler
Joined
Jan 28, 2021
Messages
18
Thanks for the replies,

This is what I feared. Unfortunately I didn't do a config backup beforehand so I guess I'll be spending some more time after installation. I have a further question: are jails created/saved in your chosen data pool? I'm just wondering whether I need to re-create my original jail and reinstall all the services I originally had running/configured, or if I can somehow re-import the jail from the data pool and simply run it again.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Jails reside in the designated data pool.
 

jonf

Dabbler
Joined
Jan 28, 2021
Messages
18

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
No need for re-import; just set Jails to your data pool via the little gear after the reinstall, and all the jails will re-appear.
 

jonf

Dabbler
Joined
Jan 28, 2021
Messages
18
No need for re-import; just set Jails to your data pool via the little gear after the reinstall, and all the jails will re-appear.

Excellent, I think that was one of the most time consuming parts of setting up my server! Thanks again for your help.
 

jonf

Dabbler
Joined
Jan 28, 2021
Messages
18
Normal service has been resumed, and this time I've now backed up my config! It was relatively painless for me once I imported the pool.

Lessons have been learnt in the process :oops:
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Glad you're back in business. You can search through these forums for scripts on automatically backing up your config. You'll want to back it up on a regular schedule. As my config doesn't change that often, I back mine up weekly. For a system that may be more actively administered, daily or even hourly backups may be warranted.
 
Top