Latest Odroid XU3/XU4/MC1/HC1/HC2 image fails to install - filesystem not expanded

Just downloaded the Odroid XU3/XU4/MC1/HC1/HC2 image and it fails during installation’s first step with this message on my Odroid HC1. I’m using serial port to watch the install so I can see the boot text.

┌───────────────────────────────┤ DietPi-Login ├───────────────────────────────┐
│                                                                              │
│ [FAILED] Unknown install state/First run setup failed                        │
│                                                                              │
│ An error has occurred either during first run update or installs.            │
│                                                                              │
│ First run setup will now attempt to re-apply the last step, forced as        │
│ interactive run.                                                             │
│ If this repeatedly fails, please collect all terminal output and the content │
│ of /var/tmp/dietpi/logs/dietpi-firstrun-setup.log if available and report    │
│ this issue to: https://github.com/MichaIng/DietPi/issues                     │
│                                                                              │
│ Would you like to restart the first run setup and installation?              │
│                                                                              │
│                     <Ok>                         <Cancel>                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

By pressing Ok, this message repeats.
There are few logs in /var/tmp/dietpi/logs/ folder, but all of them are empty.
if I run apt update, I’m getting

Reading package lists... Done
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)

Launched dietpi-software and got this:

root@DietPi:/var/tmp/dietpi/logs# dietpi-software
/boot/dietpi/dietpi-software: line 196: ((: < 6 : syntax error: operand expected (error token is "< 6 ")
/boot/dietpi/dietpi-software: line 200: ((: > 6 : syntax error: operand expected (error token is "> 6 ")
/boot/dietpi/dietpi-software: line 17283: ((: == 2 : syntax error: operand expected (error token is "== 2 ")
[.     ]/boot/dietpi/dietpi-software: line 526: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
/boot/dietpi/dietpi-software: line 682: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
/boot/dietpi/dietpi-software: line 690: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
/boot/dietpi/dietpi-software: line 699: ((: == 10 : syntax error: operand expected (error token is "== 10 ")
/boot/dietpi/dietpi-software: line 701: ((: < 3 : syntax error: operand expected (error token is "< 3 ")
/boot/dietpi/dietpi-software: line 708: ((: == 1 : syntax error: operand expected (error token is "== 1 ")
/boot/dietpi/dietpi-software: line 911: ((: == 2 : syntax error: operand expected (error token is "== 2 ")
/boot/dietpi/dietpi-software: line 1193: ((: > 9 : syntax error: operand expected (error token is "> 9 ")
 ..     /boot/dietpi/dietpi-software: line 1498: ((: < 3 : syntax error: operand expected (error token is "< 3 ")
/boot/dietpi/dietpi-software: line 1770: ((: < 6 : syntax error: operand expected (error token is "< 6 ")
/boot/dietpi/dietpi-software: line 1779: ((: < 6 : syntax error: operand expected (error token is "< 6 ")
[  OK  ] DietPi-Software | Initialised database
/boot/dietpi/dietpi-software: line 17306: ((: == 2 : syntax error: operand expected (error token is "== 2 ")

 DietPi-Software
─────────────────────────────────────────────────────
 Step: Applying initial first run setup steps

E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (28: No space left on device)

No space on disk? Ok, df -h gives me this:

root@DietPi:/var/tmp/dietpi/logs# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            927M     0  927M   0% /dev
tmpfs           200M  4.4M  195M   3% /run
/dev/mmcblk1p1  425M  425M     0 100% /
tmpfs           996M     0  996M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           996M     0  996M   0% /tmp
tmpfs            50M  8.0K   50M   1% /var/log

So / partition too small. I used dietpi-drive_manager and expanded the partition to max. After that the setup complained that it has no network connection, had to go to network settings, enable the network, then go to the terminal and run apt update to be able to finish the installation.

So looks like filesystem is not expanded during first boot and the installation is failing on this image.

Also found that dropbear can’t be installed:

[ INFO ] DietPi-Software | APT install for: dropbear, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package dropbear
[FAILED] DietPi-Software | APT install for: dropbear

hmm without logs available in /var/tmp/dietpi/logs, we don’t know what happen during first install. The resize process is logged into fs_partition_resize.log usually :thinking:

But I see quite a lot of syntax errors on your try to open dietpi-software. Maybe the attempt to write SD card faild or was inocrrectly done?

Will try another card, maybe something happened to this one, but I have used it on my camera too, had no problems. Used Balena Etcher to write image.

As an alternative, try Rufus

Tried 2 cards and the same problem, found this in boot log:

[   10.408746] EXT4-fs error (device mmcblk1p1): ext4_validate_block_bitmap:384: comm kworker/u16:2: bg 3: bad block bitmap checksum
[   10.423323] EXT4-fs (mmcblk1p1): Delayed block allocation failed for inode 27 at logical offset 0 with max blocks 1 with error 74
[   10.433541] EXT4-fs (mmcblk1p1): This should not happen!! Data will be lost
[   11.798489] EXT4-fs warning (device mmcblk1p1): ext4_resize_begin:83: There are errors in the filesystem, so online resizing is not allowed

Maybe will try on rufus on windows as I’m on mac. After Etcher update I can’t even get to the error message, boot just puts me into shell.

Yeah, used Windows and Etcher and now the image works fine. Must be something with my Mac and Paragon ext4 application, maybe it’s damaging something.

Still a shame that there is no native ext4 support on Windows as well as on MacOS :frowning: