[SOLVED] Unable to install DietPi on Odroid XU4

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Ralfono
Posts: 5
Joined: Wed Jan 30, 2019 8:33 pm

[SOLVED] Unable to install DietPi on Odroid XU4

Post by Ralfono »

Hello!

I have an issue with setting up my Odroid XU4: After flashing the DietPi Image onto the eMMC-Module the Odroid will boot from the boot-Partition, where I can decide which settings and dietpi-software should be installed. But always when I finish this setup (where there stands "This will complete the installation.") it reboots but from the boot-Partition again! So I always end up in the setup like an infinite loop. I tried 4 different flashing software and also a micro-SD-card instead of the eMMC-Module, but this change nothing on this problem. As a result, my changes won't affect anything, probably because the actual OS is on the other partition (I can see how this other partition gets more written as I do the installation again and again).

Hopefully I just make a simple, stupid mistake. :?

Thanks in advance,

Ralfono
Last edited by Ralfono on Sat Feb 02, 2019 2:33 am, edited 1 time in total.
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unable to install DietPi on Odroid XU4

Post by MichaIng »

Thanks for your report.

The setup is done on the regular boot partition, whether to start into first run setup or not is decided based on a flag file: /DietPi/dietpi/.install_stage (RAMdisk) and on offline image it's on the first partition in /dietpi/.install_stage.

There seems to be an issue that when having the first run setup done, the flag file is not correctly set or does not survive reboot. We had an issue where this was possible due to a RAMdisk service change, but that was actually solved with v6.20.6.
Just to be sure, your loop happened just today, so DietPi was updating to v6.20.6, right?

At least, that you end up in dietpi-software means that the .install_stage file already was successfully set to 1 after first run update (to v6.20.6).

In the following code snipped, the value should be set to 2 after having first run setup done before rebooting: https://github.com/Fourdee/DietPi/blob/ ... 898-L14900
The next login should not open dietpi-software anymore then.

Please try the following, when dietpi-software prompts:
- Exit it (ignore some warning that first run setup should be done or such)
- Run: dietpi-software list
- Check the software ID/index of the one (or ones) that you want to install
- Then run e.g.: dietpi-software install 83 114, changing the numbers according to the software IDs you want to install (those two are Apache webserver and Nextcloud).

This disables the automated reboot after the setup is done.
When this has finished, can you please paste the following output:

Code: Select all

cat /etc/systemd/system/dietpi-ramdisk
cat /DietPi/dietpi/.install_stage
cat /DietPi/dietpi/.update_stage
If you want to reboot, to be failsafe, run first:

Code: Select all

dietpi-services stop
systemctl restart dietpi-ramdisk
cat /boot/dietpi/.install_stage # Verify that is is really 2 now...
reboot
Ralfono
Posts: 5
Joined: Wed Jan 30, 2019 8:33 pm

Re: Unable to install DietPi on Odroid XU4

Post by Ralfono »

Okay thank you for the fast response.

I made a VERY detailed and long answer with every step I did, but somehow it seems that I took too long for that so my reply couldn't be submitted.

Instead of writing it again, I make it short: : :-|

- Downloaded https://dietpi.com/downloads/images/Die ... Stretch.7z
- With Image file: DietPi_v6.14_OdroidXU4-ARMv7-Stretch
- Flashed it with balenaEtcher to eMMC
- Logged in with default, made some changes in dietpi-config and selected dietpi-software 47 115 and 90 and installed it
- Then it rebooted and I exited the dietpi-Software and followed your steps
- Installation got some error messages (*see attachments*)
- Executed your Code (*see attachments*)

Hopefully this is enough... the next time I will save my reply externally before submitting it. It took me almost 3 hours to do all these steps and writing it carefully down what I did.

Is there a new image file available with the version v6.20.6 ?
Attachments
IMG_20190131_133657.jpg
IMG_20190131_133004.jpg
234234234.jpg
32423423.jpg
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: Unable to install DietPi on Odroid XU4

Post by MichaIng »

Did you need to cancel the install upon the above error message or did a retry work to finish the setup?

If you needed to cancel, please try to skip ownCloud install and do this after first run installs/setup have finished.
I will check this weekend what went wrong with ownCloud, perhaps they changed something with latest release.

If retry worked to successfully finished the whole install run, please try to manually set install state to 2:
echo 2 > /DietPi/dietpi/.install_state
systemctl restart dietpi-ramdisk

On the first cat command I missed the file ending. It should have been:
cat /etc/systemd/system/dietpi-ramdisk.service
Ralfono
Posts: 5
Joined: Wed Jan 30, 2019 8:33 pm

Re: Unable to install DietPi on Odroid XU4

Post by Ralfono »

On the first run owncloud installed properly (dietpi-software dialog) and after the reboot I exited dietpi-software and installed owncloud via dietpi-software install command (again?). Maybe this caused the error message.

I tried your last command again, see screenshot below.

Shall I try to flash it again with a fresh image, then install everything via dietpi-software and let it reboot, then exit dietpi-software and manually set the installation stage to 2 or even update the version to 6.20 ?
Attachments
3121.jpg
Ralfono
Posts: 5
Joined: Wed Jan 30, 2019 8:33 pm

Re: Unable to install DietPi on Odroid XU4

Post by Ralfono »

Update: Now I was able to make everything work with your help.

I installed everything as usual with dietpi-software and then set the installation stage flag to 2 manually, rebooted and also updated to v6.20. I still don't know why the flag couldn't be set to 2 by itself, tough.

Thanks again for your quick response and helping me. You and the devs deserve much respect.
dmist
Posts: 1
Joined: Mon Feb 04, 2019 4:05 pm

Re: [SOLVED] Unable to install DietPi on Odroid XU4

Post by dmist »

Thanks for sharing the information on this page.
I have an Odroid C2 and was also trapped into an infinite loop of installations/reboots.

In order to solve this I manually updated /boot/dietpi/.install_stage to 2 (updating /DietPi/dietpi/.install_stage did nothing).
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: [SOLVED] Unable to install DietPi on Odroid XU4

Post by MichaIng »

Okay great it worked. We made further deep research about the update/install loop and finally think we found the reason, and can release a fix soon. However does not affect you, if you managed to update with above workaround.

Good that as well ownCloud installed without issue. Just made a quick test here and as well didn't face an SQLSTATE error.
Post Reply