Unable to boot into DietPi | Failed to load DietPi-Globals Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
sew3521
Posts: 9
Joined: Tue Apr 13, 2021 8:36 pm

Unable to boot into DietPi | Failed to load DietPi-Globals

Post by sew3521 »

I was unable to unmount a USB drive so I issued a reboot command to my Pi4 running DietPi. Now when I try booting I receive the error

Code: Select all

[FAILED] DietPi-Login | Failed to load DietPi-Globals. Skipping DietPi login scripts...
While trying to troubleshoot I stumbled upon someone a few years ago who had the same issues as I am having. viewtopic.php?t=6296

I receive the following info from the troubleshooting commands mentioned in the other thread
root@Pi-Hole4:~# systemctl status DietPi.mount
Unit DietPi.mount could not be found.
root@Pi-Hole4:~# tail /var/tmp/dietpi/logs/dietpi-ramdisk.log
Fri 17 Apr 12:14:02 CDT 2020 | DietPi-RAMdisk: Storing DietPi to disk...
Fri 17 Apr 12:14:02 CDT 2020 | DietPi-RAMdisk: Stored DietPi to disk.
Fri 17 Apr 12:14:03 CDT 2020 | DietPi-RAMdisk: Copying DietPi to RAM...
Fri 17 Apr 12:14:03 CDT 2020 | DietPi-RAMdisk: Copied DietPi to RAM.
Fri 24 Apr 00:17:02 CDT 2020 | DietPi-RAMdisk: Copying DietPi to RAM...
Fri 24 Apr 00:17:02 CDT 2020 | DietPi-RAMdisk: Copied DietPi to RAM.
Fri 1 May 16:56:02 CDT 2020 | DietPi-RAMdisk: Storing DietPi to disk...
Fri 1 May 16:56:02 CDT 2020 | DietPi-RAMdisk: Stored DietPi to disk.
Fri 1 May 16:56:03 CDT 2020 | DietPi-RAMdisk: Copying DietPi to RAM...
Fri 1 May 16:56:03 CDT 2020 | DietPi-RAMdisk: Copied DietPi to RAM.
I have attached the results of dmesg.

When I try to run "fsck -f /dev/mmcblk0p2" I get
root@Pi-Hole4:~# fsck -f /dev/mmcblk0p2
fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
/dev/mmcblk0p2 is mounted.
e2fsck: Cannot continue, aborting.
Here the the results of lsblk -f
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
mmcblk0
├─mmcblk0p1 vfat boot 5203-DB74
└─mmcblk0p2 ext4 rootfs 2ab3f8e1-7dc6-43f5-b0db-dd5759d51d4e 5.6G 76% /
My backup is over a year old so it I can save the system instead of restoring from the last DietPi backup that would be great. Thank you in advance for any help with this. If you need more information from me please let me know.
Attachments
fstab.txt
fstab file. I added .txt so I could attach it.
(1.28 KiB) Downloaded 7 times
DietPiBootError.txt
Results of dmesg
(18.76 KiB) Downloaded 8 times
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by Joulinar »

Hi,

you can place your SD card into another Linux box (if possible) and rerun fsck. This way you can check the partition without being mounted.

As well can you post ls -la /boot/dietpi/func/
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sew3521
Posts: 9
Joined: Tue Apr 13, 2021 8:36 pm

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by sew3521 »

Sorry about the delay in response.

Here is what happens when I run the ls command
root@Pi-Hole4:~# ls -la /boot/dietpi/func/
ls: cannot access '/boot/dietpi/func/': No such file or directory
It looks like the whole boot directory is empty.

I have attached the fsck results. The first time I ran the command it fixed a few errors, however when saving the output the live distro froze up on me and I lost the file.
Attachments
fsck Results.txt
FSCK Results
(836 Bytes) Downloaded 6 times
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by Joulinar »

hope there are not more data lost :?

let's check missing DietPi folder

Code: Select all

ls -la /
ls -la /boot
ls -la /boot/dietpi
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sew3521
Posts: 9
Joined: Tue Apr 13, 2021 8:36 pm

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by sew3521 »

Here is the results of those three commands
root@Pi-Hole4:~# ls -la /
total 76
drwxr-xr-x 21 root root 4096 Apr 13 14:26 .
drwxr-xr-x 21 root root 4096 Apr 13 14:26 ..
drwxr-xr-x 2 root root 4096 Apr 12 12:29 bin
drwxr-xr-x 2 root root 4096 Sep 25 2019 boot
drwxr-xr-x 15 root root 3440 Apr 13 14:30 dev
lrwxrwxrwx 1 root root 5 May 6 2020 DietPi -> /boot
drwxr-xr-x 75 root root 4096 Apr 13 14:30 etc
drwxr-xr-x 3 root root 4096 Jan 7 2020 home
drwxr-xr-x 17 root root 4096 Apr 1 2020 lib
drwx------ 2 root root 16384 Sep 25 2019 lost+found
drwxr-xr-x 2 root root 4096 Jul 6 2020 media
drwxr-xr-x 9 root root 4096 Apr 13 14:24 mnt
drwxr-xr-x 5 root root 4096 Apr 7 2020 opt
dr-xr-xr-x 145 root root 0 Dec 31 1969 proc
drwx------ 7 root root 4096 Apr 13 14:30 root
drwxr-xr-x 19 root root 600 Apr 13 14:38 run
drwxr-xr-x 2 root root 4096 Apr 12 12:30 sbin
drwxr-xr-x 2 root root 4096 Jan 7 2020 srv
dr-xr-xr-x 12 root root 0 Dec 31 1969 sys
drwxrwxrwt 7 root root 140 Apr 13 14:30 tmp
drwxr-xr-x 10 root root 4096 Jan 7 2020 usr
drwxr-xr-x 12 root root 4096 Mar 31 2020 var
root@Pi-Hole4:~# ls -la /boot
total 8
drwxr-xr-x 2 root root 4096 Sep 25 2019 .
drwxr-xr-x 21 root root 4096 Apr 13 14:26 ..
root@Pi-Hole4:~# ls -la /boot/dietpi
ls: cannot access '/boot/dietpi': No such file or directory
root@Pi-Hole4:~#
I have also attached an updated dmesg. Thank you for your assistance.

If this is a lost cause I can work on rebuilding the system. While it wont be fun it is possible. It is my own fault for not keeping my backups up to date on this device.
Attachments
dmesg.txt
Output of dmesg
(18.76 KiB) Downloaded 8 times
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by Joulinar »

hmm that's strange. It seems your /boot folder is completely empty and bootFS not being mounted correctly. Usually your system should not boot that way :?

Can you check lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

probably issue is on your fstab as it is missing the part for RootFS and BootFS. Can you share cat /etc/fstab. As well can you share fstab from your backup
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sew3521
Posts: 9
Joined: Tue Apr 13, 2021 8:36 pm

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by sew3521 »

Sure! Unfortunately I had to leave my house to run to my parents to help them with something. I'll post a reply in a few hours with the requested information. I apologize about the delay and really appreciate all of your assistance.
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by Joulinar »

no hurry, it's 1am at my side. will end up my day for now :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sew3521
Posts: 9
Joined: Tue Apr 13, 2021 8:36 pm

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by sew3521 »

Sorry again about the delayed response. I hope you're getting some rest now, it sounds like it is pretty late where you are! I think this is all of the information you want. If there is more information you need please let me know and I will gladly post it. I really appreciate all of your help, thank you so much!

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

Code: Select all

root@Pi-Hole4:~# lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
NAME        FSTYPE LABEL   SIZE RO TYPE MOUNTPOINT PARTUUID                             UUID
mmcblk0                   28.9G  0 disk                                                 
├─mmcblk0p1 vfat   boot    256M  0 part            6c586e13-01                          5203-DB74
└─mmcblk0p2 ext4   rootfs 28.6G  0 part /          6c586e13-02                          2ab3f8e1-7dc6-43f5-b0db-dd5759d51d4e
cat /etc/fstab

Code: Select all

root@Pi-Hole4:~# cat /etc/fstab
# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------


#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1024M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
#UUID=5203-DB74 /mnt/5203-DB74 vfat noatime,lazytime,rw,nofail,noauto,x-systemd.automount
#UUID=2ab3f8e1-7dc6-43f5-b0db-dd5759d51d4e /mnt/2ab3f8e1-7dc6-43f5-b0db-dd5759d51d4e ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
As well can you share fstab from your backup

Code: Select all

root@Pi-Hole4:/mnt/dietpi-backup/data/etc# cat fstab
# Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------


#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1024M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------


#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
PARTUUID=6c586e13-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=6c586e13-01 /boot vfat noatime,lazytime,rw 0 2
/var/swap none swap sw 0 0
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to boot into DietPi | Failed to load DietPi-Globals

Post by Joulinar »

ok you are missing 2 lines in your current fstab.

pls can you add the following at the end of the file into PHYSICAL DRIVES section and do a reboot

Code: Select all

PARTUUID=6c586e13-02 / ext4 noatime,lazytime,rw 0 1
PARTUUID=6c586e13-01 /boot vfat noatime,lazytime,rw 0 2
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply