DietPi-Login | Failed to load DietPi-Globals

Having issues with your DietPi installation, or, found a bug? Post it here.
acostas
Posts: 7
Joined: Thu Mar 21, 2019 12:09 pm

DietPi-Login | Failed to load DietPi-Globals

Post by acostas »

Hello,
After i made some updates today and tried to restart pihole i got this error on login:
I did some research but couldn't find a solution and i am not an expert.
Linux DietPi 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
-bash: /DietPi/dietpi/func/dietpi-globals: No such file or directory
[FAILED] DietPi-Login | Failed to load DietPi-Globals. Skipping DietPi login scripts...
[email protected]:~#

acostas
Posts: 7
Joined: Thu Mar 21, 2019 12:09 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by acostas »

So the DietPi folder is empty as i figured. I have a full backup in /mnt/dietpi-backup
Anyone can tell me how to restore the system from this backup? Should i do manually by copying the files to the DietPi ?

User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: DietPi-Login | Failed to load DietPi-Globals

Post by johnvick »

Did you create the backup with the dietpi-backup utilty?

If so run it again and select restore.

John

acostas
Posts: 7
Joined: Thu Mar 21, 2019 12:09 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by acostas »

johnvick wrote:
Mon Sep 09, 2019 10:52 am
Did you create the backup with the dietpi-backup utilty?

If so run it again and select restore.

John
yes i did with dietpi-backup but the problem now is that nothing of dietpi works

Code: Select all

-bash: /DietPi/dietpi/func/dietpi-globals: No such file or directory
[FAILED] DietPi-Login | Failed to load DietPi-Globals. Skipping DietPi login scripts...
[email protected]:~# dietpi-backup
-bash: dietpi-backup: command not found
[email protected]:~#

User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: DietPi-Login | Failed to load DietPi-Globals

Post by johnvick »

I'd clone the card and try copying the files manaully on the copy.

User avatar
MichaIng
Site Admin
Posts: 2199
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by MichaIng »

@acostas
Note that /DietPi is the RAMdisk mountpoint for some files/dirs in /boot, especially /boot/dietpi which are the DietPi scripts/programs.

In your case mounting the tmpfs or moving the DietPi scripts in place seems to have failed. Please paste:

Code: Select all

systemctl status DietPi.mount
tail /var/tmp/dietpi/logs/dietpi-ramdisk.log

acostas
Posts: 7
Joined: Thu Mar 21, 2019 12:09 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by acostas »

here is what I get:

Code: Select all

[email protected]:~# systemctl status DietPi.mount
● DietPi.mount - /DietPi
   Loaded: loaded (/etc/fstab; generated; vendor preset: enabled)
   Active: active (mounted) since Sat 2019-09-07 16:20:32 EEST; 3min
44s ago
    Where: /DietPi
     What: tmpfs
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 183 ExecMount=/bin/mount tmpfs /DietPi -t tmpfs -o defaults,size=10m,
noatime,nodev,nosuid,mode=1777 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/DietPi.mount

Sep 07 16:20:32 DietPi systemd[1]: Mounting /DietPi...
Sep 07 16:20:32 DietPi systemd[1]: Mounted /DietPi.

Code: Select all

[email protected]:~# tail /var/tmp/dietpi/logs/dietpi-ramdisk.log
Wed 17 Jul 13:57:40 EEST 2019 | DietPi-RAMdisk: Copying DietPi to RAM...
Wed 17 Jul 13:57:40 EEST 2019 | DietPi-RAMdisk: Copied DietPi to RAM.
Sun  4 Aug 20:17:07 EEST 2019 | DietPi-RAMdisk: Copying DietPi to RAM...
Sun  4 Aug 20:17:10 EEST 2019 | DietPi-RAMdisk: Copied DietPi to RAM.
Sat  7 Sep 15:31:12 EEST 2019 | DietPi-RAMdisk: Storing DietPi to disk...
Sat  7 Sep 15:31:12 EEST 2019 | DietPi-RAMdisk: Stored DietPi to disk.
Sat  7 Sep 15:31:16 EEST 2019 | DietPi-RAMdisk: Copying DietPi to RAM...
Sat  7 Sep 15:31:20 EEST 2019 | DietPi-RAMdisk: Copied DietPi to RAM.
Sat  7 Sep 16:20:31 EEST 2019 | DietPi-RAMdisk: Storing DietPi to disk...
Sat  7 Sep 16:20:32 EEST 2019 | DietPi-RAMdisk: Stored DietPi to disk.

acostas
Posts: 7
Joined: Thu Mar 21, 2019 12:09 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by acostas »

@MichaIng ok it seems that everything on SD card is read-only

Is there a way to fix this or i have to format the card?

User avatar
MichaIng
Site Admin
Posts: 2199
Joined: Sat Nov 18, 2017 6:21 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by MichaIng »

@acostas
Looks like, last log file entry is about storing scripts to disk on shutdown, but nothing about copying them to RAMdisk on boot, even that the DietPi tmpfs was mounted successfully.

If indeed SDcard is R/O, please check:
- dmesg for any probably helpful error logs.
- Run fsck -f /dev/mmcblk0p2 + fsck /dev/mmcblk0p1 to check for file systems errors and in case fix them. Not sure if fixing is possible, depends on if writing to SDcard is blocked/broken on hardware level or if its just a mount issue, e.g. the system remounts it as R/O automatically due to I/O errors.
- If fsck on the running system does not work, try it on an external Linux system. At best run it multiple times until no errors are found anymore, if fsck is able to fix them at least.
- Generally it is also a hint about how bad/of what kind the error is, if the SDcard can be mounted with R/W access on an external system or not.

If nothing helps, but you don't want to reflash, you could copy/backup the SDcard content, flash the new image, copy/overwrite content from the backup. But it is not the cleanest way and the image must match the same Debian version. If it's currently Stretch, you must use our luckily still available RPi Stretch legacy image: https://dietpi.com/downloads/images/legacy/

Seferi
Posts: 10
Joined: Mon Sep 23, 2019 4:07 pm

Re: DietPi-Login | Failed to load DietPi-Globals

Post by Seferi »

I'm having the same problem after doing 'pihole -up' via ssh. Failed to load dietpi-globals. And I dont have a backup. What should i do?

Post Reply