Fabian Affolter: Fedora IoT and Home Assistant

As announced is Fedora IoT still pretty close to Fedora Atomic but I was curious how it “looks and feels”. Ok, more “feels” than there is not much see beside the prompt. My encounters with different ARM hardware and Fedora in the past where not always successful, thus I decided to take a Raspberry Pi Model B instead of one out of the Orange Pi family.

First step is to get a nightly image build Fedora IoT as described in the Getting started documentation.

# wget https://ftp-stud.hs-esslingen.de/pub/Mirrors/alt.fedoraproject.org/iot/20180618.0/IoT/aarch64/images/Fedora-IoT-28-20180618.0.aarch64.raw.xz

Just a side note: With the ARM installer, which is available in Rawhide, the

Error: mount /dev/mmcblk0p4 /tmp/root failed

  error is gone. It might be that the same applies to Fedora 28 as well but was present in Fedora 27.

Let the ARM installer create the SD card.

# arm-image-installer --image=Fedora-IoT-28-20180618.0.aarch64.raw.xz --target=rpi3 --media=/dev/mmcblk0 --resizefs

=====================================================
= Selected Image:
= Fedora-IoT-28-20180618.0.aarch64.raw.xz
= Selected Media : /dev/mmcblk0
= U-Boot Target : rpi3
= Root partition will be resized
=====================================================

*****************************************************
*****************************************************
******** WARNING! ALL DATA WILL BE DESTROYED ********
*****************************************************
*****************************************************

Type 'YES' to proceed, anything else to exit now

= Proceed? YES
= Writing:
= Fedora-IoT-28-20180618.0.aarch64.raw.xz
= To: /dev/mmcblk0 ....
0+403205 records in
0+403205 records out
4294967296 bytes (4.3 GB, 4.0 GiB) copied, 352.665 s, 12.2 MB/s
= Writing image complete!
= Resizing /dev/mmcblk0 ....
e2fsck 1.44.2 (14-May-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mmcblk0p3: 35398/187680 files (0.7% non-contiguous), 307012/749568 blocks
resize2fs 1.44.2 (14-May-2018)
The filesystem is already 749568 (4k) blocks long. Nothing to do!

= Raspberry Pi 3 Uboot is already in place, no changes needed.

= Installation Complete! Insert into the rpi3 and boot.

After booting the Raspberry Pi up, create a new user. Now you are able to use SSH to log in. The current build of Fedora IoT allows you to use a recent kernel.

# uname -r
4.16.15-300.fc28.aarch64

Of course is the deployment up-to-date. One advantage of nightly build if you are using one the next morning 😉 .

# rpm-ostree status
State: idle; auto updates disabled
Deployments:
● ostree://fedora-iot:fedora/28/aarch64/iot
Version: 28.20180617.0 (2018-06-17 10:36:57)
Commit: a3aee4deaa6887bfc3088ad891dfa22b4a729e802905c5135c676e440124784a
GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1

Instead of Docker is

podman

  used to deal with all container-related tasks. To get the Home Assistant images run the command below:

# podman pull homeassistant/aarch64-homeassistant

As you can see it’s pretty much the same as using the 

docker

 command-line tool.

Create a directory to store the configuration.

# mk dir -p /opt/home-assistant

And start the Home Assistant after you have adjusted the host’s firewall to match your needs.

# podman run -it --rm --name="home-assistant" 
    --network=bridge --publish=8123:8123 
    -v /opt/home-assistant:/config:Z 
    -v /et c/localtime:/et c/localtime:ro 
    homeassistant/aarch64-homeassistant

Et voilà, http://IP_ADDRESS_FEDORA_IOT_HOST:8123 is serving the Home Assistant frontend.

I will skip the autostart part as this is already covered in the blog post about Project Atomic and Home Assistant. No much news in this blog post beside

podman

. Pulling images are problematic at first because often the download stopped somewhere over 95 % (no, never at 20 % or 60 % ) in my case a local registry solved the issue for now.


Source From: fedoraplanet.org.
Original article title: Fabian Affolter: Fedora IoT and Home Assistant.
This full article can be read at: Fabian Affolter: Fedora IoT and Home Assistant.

Advertisement


Random Article You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*