DietPi folder empty

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: DietPi folder empty

Post by johnvick »

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

johnvick wrote: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)

    Code: Select all

    cat /etc/fstab
  • DietPi-RAMlog status

    Code: Select all

    systemctl status dietpi-ramlog -l
Thanks guys and apologies for the inconvenience.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: DietPi folder empty

Post by johnvick »

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

Code: Select all

#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

Code: Select all

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
qnx

Re: DietPi folder empty

Post by qnx »

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!

Code: Select all

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.

Code: Select all

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:

Code: Select all

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:

Code: Select all

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.)
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

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
johnvick wrote:Just happened again after shutdown now and move to different power socket in another room.
Thanks John, this will give us something to debug for :)

We may need to run some further tests on your systems (if permitting), but i'll let you guys know once ready.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: DietPi folder empty

Post by johnvick »

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

johnvick wrote: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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

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/issue ... -275921944
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
chunder

Re: DietPi folder empty

Post by chunder »

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:

Code: Select all

#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

Code: Select all

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.

Code: Select all

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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

chunder wrote: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?
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:

Code: Select all

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:

Code: Select all

/root/dietpi-backup
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply