I created a backup and moved it over to a fresh installation of DietPi on a new faster SDCard. It restored and then when I reboot I get the following...

It will hang like this forever.
Fourdee wrote:John beat me too it lol
Looks like filesystem corruption.
A simple solution would be to clone the SD card.
Try using Win32diskimager image to:
- Read the SD card (old) image to a file
- Write the image to the SD card (new).
eg: https://computers.tutsplus.com/articles ... -mac-59294
Copy and paste all option, if needed:schmeckles22 wrote: Ahhhh that was my next optionI will write to new card and expand filesystem.
Thanks for the heads up guys.
Code: Select all
cat << _EOF_ > /etc/systemd/system/dietpi-fs_partition_resize.service
[Unit]
Description=dietpi-fs_partition_resize
Before=dietpi-ramdisk.service
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/bin/bash -c '/var/lib/dietpi/fs_partition_resize.sh | tee /var/tmp/dietpi/logs/fs_partition_resize.log'
StandardOutput=tty
[Install]
WantedBy=local-fs.target
_EOF_
systemctl daemon-reload
G_RUN_CMD systemctl enable dietpi-fs_partition_resize.service
cat << _EOF_ > /var/lib/dietpi/fs_partition_resize.sh
#!/bin/bash
systemctl disable dietpi-fs_partition_resize.service
systemctl enable dietpi-fs_expand.service
systemctl daemon-reload
sync
TARGET_PARTITION=0
TARGET_DEV=\$(findmnt / -o source -n)
# - MMCBLK[0-9]p[0-9] scrape
if [[ "\$TARGET_DEV" = *"mmcblk"* ]]; then
TARGET_DEV=\$(findmnt / -o source -n | sed 's/p[0-9]\$//')
TARGET_PARTITION=\$(findmnt / -o source -n | sed 's/.*p//')
# - Everything else scrape (eg: /dev/sdX[0-9])
else
TARGET_DEV=\$(findmnt / -o source -n | sed 's/[0-9]\$//')
TARGET_PARTITION=\$(findmnt / -o source -n | sed 's|/dev/sd.||')
fi
cat << _EOF_1 | fdisk \$TARGET_DEV
p
d
\$TARGET_PARTITION
n
p
\$TARGET_PARTITION
\$(parted \$TARGET_DEV -ms unit s p | grep ':ext4::;' | sed 's/:/ /g' | sed 's/s//g' | awk '{ print \$2 }')
p
w
_EOF_1
reboot
_EOF_
G_RUN_CMD chmod +x /var/lib/dietpi/fs_partition_resize.sh
G_DIETPI-NOTIFY 2 'Generating dietpi-fs_partition_expand for subsequent boot'
cat << _EOF_ > /etc/systemd/system/dietpi-fs_expand.service
[Unit]
Description=dietpi-fs_expand
Before=dietpi-ramdisk.service
[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/bin/bash -c "resize2fs \$(findmnt / -o source -n) &> /var/tmp/dietpi/logs/fs_expand.log; systemctl disable dietpi-fs_expand.service; systemctl daemon-reload"
StandardOutput=tty
[Install]
WantedBy=local-fs.target
_EOF_
systemctl daemon-reload
reboot