Unclean shutdown detected. - can't boot without this message.


yoshi68

Recommended Posts

I have had this error before, and I got around it by backing up my config folder, formatting the USB boot drive and reinstalling from scratch before replacing my config folder.

 

This time, I have shutdown correctly (stopped the array, and then powered down) and when it booted back up, I have the Unclean shutdown detected message. I have tried chkdsk g: /f and chkdsk g: /markclean and in ubuntu i have tried fsck /dev/sdb1, and both result in no change to UNRAID starting up with Unclean shutdown detected. So I made a copy of the contents of the USB drive, and reinstalled UNRAID to the usb drive, and copied the config folder back on, and I get the same boot up again. I can't edit any settings in my system while I have this.

 

Is there any other advice on what to do? Can I back up just selected files from the config that will keep passwords, network and disk configurations intact, and remove all of my plug ins? Should I replace my USB for a different drive?

Link to comment

If you cannot start up again without that message when you have (apparently) done a successful clean shutdown, then that suggests some sort of issue with the USB drive as it means that unRAID has failed to record the successful shutdown.  This state would normally be recorded to the super.dat file on the USB drive so you might want to check when that was last updated - ideally it should correspond to the shutdown time.

Link to comment

but as the USB drive is set to read only, it cannot write to the super.dat file to say that it has performed the clean shutdown.

As far as the behavior of the shutdown, I would assume all is good, It successfully stops the array and unmounts the disks, and I shutdown and the computer shuts down without displaying an error.

 

There is no other indication that the USB drive has failed, except UNRAID only boots it as read only, but that might be because it can't change the .dat file to reflect a successful shutdown.

 

Can I copy the contents of the config folder except for the super.dat file? can I modify the super.dat file to change whatever flag it sets to signify bad shutdown, can I create a new super.dat file?

Link to comment

but as the USB drive is set to read only, it cannot write to the super.dat file to say that it has performed the clean shutdown. As far as the behavior of the shutdown, I would assume all is good, It successfully stops the array and unmounts the disks, and I shutdown and the computer shuts down without displaying an error.

 

There is no other indication that the USB drive has failed, except UNRAID only boots it as read only, but that might be because it can't change the .dat file to reflect a successful shutdown.

That is not normal - it nearly always means some sort of corruption on the USB drive.  I guess it could also mean that the USB drive is about to fail.

 

Can I copy the contents of the config folder except for the super.dat file? can I modify the super.dat file to change whatever flag it sets to signify bad shutdown, can I create a new super.dat file?

The super.dat file is a binary file so I am not sure that is amenable to being changed.

 

I would have thought that the best way forward would be to do as you suggested omitting the super.dat file.  Make sure you have made a note of the serial number of all the current disk assignments.  You can then do a New Config and re-assign the drives.  If the last shutdown was successful you can consider ticking the 'parity' is valid checkbox before starting the array (although a parity check would still be recommended).  On the basis that the USB stick is suspect you may want to switch to another one and use the process for transferring the key to the new USB drive.

Link to comment

In /var/log is another file - dmesg, which happens to be similar but not exactly the same as the syslog.  Of interest in it, it includes more of the bootup process, the things you would see on your console when the system boots.  You may want to view it.  One of the things that appears there, but not in the syslog, is the call to fsck the flash drive, and any results of that action, such as errors corrected or not.  Please attach a copy of /var/log/dmesg.  (cp /var/log/dmesg /boot/dmesg.txt)

 

I agree with itimpi that something is wrong with your flash drive, because it should not be read only.  That means something was wrong with it.  And that's what you should concentrate on, not messing with super.dat.  In fact that won't work as long as the flash drive is read only or corrupted.

 

 

 

As to super.dat, I have a method for turning off the unclean flag in super.dat, but have always hesitated to mention it.  Obviously it's a hack, and not a recommended one either.  But I've thought at times of suggesting it to Squid, so backups of the flash drive could be done at any time, without being concerned that the array is started, since this 'hack' would turn off the flag.

 

  printf '\x1' | dd of=/boot/config/super.dat bs=1 seek=0x24 conv=notrunc

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.