Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install from 6.18.14 to 6.20.6 Crashes #2488

Closed
blogabe opened this issue Feb 2, 2019 · 10 comments
Closed

Install from 6.18.14 to 6.20.6 Crashes #2488

blogabe opened this issue Feb 2, 2019 · 10 comments
Assignees
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@blogabe
Copy link

blogabe commented Feb 2, 2019

Fix for this issue: https://github.com/Fourdee/DietPi/issues/2488#issuecomment-459993647


Creating a bug report/issue

Required Information

  • DietPi version | cat /DietPi/dietpi/.version
    G_DIETPI_VERSION_CORE=6
    G_DIETPI_VERSION_SUB=18
    G_DIETPI_VERSION_RC=14
    G_GITBRANCH=master
    G_GITOWNER=Fourdee

  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
    9.6

  • Kernel version | uname -a
    Linux AlloDigiOneSignature 4.14.79-v7+ Letsencrypt supports Free Noip.com Dynamic DNS #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

  • SBC device | echo $G_HW_MODEL_DESCRIPTION or (EG: RPi3)
    RPi 3 Model B+ (armv7l)

  • Power supply used | (EG: 5V 1A RAVpower)
    5V 3.5A

  • SDcard used | (EG: SanDisk ultra)
    SanDisk Ultra

Steps to reproduce

  1. dietpit-update

Expected behaviour

  • Upgrade to 6.20.6

Actual behaviour

  • Failing to update. I don't recall what I saw after my first attempt, but I know it failed and dropped me at the prompt. Don't recall if it restarted or not.

Extra details

  • I see this message right before the prompt after everything has run, since the first failed attempt to upgrade, when I restart the Allo device:
    /DietPi/dietpi/login: line 151: ((: > 0 : syntax error: operand expected (error token is "> 0 ")
  • Now when I try to update, I get this message and the system locks up
DietPi-Update: chmod -R +x /DietPi /var/lib/dietpi/services /etc/cron.daily/dietpi
/etc/cron.hourly/dietpi /etc/profile.d/dietpi-*.sh
/etc/bashrc.d/dietpi-bash_completion.sh /etc/bashrc.d/dietpi-login.sh
/etc/bashrc.d/dietpi-posix-set-locale.sh /etc/bashrc.d/dietpi-ps1_kill_animation.sh
/etc/bashrc.d/dietpi-unsupported_terminal.sh
 - Exit code: 1
 - DietPi version: v6.18.14 (Fourdee/master) | HW_MODEL:3 | HW_ARCH:2 | DISTRO:4
 - Image creator: DietPi Core Team
 - Pre-image: Raspbian Lite

Log file contents:
chmod: cannot access '/etc/profile.d/dietpi-*.sh': No such file or directory



Unable to continue, DietPi-Update will now terminate.

Retry         : Re-run the last command that failed
DietPi-Config : Edit network, APT/NTP mirror settings etc

At this point, I the system locks up and I can't do anything (I'm ssh'ing into my Allo device) let alone select retry or cancel.

@b1n4ryj4n
Copy link

I had the same problem but sudo dietpit-update worked fine.

@blogabe
Copy link
Author

blogabe commented Feb 2, 2019

Unfortunately, I can't seem to connect to the device any longer through ssh.

@Fourdee
Copy link
Collaborator

Fourdee commented Feb 2, 2019

Hi,

Please try the following to resolve this issue:

mkdir -p /etc/profile.d
> /etc/profile.d/dietpi-debug.sh
dietpi-update 1 # Do NOT reboot when asked, do that later
rm  /etc/profile.d/dietpi-debug.sh
systemctl restart dietpi-ramdisk
sync
sleep 5
reboot

@Fourdee Fourdee added this to the v6.21 milestone Feb 2, 2019
@Fourdee
Copy link
Collaborator

Fourdee commented Feb 2, 2019

Notes:
Appears to be an issue with older dietpi-update script, current script has this code:

l_message='Set execute permissions for DietPi scripts' G_RUN_CMD chmod -R +x /DietPi/dietpi /var/lib/dietpi/services /etc/cron.*/dietpi

🈯️ DietPi_v6.20_RPi-ARMv6-Stretch.img matches above.

@Fourdee Fourdee added Known Issue 🐛 Solution available 🥂 Definite solution has been done and removed Investigating 🤔 labels Feb 2, 2019
@Fourdee Fourdee self-assigned this Feb 2, 2019
@blogabe
Copy link
Author

blogabe commented Feb 2, 2019

Hi,

Please try the following to resolve this issue:

mkdir -p /etc/profile.d
> /etc/profile.d/dietpi-debug.sh
dietpi-update
rm  /etc/profile.d/dietpi-debug.sh

That did it. Thanks, Dan. Up to date on 6.20.6.

@symbios24
Copy link

Hi After updating from 6.19 to 6.20 and reboot the system on a raspberry pi 3B it goes on an endless loop checking for update/s is this a known issue ?
another thing is after finished the update and rebooted the version is still 6.19 i did an update again and after reboot this thing happen with the loop.

@MichaIng
Copy link
Owner

MichaIng commented Feb 3, 2019

Obviously RAMdisk still fails to sync changes to disk in some cases. There are still reports about running v6.1[0-9] code after reboot and setting install stage to 2 not persistent.

No idea why, since with v6.20.6 dietpi-ramdisk.service explicitly waits for boot.mount and DietPi.mount to start, thus stops before them, and I was never able to replicate it stopping too late.

We could add a service restart to the patch part where we apply v6.20 before reboot is triggered, but we need to assure anyway that RAMdisk works as expected, otherwise later on this could produce errors again, not faced DietPi program settings etc.

It seems that an automated reboot is triggered in some cases during update, even that it shouldn't on non-first-run system.

@Venopsis
Copy link

Venopsis commented Feb 5, 2019

Hi,

Applied update from v6.19.7 to v6.20.6 and got error.

The update seemed to work properly and requested reboot at then end: done.

Now get this after logging:
/DietPi/dietpi/login: line 160: ((: > 0 : syntax error: operand expected (error token is "> 0 ")

And the system still propose to proceed update:
Run now to update DietPi (from v6.19.7 to v6.20.6)

If try to relaunch the update I got same error message as original post regarding missing files:
chmod: cannot access '/etc/profile.d/dietpi-*.sh': No such file or directory

Tried this below but I have no dietpi related files:
mkdir -p /etc/profile.d > /etc/profile.d/dietpi-debug.sh dietpi-update rm /etc/profile.d/dietpi-debug.sh

image

What can be done to try to fix this?

Except that the system seems to be working fine.

Thanks!

EDIT:

Tried dietpi-update 1 command from #2471 and now ...
image

EDIT 2:

Restarted the server and logged in using root user.

Completed the first launch setup without changing anything (checked nothing to install, etc) and confirmed.

Asked for reboot : done.

To be able to login back with dietpi user I had to use passwd command from root user.

Now everything seems fine:
image

@MichaIng
Copy link
Owner

MichaIng commented Feb 6, 2019

PR up to fix this issue, release as hotfix planned very soon: https://github.com/Fourdee/DietPi/pull/2509

@Fourdee
Copy link
Collaborator

Fourdee commented Feb 7, 2019

Completed, v6.21 released.

@Fourdee Fourdee closed this as completed Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

6 participants