6.22.3 upd on NUC Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

6.22.3 upd on NUC

Post by Diophantus »

I have used other DietPi images before the 6.22.3 update on RPiv3 B+ and x86 including VMs but this one is making me pull my hair out.

With a 6.2 x86 image I can successfully flash a SD card, boot to it on a Intel NUC NUC5i3RYB. Once setup kicks off it will go and apply updates and then goes to DietPi-Software. It will not allow me to go to a command line. If rebooted I receive the message of the following:

mv:
cannot stat '/tmp/dietpi-*.log'
: No such file or directory
===================================
DietPi v6.2.2 : current date/time
===================================
default login blah
blah blah

and a login prompt

At this point if I login it goes to the DietPi-Software screen and I can look everything and it appears to function. I can not exit and go back to a login prompt. If I SSH into it and leave the prompt at login (on the console). It will only allow me to go to the software screen. Ctrl+C does nothing and you can not exit the software screen.

I also get alot of the NTPD: Waiting for completion of systemd-timesyncd and it has connections to the internet.

It's like it doesn't finish the install or update. I can re-flash the card and repeat these steps over (at least twice now).

Suggestions? Thanks!
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: 6.22.3 upd on NUC

Post by MichaIng »

Jep indeed existing DietPi-Software is currently not possible without selecting "Go >> Install" to finish first run setup.

Hmm yeah perhaps we should offer to exit first run setup even that it has not yet finished, at least until next login. But might I ask why you want to exit it? Simply running "Go >> Install" should not hurt and it as well verifies correct time sync then.
cannot stat '/tmp/dietpi-*.log'
: No such file or directory
===================================
DietPi v6.2.2 : current date/time
===================================
- This indeed looks strange. When dietpi-software prompt has been reached, the first run update should have finished already thus version should be 6.22.3. Also the prior running boot scripts should create logs files that were not found here.

So please run "Go >> Install" to finish first run setup on whichever screen/SSH you log in first. If this somehow does fails, report back. If it succeeds please verify that the DietPi banner indeed shows v6.22.3, otherwise something went wrong with the first run update.

Paste then:

Code: Select all

cat /DietPi/dietpi/.version
systemctl status dietpi-preboot
systemctl status dietpi boot
cat /var/tmp/dietpi/logs/dietpi-ramdisk.log
cat /var/tmp/dietpi/logs/dietpi-firstrun-setup.log
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

Re: 6.22.3 upd on NUC

Post by Diophantus »

Sorry for just now responding MichaIng, this PC is at work and didn't have my hands on it.

The reason why i want to exit it was just for troubleshooting purposes. As I could not run any commands such as dietpi-config or dietpi-launcher or htop from a command line after logging in with no autostart turned on.

I have tried the Go >>> Install and when I select that the screen just flashes. I have attempted on another SD card a reflash just incase something got corrupted. The same thing has happened. I can login at first install step. It will download the new updated scripts and reboot. It will then update and reboot. I am then taken to the login where it will display the cannot stat '/tmp/dietpi-*.log' : No such file or directory. If I login it will do DietPi-Run_NTPD. This will state the time sync has not completed or failed.

Then I have the options of Retry, change the NTP mirror...
If I select "Override", it will then put me into DietPi-Software (which I can not escape from). This is the loop.
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

Re: 6.22.3 upd on NUC

Post by Diophantus »

I have installed Samba and it installed fine rebooted. At the login screen I used putty and got the message of:

DietPi-Login | DietPi-Software is already running on another terminal/screen...
Did a Ctrl+C and got a prompt.

Ran the following commands with their output:

cat /DietPi/dietpi/.version

#!/bin/bash
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=2
G_DIETPI_VERSION_RC=2
G_GITBRANCH=master
G_GITOWNER=MichaIng
========================

systemctl status dietpi-preboot

Unit dietpi-preboot.service could not be found.
=========================================

systemctl status dietpi boot
Unit dietpi.service could not be found.
Unit boot.service could not be found.
==========================================

cat /var/tmp/dietpi/logs/dietpi-ramdisk.log
Mon 1 Apr 15:56:10 BST 2019 | DietPi-Ramdisk: Stopping
Mon 1 Apr 15:56:11 BST 2019 | DietPi-Ramdisk: Completed
Mon 1 Apr 15:56:12 BST 2019 | DietPi-Ramdisk: Starting
Mon 1 Apr 15:56:12 BST 2019 | DietPi-Ramdisk: Completed
Mon 1 Apr 16:29:12 BST 2019 | DietPi-Ramdisk: Stopping
Mon 1 Apr 16:29:12 BST 2019 | DietPi-Ramdisk: Completed
Mon 1 Apr 16:29:13 BST 2019 | DietPi-Ramdisk: Starting
Mon 1 Apr 16:29:13 BST 2019 | DietPi-Ramdisk: Completed
=====================================================

cat /var/tmp/dietpi/logs/dietpi-firstrun-setup.log

*clears the screen* no other prompt below it.
================================================

cat /DietPi/dietpi/.install_stage
0
==============================
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: 6.22.3 upd on NUC

Post by MichaIng »

Okay I really need to update our x86 image, however I checked and tried to follow the update path:
  • First boot/login: DietPi-Software prompts. Choosing "Install" will run DietPi-Update after doing some basic setup and checking internet connection + NTP state.
  • DietPi-Update will download the current code and run the patch_file.
  • The patch_file recognizes the old versioning system and applies the new one and to load the new updater code force a reboot.
  • And there is the issue now. Newly added DietPi boot services have not been enabled since incremental patches run AFTER reboot has been done. But these services need to start before new first run setup launches correctly. Also the old login scripts run instead of the new one.
  • So we need to allow the old DietPi-Update version (that runs on first boot) to apply all incremental patches before doing the reboot.
Let me set up a dedicated repo for this to test. Hang on...
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: 6.22.3 upd on NUC

Post by MichaIng »

@Diophantus
Okay I reworked the way we apply the new update system in a way that incremental system patches run first and reboot is done afterwards to load new first run prompt. It was the other way round which leads to actually several potential issues (based on the image version) which explains as well other reports.

Please try the following:

Code: Select all

sed -i '/^[[:blank:]]*DEV_GITBRANCH=/c\DEV_GITBRANCH=update_fix' /DietPi/dietpi.txt
rm -R /tmp/DietPi*
> /DietPi/dietpi/.update_stage
echo 0 > /DietPi/dietpi/install_stage
dietpi-update 1
This should apply the update with all incremental patches up from v6.2 and force a reboot afterwards. After reboot you should again land inside DietPi-Software prompt but this time it should work to choose "Install". I am pretty sure that the issues you faced were due to the missing incremental system patches (your system still on v6.2 while only the DietPi scripts code is new).

When successfully finished revert to master branch (I will merge the fix then as well):

Code: Select all

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /DietPi/dietpi.txt
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

Re: 6.22.3 upd on NUC

Post by Diophantus »

When I ran these commands here is what happens:

Code: Select all

root@DietPi:~# sed -i '/^[[:blank:]]*DEV_GITBRANCH=/c\DEV_GITBRANCH=update_fix' /DietPi/dietpi.txt
root@DietPi:~# rm -R /tmp/DietPi*
rm: cannot remove '/tmp/DietPi*': No such file or directory
root@DietPi:~# > /DietPi/dietpi/.update_stage
root@DietPi:~# echo 0 > /DietPi/dietpi/install_stage
root@DietPi:~# dietpi-update 1
-bash: dietpi-update: command not found
After the first command it will just return me to a prompt. No errors so success.
I have reflashed the image and tried it again and still the same step.

So how I'm doing this is the following. After the first boot setup runs and asks me to reboot which it does for 6.2. It will then apply 6.2.2. When it reboots again I then leave the console at the prompt and open a SSH terminal (putty). I login as root, and must hit Ctrl+C immediately to have access to a command line. Those commands above were taken from putty with the output.
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

Re: 6.22.3 upd on NUC

Post by Diophantus »

MichaIng wrote: Mon Apr 01, 2019 10:11 pm Okay I really need to update our x86 image, however I checked and tried to follow the update path:
  • First boot/login: DietPi-Software prompts. Choosing "Install" will run DietPi-Update after doing some basic setup and checking internet connection + NTP state.
This doesn't happen for me. When you get to first time run of DietPi-Software screen you can't exit out of it. If you press Go >> Install nothing happens.
User avatar
MichaIng
Site Admin
Posts: 2281
Joined: Sat Nov 18, 2017 6:21 pm

Re: 6.22.3 upd on NUC

Post by MichaIng »

Ah sorry didn't think about that globals/aliases are not loaded. Please redo the above steps with /DietPi/dietpi/dietpi-update 1 as last.
Diophantus
Posts: 9
Joined: Fri Mar 29, 2019 6:53 pm

Re: 6.22.3 upd on NUC

Post by Diophantus »

Thanks MichaIng!!!!!

It is now working and updated. The commands were as follows:

Code: Select all

sed -i '/^[[:blank:]]*DEV_GITBRANCH=/c\DEV_GITBRANCH=update_fix' /DietPi/dietpi.txt
rm -R /tmp/DietPi*
> /DietPi/dietpi/.update_stage
echo 0 > /DietPi/dietpi/install_stage
/DietPi/dietpi/dietpi-update 1
After updating and a reboot I ran the command:

Code: Select all

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=master' /DietPi/dietpi.txt
Post Reply