Openhabian Installation Fail

  • Platform information:
    • Hardware: INTEL NUC
    • OS: Ubuntu 20.04 LTS or Ubuntu 20.04 LTS in PROXMOX
    • Java Runtime Environment: ZULU 11 32b or ZULU 11 64b
    • openHAB version: 3
  • Issue of the topic: I try to install OpenHabian as described:
# start shell as root user
sudo bash
# install git - you can skip this if it's already installed
apt-get update
apt-get install git

# download, link and create config file
git clone -b openHAB3 https://github.com/openhab/openhabian.git /opt/openhabian
ln -s /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config
cp /opt/openhabian/openhabian.conf.dist /etc/openhabian.conf
openhabian-config unattended

the installation fail:

install -m 755 /opt/openhabian/includes/set-partuuid /usr/local/sbin
blockdev: cannot open /dev/mmcblk0: No such file or directory
fdisk: cannot open /dev/mmcblk0: No such file or directory
sfdisk: cannot open /dev/mmcblk0: No such file or directory
Checking that no-one is using this disk right now ... FAILED

This disk is currently in use - repartitioning is probably a bad idea.
Umount all file systems, and swapoff all swap partitions on this disk.
Use the --no-reread flag to suppress this check.

Disk /dev/sda: 200 GiB, 214748364800 bytes, 419430400 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B1270A4A-150E-4EE6-BA07-4D8CA57107D7

Old situation:

Device       Start       End   Sectors  Size Type
/dev/sda1     2048      4095      2048    1M BIOS boot
/dev/sda2     4096   2101247   2097152    1G Linux filesystem
/dev/sda3  2101248 419428351 417327104  199G Linux filesystem

>>> line 1: unsupported command

New situation:
Disklabel type: gpt
Disk identifier: B1270A4A-150E-4EE6-BA07-4D8CA57107D7

Device       Start       End   Sectors  Size Type
/dev/sda1     2048      4095      2048    1M BIOS boot
/dev/sda2     4096   2101247   2097152    1G Linux filesystem
/dev/sda3  2101248 419428351 417327104  199G Linux filesystem
Leaving.


$ mke2fs -F -t ext4 /dev/sda3
mke2fs 1.45.5 (07-Jan-2020)
/dev/sda3 contains a LVM2_member file system
/dev/sda3 is apparently in use by the system; will not make a filesystem here!
journalctl -xe
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit storage.mount has begun execution.
--
-- The job identifier is 5172.
Jan 23 11:34:48 openhabian mount[50250]: mount: /storage: /dev/sda3 already mounted or mount point >
Jan 23 11:34:48 openhabian systemd[1]: storage.mount: Mount process exited, code=exited, status=32/>
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An n/a= process belonging to unit storage.mount has exited.
--
-- The process' exit code is 'exited' and its exit status is 32.
Jan 23 11:34:48 openhabian systemd[1]: storage.mount: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit storage.mount has entered the 'failed' state with result 'exit-code'.
Jan 23 11:34:48 openhabian systemd[1]: Failed to mount /storage mount.
-- Subject: A start job for unit storage.mount has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit storage.mount has finished with a failure.
--
-- The job identifier is 5172 and the job result is failed.
Jan 23 11:34:48 openhabian systemd[1]: Reloading.
Jan 23 11:34:48 openhabian systemd[1]: /lib/systemd/system/dbus.socket:5: ListenStream= references >
Jan 23 11:35:01 openhabian CRON[50312]: pam_unix(cron:session): session opened for user root by (ui>
Jan 23 11:35:01 openhabian CRON[50313]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1>
Jan 23 11:35:01 openhabian CRON[50312]: pam_unix(cron:session): session closed for user root

So you have not read the docs.
Plus you used config options of the auto backup feature which is to mirror a Raspi’s SD card.
That you used on a Ubuntu VM and wonder why it fails :roll_eyes:

run it in interaticve mode ( sudo openhabian-config )

If i try sudo openhabian-config, than by every installation or upgrade throw an exception

I was reading the docs which u posted. and i tried with VM and without VM(after i install 6th time new Ubuntu because the OpenHabian install have something, i go for VM where i can just put the clear installation back easy). My OpenHab(openhabian) 2.5 on Ubuntu 18.04 LTS was running without problem.
And if u begin with the style like this a documentation which say " Edit /etc/openhabian.conf to match your needs, then finally use" without examples or a link is not the best thing either.

may I ask what the error message / exception is ?
There are a few basic packages required to run openhabian-config which might not be available in an Ubuntu default installation. By having a look to the error message the missing tools / packages can be identified and added.

I doubt you did. It says that Ubuntu is not supported, doesn’t it ?

Which obviously does not apply to your installation because Ubuntu is not supported.
Interesting to read that there’s people to ignore the basicmost prerequisites themselves that know what a good documentation (that they don’t read anyway) would need to look like.

do u know the different between not supported and don’t work?
In the documentation what u posted is written: " We do not actively support Ubuntu so no promises but we provide code “as-is” that is known to run on there." and “We expect you to use the current stable distribution, ‘buster’ for Raspberry Pi OS (ARM) and Debian (x86) and ‘focal’ for Ubuntu (x86) this is” and " Note that although the core parts of openHABian were reported to work on there, Ubuntu is not supported and untested. If you try and fail, please help and drop us a note on Github with debug log enabled, see DEBUG guide."
I know is not the Github, but before i post there i would give a try here. Except some people like u, who think to know everything better answer like this.

Maybe u should read the documentation too.

And for your information. after i installed some things manually on Ubuntu it works now fine…
So if u cant be constructive, next time don’t take the time to answer for a question, because it makes things just worst.

Yes, as you can see in the docs.

Do you think so given the fact that I wrote it ?

Ah, ok. Thanks for your constructive contribution to openHABian then. Just for completeness please post a link to the Pull Request I’m sure you have opened as the constructive contributor that you are …

Pity that such a interesting project like OpenHab have such arrogant people behind like you. For me the communication with you is closed. For me works now and you are not worth my time. Be happy with your arrogance and as i wrote if u cant be constructive than just don’t write. P.S.: Pity but I don’t think u have enough intellect and rationalism to accept this. Bye

This error is by upgrade(Ubuntu and Debian too):

/opt/openhabian/functions/helpers.bash: line 31: /usr/bin/java: cannot execute binary file: Exec format error
FAILED```

So i wanted to give a try to Debian so i changed SSD and go. I installed Debian. After the system powered up i made the commands like in the docs. Installation run trough. After reboot i can connect with ssh and i see the openhabian welcome screen. Everythigs seems to be fine, just it not even work like on the Ubuntu. no connection from the webUI.
Just:

This site can’t be reached192.168.1.21 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED```

and i followed exactly the docs.....

And till i have just the Debian it starts ok, after i installed openhabian, by start it takes 1m 30s wait by accessind /dev/sda3 which dont exist. and i disabled the backup in the config by installation

that means that the binary that is/was installed on your platform is the wrong one for your platform.
Like an arm binary that is installed on a x86 computer.

what does

sudo systemctl status openhab

show ?

The installed binary was amd64 what should be ok for an Intel NUC. but i made a clear installation and after this(even if i did every step like before) worked

Thanks for your help

Hi Roland,
I have an Intel NUC with latest Ubuntu installed. I would now like to install OpenHABian. Can you document your installation process including the things you had to install manually.

Thanks,
Lester