Page 1 of 1

Boot issue after power failure.

Posted: 29 May 2019 19:56
by gomario
Hi there. I am Mario from South Africa. Sadly we regularly have electrical power failures. Usualy I have a backup PSU. I also fully backup my 4GB boot USB stick as well as my config file. But I gotten lazy and did not check the status of my backup battery system for quite some time. I also can not find the duplicate of my USB mem stick. While I was at work the electrical grid went offline for 1h or so. When I got home my server booted but got stuck right at the end. Here is a print from its screen. I know how to reinstall the system and fortunatelly I have a recent Config file but is there a shortcut regarding fixing the boot routine without going thru a re-install? If possible a step by step command help would be great. I am not good in BSD command line :(
IMG_20190529_194131.jpg

Re: Boot issue after power failure.

Posted: 29 May 2019 23:24
by cookiemonster
If I were you I probably try to recover just to learn but if you're not familiar with the commands it is a rabbit hole you wouldn't want to follow if you just want to go back to a usable system. It's unlikely you'll find a step by step tutorial since who knows how bad is the damage. Looks like a damaged filesystem to me.
Luckily you have a backup. Best to reinstall, import config and be done with it.

Re: Boot issue after power failure.

Posted: 30 May 2019 10:23
by JoseMR
gomario wrote:
29 May 2019 19:56
...
is there a shortcut regarding fixing the boot routine without going thru a re-install? If possible a step by step command help would be great.
...

Hello, after the stop screen, you may try executing "fsck -f -y" and reboot after manual filesystem checks finish, between as cookiemonster already pointed out, you can just reinstall and import config for best results.

Note that UFS/SU+J is a very fragile filesystem and prone to breakage upon ungraceful shutdown/power lost, even worse wen running from USB sticks, consider replacing the UPS battery asap.

Regards

Re: Boot issue after power failure.

Posted: 30 May 2019 10:43
by raulfg3
for your especial needs, please consider to use ZFS instead UFS is more robust when power faillure happens

Re: Boot issue after power failure.

Posted: 30 May 2019 18:41
by gomario
Thank you for the reply. I want to say, my server is runnig a very robust, 5x4TB discs in ZFS1 configuration. Over the years I have learned how this works and it saved my butt more than once :-)
However, on the same system I run other isolated discs (old ones). The info on this disc is not important at all (Home Surveilance Cameras). In the end it turned out that one of this old, 2TB discs had an issue because of the power failure. I had some free time and decided to also fully upgrade the system to the latest Xigmanas. The ZFS File system came back right away. No issues whatsoever :-) But I had to completely format the "faulty" 2TB drive (the one which gave the problem). I notice now that some sectors have been marked as 'permanently faulty' (the drive works though). It is on its last legs and I expect it to completely crash within the next few months. As I said, it is only surveillance video data on it. Do you think that when it finally crashes can it somehow "break" my main ZFS1 file system? If you think so than I will take it out right away and rather sit without Video Surveillance until I can afford a new drive.

Re: Boot issue after power failure.

Posted: 30 May 2019 19:20
by JoseMR
gomario wrote:
30 May 2019 18:41
...
Do you think that when it finally crashes can it somehow "break" my main ZFS1 file system? If you think so than I will take it out right away and rather sit without Video Surveillance until I can afford a new drive.

Don't worry at all, go ahead to format the drive and switch to ZFS, if the driver later crash it only takes offline said zpool, not foreign zpools/devices, ZFS is extremely resilient and reliable.

Regards

Re: Boot issue after power failure.

Posted: 26 Jun 2019 15:54
by Flanker_27
Thanks for the recommendation about ZFS, it'll save my life as I have power outages regularily in summer as well (everyone in the apartment block runs their a/c and ventilator = lights out for the entire block)

Re: Boot issue after power failure.

Posted: 09 Jul 2019 10:03
by gomario
JoseMR wrote:
30 May 2019 10:23
gomario wrote:
29 May 2019 19:56
...
is there a shortcut regarding fixing the boot routine without going thru a re-install? If possible a step by step command help would be great.
...

Hello, after the stop screen, you may try executing "fsck -f -y" and reboot after manual filesystem checks finish, between as cookiemonster already pointed out, you can just reinstall and import config for best results.

Note that UFS/SU+J is a very fragile filesystem and prone to breakage upon ungraceful shutdown/power lost, even worse wen running from USB sticks, consider replacing the UPS battery asap.

Regards
Once again the system went off line. This time there was no power failure. It just stopped working overnight. I performed "fsck -f -y" with no results. Everything checks out 100% but it does not boot (see picture)I have once again downloaded the last version and after USB Install, all is fine like nothing happened. But if I restore the .config file once again thigs go bad. Nothig helps. Can it be the Mem Stick?

Re: Boot issue after power failure.

Posted: 09 Jul 2019 10:46
by gomario
After some more research I came to the conclusion that something is wrong with the old .conf file and somehow is not getting updated with the new. Is there a way to manually delete the entire folder and recreate it - empty? Hopefully when updating with the backedup .conf everything will be OK. I am logged in as "admin" but I can not change any permission nor can I delete the file :-(
ConfFolder.jpg

Re: Boot issue after power failure.

Posted: 09 Jul 2019 15:19
by was-armandh
are you still using the original USB stick?
if so replace it or, if you have a spare SATA port, replace it with a SSD
my experience with USB is mostly bad, old USB sticks even worse!

fortunately ZFS is mostly bullet proof

if it wont boot with the data drives unplugged its the boot or hardware

Re: Boot issue after power failure.

Posted: 20 Jul 2019 12:08
by JoseMR
Hi, looks like you need a branded/better USB Stick for Embedded platform and re-try install, or simply switch to RootOnZFS(SSD Mirrored Recommended) and end with the previous unexpected behaviors on power failures.

Regards

Re: Boot issue after power failure.

Posted: 24 Jul 2019 19:45
by gomario
How can I switch to "RootOnZFS"? Yes, I use the cheapest Mem Sticks I can get but the Mem stick is not the issue. It looks like some boot data gets saved on one of my auxiliary UFS formated discs and that is the problem. The disc is old too. Never new that the OS uses it. I thought that only the USB and RAM is used but now I know better. This server is only ment for my ZFS file system. The 5 ZFS discs are new with zero errors. The 2 other auxiliary discs are old, with lots of errors on them but they are there "just to play" with. Now XigmaNAS decided to use one of them as some sort of .conf file backup. And there is my problem. It is a old PATA drive :-)
How can I switch to "RootOnZFS"?