DietPi folder empty

Just to add to this I have had the empty DietPi folder a few times recently on two Orange Pi Zeros. I wasn’t far into setting them so I just started again. The most recent happened with a new Stonetronics PSU and new Kingston 8 GB SD card.

Should this recur Fourdee and way to troubleshoot this or any log entries that may help??

John

Thanks John,

Ok, lets try and find the cause for this. Seems we have a reoccurring issue.

If anyone has experienced an issue of /DietPi being empty, please post the following answers and we can investigate:

  • Device used (eg: RPi)
  • Software installed (both through dietpi-software and manually)
  • What was the last command run, before this occurred (eg: dietpi-update)
  • PSU used (eg: Official RPi 5v/2A)
  • SD card used
  • fstab entries (hide any pass worded network drives)
cat /etc/fstab
  • DietPi-RAMlog status
systemctl status dietpi-ramlog -l

Thanks guys and apologies for the inconvenience.

Hi Fourdee,

Just happened again after shutdown now and move to different power socket in another room.

Orange Pi Zero, Rpi3 Stonetronics 2.5 A PSU, Kinsgton 8 GD SD card.

Installed, all through dietpi-software - nextcloud, Lighthttpd, MySQL, PhPMyAdmin, Syncthing, XRDP.

fstab

#Internal Drives---------------------------------------------------
proc            /proc           proc    defaults											0 0
/dev/mmcblk0p1  /boot           auto    defaults,noatime,discard							0 2
/dev/mmcblk0p2  /               auto    defaults,noatime,discard							0 1
tmpfs 			/tmp  			tmpfs 	defaults,noatime,nodev,nosuid,mode=1777				0 0
tmpfs 			/var/log 		tmpfs 	defaults,size=20m,noatime,nodev,nosuid,mode=1777	0 0
tmpfs 			/DietPi 		tmpfs 	defaults,size=10m,noatime,nodev,nosuid,mode=1777	0 0

#External Drives---------------------------------------------------
#NB: Please use dietpi-drive_manager to setup and control your external drives.
UUID=a2bb0b5c-bb0f-4ab5-95dc-2987f476d83d       /mnt/usb_1      auto     defaults,noatime,nofail,x-systemd.automount  0 0
#/dev/sdb1       /mnt/usb_2      auto     defaults,noatime,nofail,x-systemd.automount  0 0
#/dev/sdc1       /mnt/usb_3      auto     defaults,noatime,nofail,x-systemd.automount  0 0
#/dev/sdd1       /mnt/usb_4      auto     defaults,noatime,nofail,x-systemd.automount  0 0
#/dev/sde1       /mnt/usb_5      auto     defaults,noatime,nofail,x-systemd.automount  0 0

#Samba Client------------------------------------------------------
#/mnt/samba . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#FTP Client Mount--------------------------------------------------
#/mnt/ftp_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount

#NFS Client Mount--------------------------------------------------
#/mnt/nfs_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

systemctl status dietpi-ramlog -l

root@Orange2:~# systemctl status dietpi-ramlog -l
● dietpi-ramlog.service - DietPi-RAMlog
   Loaded: loaded (/etc/systemd/system/dietpi-ramlog.service; enabled)
   Active: failed (Result: exit-code) since Thu 2017-01-19 14:40:35 NZDT; 5min ago
  Process: 472 ExecStart=/bin/bash -c /boot/dietpi/dietpi-ramlog 0 (code=exited, status=2)

Jan 19 14:40:34 Orange2 bash[472]: /boot/dietpi/dietpi-ramlog: line 1: ------------------------: command not found
Jan 19 14:40:34 Orange2 bash[472]: /boot/dietpi/dietpi-ramlog: line 2: syntax error near unexpected token `}'
Jan 19 14:40:34 Orange2 bash[472]: /boot/dietpi/dietpi-ramlog: line 2: `}'
Jan 19 14:40:35 Orange2 systemd[1]: dietpi-ramlog.service: control process exited, code=exited status=2
Jan 19 14:40:35 Orange2 systemd[1]: Failed to start DietPi-RAMlog.
Jan 19 14:40:35 Orange2 systemd[1]: Unit dietpi-ramlog.service entered failed state.

John

Hi Fourdee,

I’m on a Rpi 2 Model B. I use Samsung’s SD, 64 Gb. My setup is headless, no X nor VNC. Dropbear, Subsonic plus a webserver stack with Lighttpd/MariaDB/Php. I also used to have smbd and nmbd running, but it seems no daemons are running anymore as they couldn’t be launched. I’m lucky that Dropbear is on at least!

root@jpi:~# dietpi-services
-bash: /DietPi/dietpi/dietpi-services: No such file or directory
root@jpi:~# /boot/dietpi/dietpi-services
sed: can't read /DietPi/dietpi/.hw_model: No such file or directory
/boot/dietpi/dietpi-services: line 144: /DietPi/dietpi/func/dietpi-notify: No such file or directory

DietPi-Services
Available commands: start / stop / restart / enable / disable

I’m not sure about the last command run before /DietPi disappeared, but it could have been after a restart upon update to the latest release. Now I can’t even run dietpi-update as the script seems to have been located in the missing folder. Here are my answers.


root@jpi:/boot# systemctl status dietpi-ramdisk -l
● dietpi-ramdisk.service - DietPi-RAMdisk
   Loaded: loaded (/etc/systemd/system/dietpi-ramdisk.service; enabled)
   Active: active (exited) since Tue 2017-01-17 11:03:02 CET; 1 day 21h ago

Jan 17 11:03:01 jpi systemd[1]: Starting DietPi-RAMdisk...
Jan 17 11:03:01 jpi bash[410]: DietPi-Ramdisk: Starting
Jan 17 11:03:01 jpi bash[410]: cp: cannot stat ‘/boot/boot.ini’: No such file or directory
Jan 17 11:03:01 jpi bash[410]: sed: can't read /DietPi/boot.ini: No such file or directory
Jan 17 11:03:01 jpi bash[410]: cp: cannot stat ‘/boot/uEnv.txt’: No such file or directory
Jan 17 11:03:01 jpi bash[410]: sed: can't read /DietPi/uEnv.txt: No such file or directory
Jan 17 11:03:02 jpi bash[410]: DietPi-Ramdisk: Completed
Jan 17 11:03:02 jpi systemd[1]: Started DietPi-RAMdisk.

I’ve removed commented lines from fstab:

root@jpi:/boot# cat /etc/fstab
#Internal Drives---------------------------------------------------
proc            /proc           proc    defaults                                                                                        0 0
/dev/mmcblk0p1  /boot           auto    defaults,noatime,discard                                                        0 2
/dev/mmcblk0p2  /               auto    defaults,noatime,discard                                                        0 1
tmpfs                   /tmp                    tmpfs   defaults,noatime,nodev,nosuid,mode=1777                         0 0
tmpfs                   /var/log                tmpfs   defaults,size=20m,noatime,nodev,nosuid,mode=1777  0 0
tmpfs                   /DietPi                 tmpfs   defaults,size=10m,noatime,nodev,nosuid,mode=1777        0 0

#External Drives---------------------------------------------------
#NB: Please use dietpi-drive_manager to setup and control your external drives.
/dev/sda1       /mnt/usb_1      auto     defaults,noatime,nofail,x-systemd.automount  0 0
/dev/sda2       /mnt/NAS        auto     defaults,noatime,nofail,x-systemd.automount  0 0

Permissions:

root@jpi:~# ls -lha /DietPi
total 4.0K
drwxrwxrwt  2 root root   40 Jan 17 13:01 .
drwxr-xr-x 20 root root 4.0K Nov  1 17:50 ..

Any ideas how to reach dietpi-software, dietpi-services (and others)? I’d like to get daemons up again, and I have another issue with MariaDB and would like to reinstall it.

Should I symlink /DietPi to /boot/dietpi? Or should I just use apt-get? (A bit worried this will break “integration” with DietPi packages I have installed such as PhpMyAdmin and Wordpress.)

Hi guys,

Thanks for the info and apologies for the issues. I’ve created a ticket for this and will start investigations:
https://github.com/Fourdee/DietPi/issues/719

Thanks John, this will give us something to debug for :slight_smile:

We may need to run some further tests on your systems (if permitting), but i’ll let you guys know once ready.

I’ve tested this a lot over the weekend and suspect that my problem was a flaky SD card. So far so good with a different one.

Is there a way to test SD cards that you suspect are faulty?

John

Hi John,

Does sound like a SD issue, i’ve still been unable to replicate this issue on various devices and SD cards.

As for finding out if SD is stable in a SBC environment, you’ll only know once filesystem based issues occur (eg: fsck recovery, I/O errors listed in dmesg etc).

From my experience, the following SD card has issues:

  • Transcend = IO errors on NanoPi Neo/AIR, intermittent on other devices

The following cards are highly recommended, never had an issue with any of them:

  • SanDisk
  • Verbatim

Hi all,

We’ve enabled debugging for v143, if you experience the issue of missing DietPi folder, please see here:
https://github.com/Fourdee/DietPi/issues/719#issuecomment-275921944

I had this problem today after running dietpi-update. Quite annoying, is there any way to recover the system or do I have to start again?

Symptoms:
[] This message displayed at login prompt: -bash: /DietPi/dietpi/login: No such file or directory
[
] /DietPi is empty
[*] None of the dietpi- commands are available


Device: RPi 3
Installed: kodi, mopidy, pihole, samba
Last command: dietpi-update, followed by reboot when prompted
PSU: A 2.4 A USB port on a power board (new)
SD card: Sandisk

fstab:

#Internal Drives---------------------------------------------------
proc            /proc           proc    defaults											0 0
/dev/mmcblk0p1  /boot           auto    defaults,noatime,discard							0 2
/dev/mmcblk0p2  /               auto    defaults,noatime,discard							0 1
tmpfs 			/tmp  			tmpfs 	defaults,noatime,nodev,nosuid,mode=1777				0 0
tmpfs 			/var/log 		tmpfs 	defaults,size=20m,noatime,nodev,nosuid,mode=1777	0 0
tmpfs 			/DietPi 		tmpfs 	defaults,size=10m,noatime,nodev,nosuid,mode=1777	0 0

#Samba Client------------------------------------------------------
//192.168.1.104/media /mnt/samba cifs username=XXXXX,password=XXXXX,_netdev,iocharset=utf8,sec=ntlm,nofail  0  0



root@DietPi:/DietPi# systemctl status dietpi-ramlog -l
● dietpi-ramlog.service - DietPi-RAMlog
   Loaded: loaded (/etc/systemd/system/dietpi-ramlog.service; enabled)
   Active: failed (Result: exit-code) since Mon 2017-01-30 17:00:33 AEDT; 21min ago
  Process: 452 ExecStart=/bin/bash -c /boot/dietpi/dietpi-ramlog 0 (code=exited, status=127)

Jan 30 17:00:33 DietPi bash[452]: /bin/bash: /boot/dietpi/dietpi-ramlog: No such file or directory
Jan 30 17:00:33 DietPi systemd[1]: dietpi-ramlog.service: control process exited, code=exited status=127
Jan 30 17:00:33 DietPi systemd[1]: Failed to start DietPi-RAMlog.
Jan 30 17:00:33 DietPi systemd[1]: Unit dietpi-ramlog.service entered failed state.



root@DietPi:/DietPi# cat /etc/dietpi/logs/dietpi-ramdisk.log
DietPi-Ramdisk: Already running
/bin/bash: /boot/dietpi/dietpi-ramdisk: No such file or directory

Hi,

Many thanks for the report and I apologise for the inconvenience.

We are still unsure as to the cause of this issue, however, with thanks to your report, we are working on a solution/prevention.
If you made a backup (dietpi-backup) of your system, prior to dietpi-update, you can restore back to the previous state before the issue occurred:

Grab the dietpi-backup script:

wget https://raw.githubusercontent.com/Fourdee/DietPi/master/dietpi/dietpi-backup -O /root/dietpi-backup
chmod +x /root/dietpi-backup

Run the script, find your previous backup, restore and reboot:

/root/dietpi-backup

Eagerly waiting for any news on this…
I have the same problem, with Orange Pi PC Plus, which worked just fine for a day (with several reboots) - until I booted it the next day :frowning:
Happened twice already, with two different SD cards, one Kingston, and one Sandisk.
Symptoms: once the Dietpi folder was completely empty, once there were enough files (apparently) missing to mess up the system and prevent services from starting (squeezelite & Logitech Media Server).
Once it happened after an update, but the other time I did not do any updates, just installed LMS and Squeezelite and rebooted 2-3 times, all was well, until on 4th reboot the services wouldn’t start, with the usual symptoms.
The power supply is ample (5V/3A), and works just fine…
Sorry, can’t provide more info, blanked the sd cards already, and waiting to see if there are any suggestions…
BTW, thanks for the wonderful distro and all the good work!

Hi,

Thanks for the report. We are working on this.

In the mean time, I highly recommend using dietpi-backup to create a backup of your system. Should this issue occur, this will offer a way to restore the system to a previous working state.

If the dietpi-backup command was not found, solution here to allow for restore:
https://dietpi.com/forum/t/dietpi-survey-information/32/1

Hi All,

If you experienced this issue, can you please also state how you wrote the DietPi image to SD card?

EG: Win32diskimager.exe

I’m certain that in my case it had nothing to do with SD card writer: on one SD card I used Win32Imager under Windows, but on another card I used “Etcher” SD card writer under Linux, just to be on the safe side, and to see if it makes any difference.
BTW, both SD card writers (Win32imager under Windows and Etcher under Linux) worked flawlessly, and with those SD cards the initial boot and setup went without a hitch…
So, in my case I think I can rule those out - it’s not an issue of SD card writing software… :frowning:

I use dd to write the image.

Hi All,

I’ve updated our images for the following devices:
https://dietpi.com#download

  • Odroid C2
  • RPi

The new images contain a possible fix and prevention of this issue. We need users who experienced the missing /DietPi folder to test these images, and report back results.

Thanks all.

Git ticket for reference:
https://github.com/Fourdee/DietPi/issues/719#issuecomment-277713852

Is there a chance that you’ll push those fixes so that they can be obtained by dietpi-upgrade (possibly with some --beta flag)? I’d like to test but am unwilling to reinstall the system once again. I have experienced the disappearing folder issue before, but for the last weeks it’s been running stable.

Thanks for your hard work!

Hi,

No worries.

The RPi attempted fix will be applied in DietPi v144 update. We couldnt find any issues with the image partitions, however, we did regenerate the image anyway just to be sure.

The Odroid C2 image was corrupted at image level. We had to re-generate the 1st partition of this image. So in this case, that would only be resolved with the new image.

this also happens to me, but I thought the problem was because of the USB drive goes into sleep mode after a while, and so it can only wake again if I reboot the system.

i use an orange pi pc (v1)

i have dietpi v.143 installed

i have the usb drive mounted through dietpi-drive-manager (/mnt/usb_1) and use it as part of the system for sickrage and such

i also have a problem with installing Kodi, I don’t understand how i can install it since it’s not available on the list of software :-/
i did it on my own and it doesn’t start properly (black screen) and the sound is all glitched

aaand when i startx , then the ssh server seems to stop and if i restart it manually it usually refuses the connection :-c

Hi,

GPU features (eg: Kodi, Desktop) are disabled on this board, the only boards we support for GPU are:

  • RPi (all)
  • Odroid (all)

Its mostly due to lack of stable driver/documentation for H3, and, with the H3 heat issues, GPU load ontop puts the CPU under excessive heat. Not recommended.