DietPi config menus not working

Hi all,

After a power failure the other day I encountered an issue where when trying to start the RaspiCam (motion service) it wouldn’t start. Further investigation made me run raspistill, the response was that the camera wasn’t enabled on the system. Previously it was…

So, su’ing to root and running DietPi-Config to enable it. However when trying to change options in these menus nothing happens. The screen flashes but does not change disabled to enabled. Some menus that show statistics (for instance the screen for CPU info) state “CPU Mhz” - I’d truly expect a value to be there, but there isn’t.

Further investigation in /DietPi/, the files in here (there are three of them however can’t remember their names off of the top of my head) when modified just state something along the lines of ‘This file has moved onto the DietPi Ramdisk, new location = /DietPi/’.

I have uninstalled the ram disk through the DietPi menus and it does show as not being installed (that at least works compared to items not enabling/disabling) however the above three files still show the same information within.

Questions:

  • Can I recover this without re-imaging? There is quite a lot of custom configuration on this that I don’t want to lose as I am not sure how to replicate it - it was set up a while ago.
  • If I do have to wipe is there a way that I could ‘lift and shift’?
  • How can I stop this from occurring in the future should another power failure occur?

Hi YnoWiFi,

It does sound like the recent power cut may have caused some filesystem corruption. When this occurs, I’d highly recommend a reinstallation, and, do a slow format on the SD card to reset all cells to 0.

But since you asked, we can try to resolve the camera. Please run:

dietpi-bugreport

Follow the on-screen instructions and reply with the reference code once completed. I’ll then be able to look into your system configuration and settings. Hopefully i’ll be able to see what damage the powercut may have caused.

Depending on the outcome of the above, if we cant fix the camera, or other issues start cropping up, I’ll see if we can “clone” your current installation/settings/configurations to a new installation.

  • How can I stop this from occurring in the future should another power failure occur?

DietPi runs from ramdisk once your system is booted. So in the case of a power failure, any DietPi settings/changes you have applied when the system was on, will not be saved when you power the system back on.

The only real way to protect yourself from a powercut is to purchase a UPS of some kind. I personally use this one: http://www.ebuyer.com/196268-apc-back-ups-405-watts-700-va-input-230v-output-230v-interface-port-usb-be700g-uk

Regardless of a DietPi system or standard raspbian. Power cuts will most likely cause file system corruptions which could cause visible issues now, or possibly remain hidden and cause new ones in the future.

Indeed ultimately I will re-install. However good just got better.

Tried another reboot. Nothing is in /DietPi/ now . . .

Got a error code 8 on fsck upon boot up though.

Yay?

Log of fsck -C -R -A -y -f
Mon May 9 21:11:58 2016

fsck from util-linux 2.20.1
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automaticaly removing dirty bit.
/boot.ini
Contains a free cluster (5). Assuming EOF.
/boot.ini
File size is 76 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/config.txt
Contains a free cluster (4). Assuming EOF.
/config.txt
File size is 78 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/dietpi.txt
Contains a free cluster (3). Assuming EOF.
/dietpi.txt
File size is 78 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
fsck: Warning… fsck.vfat for device /dev/mmcblk0p1 exited with signal 6.
fsck died with exit status 8

Mon May 9 21:11:59 2016

Confirms rouge /DietPi/ dir.

fsck: Warning… fsck.vfat for device /dev/mmcblk0p1 exited with signal 6.
fsck died with exit status 8

Yep, looks like you have a filesystem corruption on the 1st partition (/boot).
This is where the DietPi scripts/settings are physically located. So when you booted back up after a powercut, the corrupt files would of been copied to the ramdisk.

Yeah, at this stage there really ins’t any point in trying to recover I don’t think. I still have root and network access. I don’t think I’m going to play with it anymore for fear of losing it completely.

Fourdee, can you suggest how I can ‘lift and shift’?

(But yes, please take praise from the fact that I haven’t posted here since I first joined therefore I haven’t had any issues with DietPi!)

Yep, lets 1st grab the list of installed software, please paste results:

cat /DietPi/dietpi/.installed