From Fedora Project Wiki
m
(Add moving between devel/stable)
Line 17: Line 17:
  
 
The images being created are currently 4 Gb in size. The current memory used for testing is 1 Gb of RAM although Fedora IoT base image should run with less but of course this limits the amount of container applications can be run on top of the Base OS.
 
The images being created are currently 4 Gb in size. The current memory used for testing is 1 Gb of RAM although Fedora IoT base image should run with less but of course this limits the amount of container applications can be run on top of the Base OS.
 
== Applying updates, upgrading to the latest nightly build ==
 
 
There's nightly image builds for x86_64 and aarch64 available [https://download.fedoraproject.org/pub/alt/iot/ here]. The OSTree update deltas are available on CDN using the following command:
 
<pre>rpm-ostree upgrade</pre>
 
  
 
== Setting up a Virtual Machine ==
 
== Setting up a Virtual Machine ==
Line 96: Line 91:
  
 
This issue is currently been tracked in [https://bugzilla.redhat.com/show_bug.cgi?id=1578930 RHBZ 1578930].
 
This issue is currently been tracked in [https://bugzilla.redhat.com/show_bug.cgi?id=1578930 RHBZ 1578930].
 +
 +
== Applying updates, upgrading to the latest nightly build ==
 +
 +
There's nightly image builds for x86_64 and aarch64 available [https://download.fedoraproject.org/pub/alt/iot/ here]. The OSTree update deltas are available on CDN using the following command:
 +
<pre>sudo rpm-ostree upgrade</pre>
 +
 +
== Moving between stable and development nightly build trees ==
 +
 +
To move between the stable (Fedora 28 based) and the development (Fedora 29/rawhide based) OSTrees use the following procedures. The process outlines moving from stable to devel, to go the other way just substitute the Fedora release numbers.
 +
 +
Update the release key to the version you wish to move to:
 +
<pre>sudo vi /etc/ostree/remotes.d/fedora-iot.conf</pre>
 +
 +
Rebase the OSTree:
 +
<pre>sudo rpm-ostree rebase -b fedora/29/aarch64/iot</pre>
  
 
== Enabling wireless support on the DB410c and Raspberry Pi ==
 
== Enabling wireless support on the DB410c and Raspberry Pi ==

Revision as of 12:15, 31 July 2018

Welcome

Welcome to the getting started guide for Fedora IoT, both this guide and Fedora IoT images are in the very early stages so please report any issues to the mailing list.

Reference Platforms

We currently support the x86_64 and aarch64 architectures, the components to support ARMv7 are being worked upon and will be added shortly.

The currently tested reference devices are as follows:

  • x86_64 and aarch64 VMs
  • Raspberry Pi 3 Model B and Raspberry Pi 3 Model B+
  • Dragonboard 410c

Other devices should work but aren't being actively tested in the context of IoT. The list of supported reference devices will expand with time.

Required resources

The images being created are currently 4 Gb in size. The current memory used for testing is 1 Gb of RAM although Fedora IoT base image should run with less but of course this limits the amount of container applications can be run on top of the Base OS.

Setting up a Virtual Machine

The images generated are compressed raw disk images. They can be utilised both on physical devices and used as disks on a virtualisation platform. The images work without change on qemu/KVM.

On qemu/KVM the tools that can be used to run the image in a VM include Virtual Machine Manager, GNOME Boxes or virsh cli. These tools are available in most Linux distributions. Decompress the image as below and then create a new virtual machine and when asked for storage point the tool at the existing disk image.

$ xz -d [filename].raw.xz

Use with VirtualBox

The images we produce need to be converted to be used with VirtalBox. This can be done with the qemu-img command found in the qemu-img package.

$ xz -d [filename].raw.xz
$ qemu-img convert -f raw [filename].raw -O vdi [filename].vdi

Setting up a Physical Device

You will need either a serial console or HDMI monitor with USB keyboard to get started with the initial set.

Create a mSD card for either of the above devices with the following command:

Scripted

To install using arm-image-installer:

$ sudo dnf install -y fedora-arm-installer

To write the image out use the following:

$ sudo arm-image-installer

Usage: arm-image-installer <options>

   --image=IMAGE    - xz compressed image file name
   --target=TARGET  - target board
   --media=DEVICE   - media device file (/dev/[sdX|mmcblkX])
   --selinux=ON/OFF - Turn SELinux off/on as needed
   --norootpass     - Remove the root password
   -y		    - Assumes yes, will not wait for confirmation
   --version	    - Display version and exit
   --resizefs	    - Resize root filesystem to fill media device
   --addconsole     - Add system console to extlinux.conf
   --addkey=        - /path/to/ssh-public-key

Example: arm-image-installer --image=Fedora-Rawhide.xz --target=Bananapi --media=/dev/mmcblk0

For list of supported boards please check SUPPORTED-BOARDS file.

For the Raspberry Pi Model 3 B/B+ use:

--target=rpi3

For the Dragonboard410c use:

--target=dragonboard410c

Manual

Replace XXX with the location of your media. It will be sdX or mmcblkX depending on hardware.

xzcat Fedora-IoT-28-<BUILD ID>.aarch64.raw.xz | sudo dd status=progress bs=4M of=/dev/XXX 

Serial Console

If you wish to use a serial console you'll need to configure it. Details for the Raspberry PI are here.

Initial Setup once the VM or Phyical device is running

There is currently a few issues with the initial-setup. It currently only allows you to create a standard user. Create a user and ensture to set the "Administrator" checkbox which will configure sudo access.

Once the initial setup dialog has completed you can login as the new user and sudo to root. If you wish to at this time you can set a root password, otherwise the root account remains locked (this is fine).

This issue is currently been tracked in RHBZ 1578930.

Applying updates, upgrading to the latest nightly build

There's nightly image builds for x86_64 and aarch64 available here. The OSTree update deltas are available on CDN using the following command:

sudo rpm-ostree upgrade

Moving between stable and development nightly build trees

To move between the stable (Fedora 28 based) and the development (Fedora 29/rawhide based) OSTrees use the following procedures. The process outlines moving from stable to devel, to go the other way just substitute the Fedora release numbers.

Update the release key to the version you wish to move to:

sudo vi /etc/ostree/remotes.d/fedora-iot.conf

Rebase the OSTree:

sudo rpm-ostree rebase -b fedora/29/aarch64/iot

Enabling wireless support on the DB410c and Raspberry Pi

Both WiFi and Bluetooth support on either the 96boards DragonBoard 410c or the Raspberry Pi 3 Model B or B+ need support files for either the WiFi or Bluetooth to work well. To install the files run the following commands, brcm-firmware for Raspberry Pi or wcn36xx-firmware for the Dragonboard and reboot which will enable the various wireless support:

Raspberry Pi:

$ sudo curl https://fedora.roving-it.com/wireless.repo -o /etc/yum.repos.d/wireless.repo
$ sudo rpm-ostree install brcm-firmware
$ sudo systemctl reboot

Dragonboard:

$ sudo curl https://fedora.roving-it.com/wireless.repo -o /etc/yum.repos.d/wireless.repo
$ sudo rpm-ostree install wcn36xx-firmware
$ sudo systemctl reboot

General commands

Display the status of the currently running deployment

rpm-ostree status

Add a layered package

rpm-ostree install <pkg-name>

Upgrade to the latest

rpm-ostree upgrade

Rollback to the previous tree

rpm-ostree rollback

Container support

We currently ship the podman daemon as it's quite light weight and doesn't use a lot of resources. The commands are very similar to that of docker. Some sample commands are:

podman pull fedora

podman images

podman run -it --rm fedora /bin/bash

Podman has a lot of well written documentation and articles you can find a number of them at the following links: