Help! updated to Blynk 0.20.1 now Raspberry Pi boots to "Emergency mode"

i have Raspberry Pi Zero with NOOBS operating system i just downloaded the new Blynk server.jar

then ran the new server

then changed the crontab to the new server

then rebooted

and it went to emergency mode :frowning:

in the start up it showed a few fails, including something about “failed to mount /boot” and system-random-seed.service failure

how can i recover my Blynk server?!

i dont have another linux machine available…

i used DiskInternals Linux Reader and got my Blynk folder out of the SD card and then created a new Raspberry Pi server, then copied the Blynk folder & Blynk server.jar across and it worked first go…

1 Like

@Dave1829
I renamed the .jar file in my installation folder to “server.jar”.
So for updating the server I just have to replace the old file with the new one and reboot.
To keep in mind which version I’m on I keep the file with the original name one folder above.

Maybe this could make things easier for you :wink:

1 Like

Thanks!

It was already pretty easy but this will definitely reduce the risk of clumsy fingers mistakes!

Instead of that, make a symlink to it, that way you still can see the original file version :slight_smile:

Update script, save it in the blynk folder and call it update.sh, chmod +x update.sh to make it executable. It works on my Pi. Change the BASE variable to your Blynk folder (where the server-x.xx.x.jar file is).

#!/bin/bash
#
# Update script for Blynk Server on Linux-like systems.
# This script relies on the use of curl for fetching Blynk.jar file
# It also has a reference to "blynk.sh", which is my start script.
#
# My blynk.sh script refers to "server.jar" which is a symbolic link
# to the actual server.jar file. That way it's easy to use in startup
# routines etc.
#
# You can change the variables to your local situation (mine is a Raspberry
# Pi with OpenELEC, hence the Storage path).
#
# This is a really dirty script, it doesn't do RegEx, but just assumes
# that the URL for GitHub will always be the same length (which it
# probably will).

#----------------------------------------------------------
# BEGIN User variables, change these to your situation
#----------------------------------------------------------

# Base path to your Blynk server.jar file
BASE=/storage/blynk

# Startup script name (full path)
STARTUP="$BASE/blynk.sh"

# The symlink used in blynk.sh startup file (full path)
SYMLINK="$BASE/server.jar"

#----------------------------------------------------------
# END USER VARIABLES, change below only if you are sure
# about it ;-)
#----------------------------------------------------------

URL=https://github.com/blynkkk/blynk-server/releases/latest
REDIRECT=`curl $URL`
LATESTVERSION=${REDIRECT:89:6}
DOWNLOAD="http://github.com/blynkkk/blynk-server/releases/download/v$LATESTVERSION/server-$LATESTVERSION.jar"

CURRENT=`readlink $SYMLINK`
CURRENTVERSION=${CURRENT:7:6}

echo "### Current version from Symlink ###"
echo $CURRENTVERSION

echo "### New Version ###"
echo $LATESTVERSION

if [ $CURRENTVERSION = $LATESTVERSION ] ; then
	echo "You are up to date"
	exit 0
else
	echo "New version available, downloading"
	wget $DOWNLOAD
fi

echo "Removing old Symlink and making new one"
rm $SYMLINK
ln -s server-$LATESTVERSION.jar server.jar

# Call the other startup script here
echo "Restarting Blynk server"
/bin/bash $BASE/blynk.sh restart
echo "All done!"