My plan is to reinstall openHABian on a bigger SDcard, and on a Raspberry Pi 4. The latest release (v1.5) supports the new Pi 4, and I decided it’s time to do a fresh install, and see if all my Playbooks are still working.
As always, I’m searching my shell history for the right command how to install the image … but came up empty.

The disk
Let’s start by identifying the SDcard. I’m running Ubuntu on my laptop, and I can use tail -f /var/log/syslog to see the log output. When I plugin the SDcard into the reader, I see the following in the log:
| |
It’s super important to identify the right disk. If you write the new image to the wrong disk, you will damage an existing filesystem. In my case the SDcard is /dev/sdb. This matches my setup, sdb is the second disk and sda is another disk which is present when the laptop is in the docking station. I can verify that sdb is indeed what I expect it to be, by using fdisk -l /dev/sdb to see the size and partitions:
| |
Brand new disk, it comes with FAT32 by default. The size is 29,74 GiB, which is about 32 GB.
openHABian
Next I need the current openHABian release, it’s available on the GitHub page. v1.5 in my case. Download the img.xz file, afterwards this file should be in your download folder:
| |
The .xz ending shows that the download is using LZMA compression. Recent tar versions on Linux can handle this natively. Otherwise the xz-utils package can handle these kind of files.
Installation
Putting this all together, I’m using dd to write the uncompressed image to the SDcard. Uncompression happens on the fly, unxz is emitting the uncompressed image to STDOUT and dd is using this stream as input:
| |
The status flag is not necessary, but shows a nice progress report. The fsync ensures that everything is written to disk before dd exits.
| |
Time to boot the Raspberry Pi and look after the Playbooks …
Comments
With an account on the Fediverse or Mastodon, you can respond to this post. Known replies are displayed below:
Note: This will load data from mastodon.social.
Learn how this is implemented here.
Share: