Unable to install openhabian on pine 64

I have had an old version of OpenHabian (don’t remember the version number but previous to the 2.0) running on a Pine64 for some time until I stopped being able to ssh into it. I was still able to enter the dashboard though. Last week, I decided to do a fresh install but no matter what I try I can’t get it to work.

I’ve tried different SD cards, both SanDisk 16gb. I’ve flashed the image the latest image using several workflows: formatting with the SDformatter tool and writing the image with ApplePi Baker, formatting with the SDformatter tool and writing the image with Etcher, skip formatting and flash the image with Etcher. I’ve tried using the internal sd card slot of the iMac and an external card reader. The Pine64 is working. I have another card with debian that I can run headless or connected to a TV on the pine.

The first time I plug the pine nothing happens, the LAN lights never turn on and I can’t ssh into it. I’ve tried plugging it on the first boot to HDMI and nothing comes up on screen. The TV does detect the Pine for a few seconds but then it returns to sleep mode. After pulling the plug a couple of times it eventually powers on. It hangs after a few seconds and a couple of minutes after the openhabianpine64 login shows up on the console. If I ssh into it I get the following:

Every 2.0s: cat /boot/first-boot.log Tue Dec 4 00:57:12 2018

2016-02-11_16:28:17_UTC [openHABian] Starting the openHABian initial setup.
2016-02-11_16:28:17_UTC [openHABian] Storing configuration... OK
2016-02-11_16:28:17_UTC [openHABian] Changing default username and password... S
KIPPED
2016-02-11_16:28:17_UTC [openHABian] Setting up Ethernet connection... OK
2016-02-11_16:28:17_UTC [openHABian] Ensuring network connectivity... OK
2016-02-11_16:28:17_UTC [openHABian] Waiting for dpkg/apt to get ready... OK
2016-02-11_16:28:28_UTC [openHABian] Updating repositories and upgrading install
ed packages... FAILED
2018-12-04_00:53:19_UTC [openHABian] Initial setup exiting with an error!

Same problem here. Did you find a solution?

Hi Zsolt,

Not really. I stopped trying. If you come up with a solution please post it here.

I still have an unused Pine64 at home and will give it a try in 2 weeks as i‘m currently not at home.

Check if this works for you.

If you log on to the pine using ssh you can press Ctrl+C to go to the console. There you can try to do apt-get update and then apt-get upgrade. It seems I’m having some problem with the locales. Any ideas how to sort this?

openhabian@openHABianPine64:~$ sudo apt-get update 
[sudo] password for openhabian: 
Hit:1 http://ppa.launchpad.net/longsleep/ubuntu-pine64-flavour-makers/ubuntu xenial InRelease
Hit:2 http://ports.ubuntu.com xenial InRelease
Hit:3 http://ports.ubuntu.com xenial-updates InRelease
Hit:4 http://ports.ubuntu.com xenial-security InRelease
Reading package lists... Done
openhabian@openHABianPine64:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "pt_PT.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up console-setup (1.108ubuntu15.4) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.14) ...

Ok. I edited the /etc/default/locale file and added my locale. But first I had to install nano:

sudo apt-get install nano
sudo nano /etc/default/locale

LC_CTYPE="pt_PT.UTF-8"
LC_ALL="pt_PT.UTF-8"
LANG="pt_PT.UTF-8"

Then I ran apt-get again and then the first-boot.sh script on /root folder

openhabian@openHABianPine64:/boot$ sudo ./first-boot.sh

I’m still having errors on the console with my locale and some other error with bindings…

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (pt_PT.UTF-8)
2019-01-18_00:02:15_UTC [openHABian] Starting the openHABian initial setup.
2019-01-18_00:02:15_UTC [openHABian] Storing configuration... OK
2019-01-18_00:02:15_UTC [openHABian] Changing default username and password... SKIPPED
2019-01-18_00:02:15_UTC [openHABian] Setting up Ethernet connection... OK
2019-01-18_00:02:15_UTC [openHABian] Ensuring network connectivity... OK
2019-01-18_00:02:15_UTC [openHABian] Waiting for dpkg/apt to get ready... OK
2019-01-18_00:02:23_UTC [openHABian] Updating repositories and upgrading installed packages... OK
2019-01-18_00:02:32_UTC [openHABian] Installing git package... OK
2019-01-18_00:04:12_UTC [openHABian] Cloning myself... OK
2019-01-18_00:04:15_UTC [openHABian] Executing 'openhabian-setup.sh unattended'...
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (pt_PT.UTF-8)
2019-01-18_00:04:15_UTC [openHABian] Checking for root privileges... OK
2019-01-18_00:04:16_UTC [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2019-01-18_00:04:16_UTC [openHABian] Setting timezone based on IP geolocation... FAILED (pip)
2019-01-18_00:09:19_UTC [openHABian] Setting locale based on openhabian.conf... OK
2019-01-18_00:09:59_UTC [openHABian] Setting hostname of the base system... OK
2019-01-18_00:09:59_UTC [openHABian] Executing pine64 platform scripts (longsleep)... OK
2019-01-18_00:10:22_UTC [openHABian] Assigning fixed MAC address to eth0 (longsleep)... OK
2019-01-18_00:10:22_UTC [openHABian] Enable PINE64 support for systeminfo binding... FAILED
2019-01-18_00:10:23_UTC [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2019-01-18_00:14:16_UTC [openHABian] Installing additional needed packages... OK
2019-01-18_00:17:33_UTC [openHABian] Adding slightly tuned bash config files to system... OK
2019-01-18_00:17:34_UTC [openHABian] Adding slightly tuned vim config file to system... OK
2019-01-18_00:17:34_UTC [openHABian] Downloading and setting up FireMotD... OK
2019-01-18_00:19:00_UTC [openHABian] Installing Zulu Embedded OpenJDK... OK
2019-01-18_00:25:57_UTC [openHABian] Installing or upgrading to latest openHAB release (stable)... OK
2019-01-18_00:28:38_UTC [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... OK
2019-01-18_00:28:39_UTC [openHABian] Adding openHAB syntax to vim editor... OK
2019-01-18_00:28:40_UTC [openHABian] Adding openHAB syntax to nano editor... OK
2019-01-18_00:28:40_UTC [openHABian] Adding openHAB scheme to multitail... OK
2019-01-18_00:28:40_UTC [openHABian] Preparing openHAB folder mounts under /srv/... OK
2019-01-18_00:28:40_UTC [openHABian] Applying file permissions recommendations... OK
2019-01-18_00:28:51_UTC [openHABian] Applying miscellaneous system settings... OK
2019-01-18_00:28:51_UTC [openHABian] Setting up Samba network shares... OK
2019-01-18_00:33:07_UTC [openHABian] Installing Node.js for arm (prerequisite for other packages)... OK
2019-01-18_00:33:46_UTC [openHABian] Installing the openHAB Log Viewer (frontail)... OK
2019-01-18_00:35:11_UTC [openHABian] Adding an openHAB dashboard tile for 'frontail'... OK
2019-01-18_00:35:11_UTC [openHABian] Execution of 'openhabian-setup.sh unattended' completed.
2019-01-18_00:35:11_UTC [openHABian] Waiting for openHAB to become ready... OK
2019-01-18_00:37:33_UTC [openHABian] Visit the openHAB dashboard now: http://openHABianPine64:8080
2019-01-18_00:37:33_UTC [openHABian] To gain access to a console, simply reconnect.
2019-01-18_00:37:33_UTC [openHABian] First time setup successfully finished.

Back to square one. After rebooting the Pine64, it won’t start again. Different cards, different power supplies, it always hangs around 14s after the start of the boot sequence.