Tips for running Fedora in a Raspberry Pi 2

This is a list of tips I’m using while running Fedora in my Raspberry Pi 2.

To  minimize the writes of the SD card I use tmpfs as much as possible:

# systemctl unmask tmp.mount
# systemctl enable tmp.mount

Add noatime,discard to /etc/fstab

# cat /etc/fstab

UUID=e098e36f-f409-44cb-9d8e-9d5c0e2ed9c9 / ext4 defaults,noatime,discard 1 1
/dev/mmcblk0p1 /boot vfat defaults,noatime 0 0

# mount -o remount /
# mount -o remount /boot
# fstrim -v /

To set the journal to write only to tmpfs set in /etc/systemd/journald.conf:

Storage=volatile

To set the country in the wifi adapter, add your country code to /etc/modprobe.d/cfg80211.conf:

options cfg80211 ieee80211_regdom=ES

To load the driver of the random number generator add a line to /etc/modules-load.d/raspberrypi.conf:

bcm2708-rng

# dnf install rng-tools
# systemctl start rngd.service

By default, I got the power saving CPU governor, to improve performance, set it to  ondemand.

As suggested by Diogo, there is a cpupower.service that can be used to set the CPU governor:

# dnf install kernel-tools
# vi /etc/sysconfig/cpupower

CPUPOWER_START_OPTS="frequency-set -g ondemand"
CPUPOWER_STOP_OPTS="frequency-set -g ondemand"

# systemctl enable cpupower.service
# systemctl start cpupower.service

Download and install fedorazram and fake-hwclock from my copr. As there are no support in copr for the armv7hl arch yet, you have to download the packages manually and install them (they are noarch):

https://copr.fedoraproject.org/coprs/jorti/fedorazram/
https://copr.fedoraproject.org/coprs/jorti/fake-hwclock/

Advertisements

2 thoughts on “Tips for running Fedora in a Raspberry Pi 2”

  1. The package “kernel-tools” already comes with “cpupower.service”.

    So, after installing it, you could also:

    1- Execute “systemctl enable cpupower”
    2- And, optionally, edit the options in the file “/etc/sysconfig/cpupower”.

    I’m right?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s