Does not reboot ODROID HC4 (RootFS on SSD)

I am using Odroid HC4 device with 1 SSD and 1 HDD.
Problem: device does not power on after reboot. If i unplug power and plug - boot OK.

Before reboot problem:
I have installed dietpi from on my microSD, data is on my HDD and everything was OK. Reboot was fast.
This week i install SATA SSD on my first slot and move my root filesystem to SSD, bootloader i left on microSD as described in this discussion:
[Tutorial] Odroid C4 rootfs on USB drive - Community Tutorials - DietPi Community Forum

As a result. My system boots from microSD and then load / from SSD drive.
But when i want to reboot, it is not work fine. System power off in about 5-10 minutes and does not ON while i unplug-plug power cable. After plugged in - system power on fine.

How to fix it?

I see another topic [SOLVED] Dietpi not reboot and disable RAMog.
Then i found in my logs problem with unmount my HDD (Toshiba) when rebooting.
There are another error, maybe the make sense.
There is system.journal:
download-2023.4.20_14.17.40-root-(DietPi).tar.gz - Google Drive

Reboot started from 13:47 and power unplug and plug(manual power OFF/ON) was at 13:58


# You can use "dietpi-drive_manager" to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.

tmpfs /tmp tmpfs size=2892M,noatime,lazytime,nodev,nosuid,mode=1777

# MISC: ecryptfs, vboxsf, glusterfs, mergerfs, bind, Btrfs subvolume

/var/swap none swap sw

UUID=aaf9712e-180a-4c3c-bc87-38d08bc5fdcf / ext4 noatime,lazytime,rw 0 1
UUID=9c1c0293-0c9a-4d0c-b344-e44b98a34a8a /mnt/sdcard ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount
UUID=38aee034-2b80-477f-984e-99b8bf8daff1 /mnt/Toshiba12 ext4 noatime,lazytime,rw,nofail,noauto,x-systemd.automount

lsblk -f

NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
└─sda1      ext4   1.0         aaf9712e-180a-4c3c-bc87-38d08bc5fdcf  102.8G     5% /
└─sdb1      ext4   1.0         38aee034-2b80-477f-984e-99b8bf8daff1    8.5T    22% /mnt/Toshiba12
└─mmcblk0p1 ext4   1.0         9c1c0293-0c9a-4d0c-b344-e44b98a34a8a   22.3G    20% /mnt/sdcard

/boot/dietpiEnv.txt → /mnt/sdcard/boot/dietpiEnv.txt

# The init system logs to the console defined last.
extraargs=net.ifnames=0 rootdelay=10
1 Like

@MichaIng , can you advise somethyng?

If unmounting the drive hangs, it should timeout after 90 seconds and then proceed with the shutdown. Good to find out why it hands, like some service which accesses it and is not stopped properly.

Actually, since the Odroid HC4 has an SPI flash, did you try to just boot from the SSD directly without SD card? Of course you’d need to flash petitboot (or another functional bootloader) to the SPI flash then: [SOLVED] How to restore Petitboot on HC-4 - ODROID

And you need to update the boot configs for it (we added petitboot support just a few versions ago):

G_EXEC sed -i '1i[main]' /boot/dietpiEnv.txt
G_EXEC curl -sSf '' -o /tmp/boot.cmd
G_EXEC sed -i '/^setenv overlay_error/a\
\n# petitboot workarounds\
setenv fdtfile "amlogic/meson-sm1-odroid-${variant}.dtb"\
setenv rootuuid "true"' /tmp/boot.cmd
G_EXEC sed -i '/env import/c\\tini main ${scriptaddr} || env import -t ${scriptaddr} ${filesize}' /tmp/boot.cmd
G_EXEC sed -i '/test -e/s/fixup.scr;/fixup.scr || test "${petitboot_active}" = "1";/' /tmp/boot.cmd
G_EXEC mkimage -C none -A arm64 -T script -d /tmp/boot.cmd /tmp/boot.scr
G_EXEC cp -a /boot/boot.cmd{,.bak}
G_EXEC cp -a /boot/boot.scr{,.bak}
G_EXEC mv /tmp/boot.cmd /boot/boot.cmd
G_EXEC mv /tmp/boot.scr /boot/boot.scr