DietPi Broken

Having issues with your DietPi installation, or, found a bug? Post it here.
Seferi
Posts: 16
Joined: Mon Sep 23, 2019 4:07 pm

Re: DietPi Broken

Post by Seferi »

sudo systemctl status dietpi-ramdisk.service

Code: Select all

● dietpi-ramdisk.service - DietPi-RAMdisk
   Loaded: loaded (/etc/systemd/system/dietpi-ramdisk.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019
-10-19 13:00:04 CEST; 38s ago
  Process: 769 ExecStartPre=/bin/mkdir -p /var/tmp/dietpi/logs (code=exited, status=0/SUCCESS)
  Process: 770 ExecStart=/bin/dash -c /boot/dietpi/func/dietpi-ramdisk 0 2>&1 >> /var/tmp/dietpi/logs/dietpi-ramdisk.log
(code=exited, status=2)
 Main PID: 770 (code=exited, status=2)

Oct 19 13:00:04 DietPi systemd[1]: Starting DietPi-RAMdisk...
Oct 19 13:00:04 DietPi dash[770]: /bin/dash: 1: /boot/dietpi/func/dietpi-ramdisk: Exec format error
Oct 19 13:00:04 DietPi systemd[1]: diet
pi-ramdisk.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 19 13:00:04 DietPi systemd[1]: diet
pi-ramdisk.service: Failed with result 'exit-code'.
Oct 19 13:00:04 DietPi systemd[1]: Fail
ed to start DietPi-RAMdisk.
User avatar
MichaIng
Site Admin
Posts: 2333
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi Broken

Post by MichaIng »

@Seferi
I have one idea, could you please try:

Code: Select all

sed -i $'s/\r$//' /boot/dietpi/func/dietpi-ramdisk
/boot/dietpi/func/dietpi-ramdisk 0
If that still fails, please paste:

Code: Select all

ls -l /boot/dietpi/func/dietpi-ramdisk
head -5 /boot/dietpi/func/dietpi-ramdisk
And since some output confuses me, could you verify /DietPi is correctly mounted as tmpfs:

Code: Select all

findmnt /DietPi
Seferi
Posts: 16
Joined: Mon Sep 23, 2019 4:07 pm

Re: DietPi Broken

Post by Seferi »

Code: Select all

Barry@DietPi:~ $ ls -l /boot/dietpi/func/dietpi-ramdisk
-rwxr-xr-x 1 root root 4306 Oct 19 14:09 /boot/dietpi/func/dietpi-ramdisk
Barry@DietPi:~ $ head -5 /boot/dietpi/func/dietpi-ramdisk   
Barry@DietPi:~ $ findmnt /DietPi
TARGET  SOURCE FSTYPE OPTIONS                                
  /DietPi tmpfs  tmpfs  rw,nosuid,nodev,noatime,size=10240k
Barry@DietPi:~ $
User avatar
MichaIng
Site Admin
Posts: 2333
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi Broken

Post by MichaIng »

@Seferi
Wow, head -5 /boot/dietpi/func/dietpi-ramdisk didn't output anything? I believe your SDcard is somehow damaged then. Strange that the meta data still shows a file size. What happens if you open the file in an editor? nano /boot/dietpi/func/dietpi-ramdisk.

Not sure how to fix best. We could do a last attempt to re-download all matching DietPi scripts to your SDcard and manually sync to RAMdisk, however high likely they will be damaged again after reboot or such. I am just wondering that neither systemd nor kernel (dmesg) reports any related errors :?.
Ah or did you actually already check it: dmesg | tail -10
Seferi
Posts: 16
Joined: Mon Sep 23, 2019 4:07 pm

Re: DietPi Broken

Post by Seferi »

Here is the dmesg output mate:

[620929.358025] systemd[1]: Detected architecture arm.
[620929.705095] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[620929.705134] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[620930.254821] systemd[1]: getty@tty1.service: Current command vanished from the unit file, execution of the command list won't be resumed.
[620930.888029] systemd-journald[104]: Received SIGTERM from PID 1 (systemd).
[620930.896879] systemd[1]: Stopping Journal Service...
[620930.901047] systemd[1]: systemd-journald.service: Succeeded.
[620930.904612] systemd[1]: Stopped Journal Service.
[620930.928448] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.
[620930.940447] systemd[1]: Starting Journal Service...


I'm probably gonna get a new sdcard if you think thats the problem. Sorry for the late reply.
Post Reply