DietPi folder empty

Having issues with your DietPi installation, or, found a bug? Post it here.
Bernie V
Posts: 12
Joined: Thu Jan 05, 2017 8:07 pm

DietPi folder empty

Post by Bernie V »

Hi guys,

I use DietPi on my rpi 3 a few days. It's amazing!! Today i noticed that my DietPi folder in the root is empty.
The pi still working (Emby is installed on it) and after a reboot everhing seems to be normal. What can I do to recover the DietPi folder?

I noticed it after a reboot (see attachement)
I was on the latest version. I have a boot.bak folder with a full DietPi folder (before an update?).

Thx for tips!
Attachments
Knipsel.JPG
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

Bernie V wrote: I was on the latest version. I have a boot.bak folder with a full DietPi folder (before an update?).
Sounds like RPi bootloader upgrade is messing with the /boot folder

Whats the results of:

Code: Select all

ls -lha /boot
ls -lha /boot.bak # Assuming thats the location of the backed up folder
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.
Bernie V
Posts: 12
Joined: Thu Jan 05, 2017 8:07 pm

Re: DietPi folder empty

Post by Bernie V »

Hi, this is the output:root@VanDerMedMan:~# ls -lha /boot
total 22M
drwxr-xr-x 4 root root 16K Jan 1 1970 .
drwxr-xr-x 21 root root 4.0K Dec 26 19:52 ..
-rwxr-xr-x 1 root root 41 Dec 26 19:53 .firmware_revision
-rwxr-xr-x 1 root root 19K Dec 26 18:20 COPYING.linux
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0000.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0001.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0002.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0003.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0004.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0005.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0006.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0007.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0008.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0009.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0010.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0011.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0012.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0013.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0014.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0015.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0016.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0017.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0018.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0019.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0020.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0021.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0022.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0023.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0024.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0025.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0026.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0027.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0028.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0029.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0030.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0031.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0032.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0033.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0034.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0035.REC
-rwxr-xr-x 1 root root 24K Jan 1 1980 FSCK0036.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0037.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0038.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0039.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0040.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0041.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0042.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0043.REC
-rwxr-xr-x 1 root root 336K Jan 1 1980 FSCK0044.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0045.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0046.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0047.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0048.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0049.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0050.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0051.REC
-rwxr-xr-x 1 root root 24K Jan 1 1980 FSCK0052.REC
-rwxr-xr-x 1 root root 48K Jan 1 1980 FSCK0053.REC
-rwxr-xr-x 1 root root 136K Jan 1 1980 FSCK0054.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0055.REC
-rwxr-xr-x 1 root root 24K Jan 1 1980 FSCK0056.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0057.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0058.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0059.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0060.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0061.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0062.REC
-rwxr-xr-x 1 root root 40K Jan 1 1980 FSCK0063.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0064.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0065.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0066.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0067.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0068.REC
-rwxr-xr-x 1 root root 24K Jan 1 1980 FSCK0069.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0070.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0071.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0072.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0073.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0074.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0075.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0076.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0077.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0078.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0079.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0080.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0081.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0082.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0083.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0084.REC
-rwxr-xr-x 1 root root 40K Jan 1 1980 FSCK0085.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0086.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0087.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0088.REC
-rwxr-xr-x 1 root root 16K Jan 1 1980 FSCK0089.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0090.REC
-rwxr-xr-x 1 root root 8.0K Jan 1 1980 FSCK0091.REC
-rwxr-xr-x 1 root root 1.5K Dec 26 18:24 LICENCE.broadcom
-rwxr-xr-x 1 root root 19K Sep 23 15:53 LICENSE.oracle
-rwxr-xr-x 1 root root 6.5K Nov 1 17:50 README.md
drwxr-xr-x 2 root root 8.0K Dec 26 18:43 System Volume Information
-rwxr-xr-x 1 root root 14K Dec 26 19:53 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 14K Dec 26 19:53 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 14K Dec 26 19:53 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 15K Dec 26 19:53 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 16K Dec 26 19:53 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 15K Dec 26 19:53 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 18K Dec 26 19:52 bootcode.bin
-rwxr-xr-x 1 root root 136 Dec 26 18:28 cmdline.txt
-rwxr-xr-x 1 root root 2.1K Jan 3 20:36 config.txt
-rwxr-xr-x 1 root root 8.8K Jan 3 20:36 dietpi.txt
-rwxr-xr-x 1 root root 6.5K Dec 26 19:52 fixup.dat
-rwxr-xr-x 1 root root 2.5K Dec 26 19:52 fixup_cd.dat
-rwxr-xr-x 1 root root 9.6K Dec 26 19:52 fixup_db.dat
-rwxr-xr-x 1 root root 9.6K Dec 26 19:52 fixup_x.dat
-rwxr-xr-x 1 root root 145 Sep 23 15:53 issue.txt
-rwxr-xr-x 1 root root 4.0M Dec 26 19:53 kernel.img
-rwxr-xr-x 1 root root 4.1M Dec 26 19:52 kernel7.img
drwxr-xr-x 2 root root 8.0K Dec 26 18:24 overlays
-rwxr-xr-x 1 root root 2.7M Dec 26 19:52 start.elf
-rwxr-xr-x 1 root root 620K Dec 26 19:52 start_cd.elf
-rwxr-xr-x 1 root root 4.8M Dec 26 19:52 start_db.elf
-rwxr-xr-x 1 root root 3.8M Dec 26 19:52 start_x.elf
-----------------------------------------------------------------

root@VanDerMedMan:~# ls -lha /boot.bak
total 20M
drwxr-xr-x 5 root root 4.0K Dec 26 18:28 .
drwxr-xr-x 21 root root 4.0K Dec 26 19:52 ..
-rwxr-xr-x 1 root root 19K Dec 26 18:20 COPYING.linux
-rwxr-xr-x 1 root root 1.5K Dec 26 18:24 LICENCE.broadcom
-rwxr-xr-x 1 root root 19K Sep 23 15:53 LICENSE.oracle
-rwxr-xr-x 1 root root 6.5K Nov 1 17:50 README.md
drwxr-xr-x 2 root root 4.0K Dec 26 18:43 System Volume Information
-rwxr-xr-x 1 root root 14K Dec 26 18:20 bcm2708-rpi-b-plus.dtb
-rwxr-xr-x 1 root root 14K Dec 26 18:20 bcm2708-rpi-b.dtb
-rwxr-xr-x 1 root root 14K Dec 26 18:20 bcm2708-rpi-cm.dtb
-rwxr-xr-x 1 root root 15K Dec 26 18:20 bcm2709-rpi-2-b.dtb
-rwxr-xr-x 1 root root 16K Dec 26 18:20 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root root 15K Dec 26 18:20 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root root 18K Dec 26 18:24 bootcode.bin
-rwxr-xr-x 1 root root 136 Dec 26 18:28 cmdline.txt
-rwxr-xr-x 1 root root 2.0K Dec 26 17:57 config.txt
drwxr-xr-x 5 root root 4.0K Dec 26 17:57 dietpi
-rwxr-xr-x 1 root root 8.8K Dec 26 17:57 dietpi.txt
-rwxr-xr-x 1 root root 6.5K Dec 26 18:24 fixup.dat
-rwxr-xr-x 1 root root 2.5K Dec 26 18:24 fixup_cd.dat
-rwxr-xr-x 1 root root 9.6K Dec 26 18:24 fixup_db.dat
-rwxr-xr-x 1 root root 9.6K Dec 26 18:24 fixup_x.dat
-rwxr-xr-x 1 root root 145 Sep 23 15:53 issue.txt
-rwxr-xr-x 1 root root 4.0M Dec 26 18:20 kernel.img
-rwxr-xr-x 1 root root 4.1M Dec 26 18:20 kernel7.img
drwxr-xr-x 2 root root 4.0K Dec 26 18:24 overlays
-rwxr-xr-x 1 root root 2.7M Dec 26 18:24 start.elf
-rwxr-xr-x 1 root root 620K Dec 26 18:24 start_cd.elf
-rwxr-xr-x 1 root root 4.8M Dec 26 18:24 start_db.elf
-rwxr-xr-x 1 root root 3.8M Dec 26 18:24 start_x.elf

I tried to copy the content of /boot.bak/dietpi to /DietPi but after a reboot everything in DietPi folder is gone again.
If I copy the content and try first the dietp-config command before a reboot I get a permission error.
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

Hi Bernie,
FSCK0048.REC
This looks like a filesystem repair occurred. Possibility unstable PSU. Which SD card and PSU are you running at the moment?
Any power cuts your aware of?
tried to copy the content of /boot.bak/dietpi to /DietPi but after a reboot everything in DietPi folder is gone again.
If I copy the content and try first the dietp-config command before a reboot I get a permission error.
We should be able to recover it, but as above, I believe PSU/SD may be the fault here, and it may reoccur.
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 »

Bernie,

To restore the backed up bootfs:

Code: Select all

rm -R /boot/*
rm -R /DietPi/*
cp -R /boot.bak/* /boot/
cp -R /boot.bak/* /DietPi/
reboot
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.
Bernie V
Posts: 12
Joined: Thu Jan 05, 2017 8:07 pm

Re: DietPi folder empty

Post by Bernie V »

The SD card is new (10 days old) and there was no power failure. I have an official rpi power unit. (2,5A on 5,1V).

Thx for the lines! I will try this tomorrow and let you know how it was.

Regards!
Bernie V
Posts: 12
Joined: Thu Jan 05, 2017 8:07 pm

Re: DietPi folder empty

Post by Bernie V »

I tried it first with the DietPi folder to test and get this:

cp -R /boot.bak/* /DietPi/

cp: error writing '/DietPi/start.elf': No space left on device
cp: failed to extend '/DietPi/start.elf': No space left on device
cp: error writing '/DietPi/start_cd.elf': No space left on device
cp: failed to extend '/DietPi/start_cd.elf': No space left on device
cp: error writing '/DietPi/start_db.elf': No space left on device
cp: failed to extend '/DietPi/start_db.elf': No space left on device
cp: error writing '/DietPi/start_x.elf': No space left on device
cp: failed to extend '/DietPi/start_x.elf': No space left on device

The sd card is 64 gb size.
Bernie V
Posts: 12
Joined: Thu Jan 05, 2017 8:07 pm

Re: DietPi folder empty

Post by Bernie V »

df -Bm gives me

Filesystem 1M-blocks Used Available Use% Mounted o n
/dev/root 59887M 6986M 51056M 13% /
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: DietPi folder empty

Post by Fourdee »

Bernie V wrote:I tried it first with the DietPi folder to test and get this:

cp -R /boot.bak/* /DietPi/

cp: error writing '/DietPi/start.elf': No space left on device
cp: failed to extend '/DietPi/start.elf': No space left on device
cp: error writing '/DietPi/start_cd.elf': No space left on device
cp: failed to extend '/DietPi/start_cd.elf': No space left on device
cp: error writing '/DietPi/start_db.elf': No space left on device
cp: failed to extend '/DietPi/start_db.elf': No space left on device
cp: error writing '/DietPi/start_x.elf': No space left on device
cp: failed to extend '/DietPi/start_x.elf': No space left on device

The sd card is 64 gb size.
Hi Bernie,


Ah yes, we are copying some files we dont need and filling up the 10MB limit on RAMdisk. Please try this:

Code: Select all

rm -R /boot/*
rm -R /DietPi/*
cp -R /boot.bak/* /boot/

cp /boot.bak/config.txt /DietPi/
cp /boot.bak/dietpi.txt /DietPi/
cp /boot.bak/cmdline.txt /DietPi/
cp -R /boot.bak/dietpi /DietPi/

reboot
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 »

Bernie V wrote:The SD card is new (10 days old) and there was no power failure. I have an official rpi power unit. (2,5A on 5,1V).

Thx for the lines! I will try this tomorrow and let you know how it was.

Regards!
Thanks Bernie,

Which SD card brand and model are you using? (eg: Sandisk ultra 8GB)?
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