How do I install i2c-tools package / i2c_dev kernel module in Fedora IoT 33?

I’m trying out Fedora IoT 33 on a Raspberry Pi 2 Model B Rev 1.1 (armv7l). I have a Cluster HAT module v2.4 (the Cluster HAT interfaces one Raspberry Pi controller (the Pi 2 Model B rev 1.1) with four Raspberry Pi Zero nodes).

More details from rpm-ostree status
[root@localhost ~]# rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: inactive
Deployments:
* ostree://fedora-iot:fedora/stable/armhfp/iot
                   Version: 33.20201123.0 (2020-11-23T16:52:15Z)
                    Commit: ec67b14b1fdb4a0ad09099caeaf0bb7be9dcbcbb8e48b7c1d1fcfcb601a2fcba
              GPGSignature: Valid signature by 963A2BEB02009608FE67EA4249FD77499570FF31

  ostree://fedora-iot:fedora/stable/armhfp/iot
                   Version: 33.20201029.2 (2020-10-29T09:20:23Z)
                    Commit: b357341e6fca96ac8809a081098b156043ef814f39f1ba692e9fe9e9d9aadf6f
              GPGSignature: Valid signature by 963A2BEB02009608FE67EA4249FD77499570FF31

I’m following the instructions for powering up the Raspberry Pi Zero followers (see the section β€œCustom Control” on the linked page), which requires the i2cset tool from the i2c-tools package to be installed on the controller (the Pi 2 Model B rev 1.1).

Trying to install i2c-tools returns an error…

[root@localhost ~]# rpm-ostree install i2c-tools
Checking out tree ec67b14... done
Enabled rpm-md repositories: fedora updates fedora-cisco-openh264
Updating metadata for 'fedora'... done
rpm-md repo 'fedora'; generated: 2020-10-19T23:26:56Z
Updating metadata for 'updates'... done
rpm-md repo 'updates'; generated: 2020-11-23T00:50:19Z
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2020-08-25T19:10:34Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 2 packages (85.2?kB)
Downloading from 'fedora'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
error: Bus owner changed, aborting. This likely means the daemon crashed; check logs with `journalctl -xe`.

The first time I try this, the main console shows the kernel message…

[  175.474911] SELinux:  Context system_u:object_r:rpmdb_exec_t:s0 is not valid (left unmapped).

Checking journalctl -xe, the most relevant lines appear to be…

Nov 23 23:34:45 localhost.localdomain rpm-ostree(i2c-tools.post)[4630]: modprobe: ERROR: could not insert 'i2c_dev': Operation not permitted

… followed by…

Nov 23 23:34:48 localhost.localdomain systemd[1]: rpm-ostreed.service: Main process exited, code=killed, status=11/SEGV
More journalctl -xe output, excluding zezere
Nov 23 23:33:47 localhost.localdomain rpm-ostree[3699]: Allowing active client :1.46 (uid 0)
Nov 23 23:33:47 localhost.localdomain rpm-ostree[3699]: client(id:cli dbus:1.46 unit:session-3.scope uid:0) added; new total=1
Nov 23 23:33:56 localhost.localdomain rpm-ostree[3699]: Locked sysroot
Nov 23 23:33:56 localhost.localdomain rpm-ostree[3699]: Initiated txn PkgChange for client(id:cli dbus:1.46 unit:session-3.scope uid:0): /org/projectatomic/rpmostree1/fedora_iot
Nov 23 23:33:57 localhost.localdomain rpm-ostree[3699]: warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
Nov 23 23:33:57 localhost.localdomain rpm-ostree[3699]: warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
Nov 23 23:34:16 localhost.localdomain rpm-ostree[3699]: Librepo version: 1.12.1 with CURL_GLOBAL_ACK_EINTR support (libcurl/7.71.1 OpenSSL/1.1.1h-fips zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.9.5/ope>
Nov 23 23:34:16 localhost.localdomain rpm-ostree[3699]: warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
Nov 23 23:34:25 localhost.localdomain rpm-ostree[3699]: warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
Nov 23 23:34:43 localhost.localdomain rpm-ostree[3699]: Preparing pkg txn; enabled repos: ['fedora', 'updates', 'fedora-cisco-openh264'] solvables: 59490
Nov 23 23:34:43 localhost.localdomain rpm-ostree[3699]: warning: Found bdb Packages database while attempting sqlite backend: using bdb backend.
Nov 23 23:34:45 localhost.localdomain rpm-ostree(i2c-tools.post)[4630]: modprobe: ERROR: could not insert 'i2c_dev': Operation not permitted
Nov 23 23:34:45 localhost.localdomain audit[3699]: ANOM_ABEND auid=4294967295 uid=0 gid=0 ses=4294967295 subj=system_u:system_r:install_t:s0 pid=3699 comm="pool-/usr/bin/r" exe="/usr/bin/rpm-ostree" sig=11 res=1
Nov 23 23:34:45 localhost.localdomain systemd[1]: Condition check resulted in Temporary Directory (/tmp) being skipped.
β–‘β–‘ Subject: A start job for unit tmp.mount has finished successfully
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit tmp.mount has finished successfully.
β–‘β–‘ 
β–‘β–‘ The job identifier is 3564.
Nov 23 23:34:45 localhost.localdomain audit: BPF prog-id=48 op=LOAD
Nov 23 23:34:45 localhost.localdomain audit: BPF prog-id=49 op=LOAD
Nov 23 23:34:45 localhost.localdomain audit: BPF prog-id=50 op=LOAD
Nov 23 23:34:45 localhost.localdomain systemd[1]: Started Process Core Dump (PID 4636/UID 0).
β–‘β–‘ Subject: A start job for unit systemd-coredump@1-4636-0.service has finished successfully
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit systemd-coredump@1-4636-0.service has finished successfully.
β–‘β–‘ 
β–‘β–‘ The job identifier is 3558.
Nov 23 23:34:45 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-coredump@1-4636-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=?>
Nov 23 23:34:48 localhost.localdomain systemd[1]: rpm-ostreed.service: Main process exited, code=killed, status=11/SEGV
β–‘β–‘ Subject: Unit process exited
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ An ExecStart= process belonging to unit rpm-ostreed.service has exited.
β–‘β–‘ 
β–‘β–‘ The process' exit code is 'killed' and its exit status is 11.
Nov 23 23:34:48 localhost.localdomain systemd[1]: rpm-ostreed.service: Failed with result 'signal'.
β–‘β–‘ Subject: Unit failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ The unit rpm-ostreed.service has entered the 'failed' state with result 'signal'.
Nov 23 23:34:48 localhost.localdomain audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rpm-ostreed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res>

… my interpretation of this is that SELinux is preventing the install script run by rpm-ostree from installing the i2c_dev kernel module, which results in rpm-ostree process being terminated by a SIGSEGV (11).

How should I install the i2c_dev kernel module / i2c-tools on Fedora IoT without disabling SELinux?

This appears to work on an updated version - so problem solved, I guess! :grinning:

rpm-ostree status
State: idle
Deployments:
* ostree://fedora-iot:fedora/stable/aarch64/iot
                   Version: 33.20201215.0 (2020-12-15T11:17:41Z)
                    Commit: 23010389d9eb42baedcd764a2aca8afa2a5958e61477359526a3ea998f0c4d2d
              GPGSignature: Valid signature by 963A2BEB02009608FE67EA4249FD77499570FF31
[root@localhost etc]# rpm-ostree install i2c-tools
Checking out tree 2301038... done
Enabled rpm-md repositories: fedora-cisco-openh264 fedora updates
Updating metadata for 'fedora-cisco-openh264'... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2020-08-25T19:10:34Z
Updating metadata for 'fedora'... done
rpm-md repo 'fedora'; generated: 2020-10-19T23:26:59Z
Updating metadata for 'updates'... done
rpm-md repo 'updates'; generated: 2021-01-14T00:57:27Z
Importing rpm-md... done
Resolving dependencies... done
Will download: 2 packages (85.2?kB)
Downloading from 'fedora'... done
Importing packages... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Added:
  i2c-tools-4.1-6.fc33.aarch64
  libi2c-4.1-6.fc33.aarch64
Run "systemctl reboot" to start a reboot
3 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.