This page presents updated steps to get a CentOS7 image up and
running on Cubieboard2 or CubieTruck SOC. It should also work
for many other armv7 boards. These instructions were
developed in the building of this server.
You can learn the basics and more from:
https://wiki.Centos.org/SpecialInterestGroup/AltArch/armhfp**NEW** CentOS for the Odroid HC1. This is a fantastic 8 core armv7 with integrated sata all in a neat package. Special installation instructions are at:
CentOS7 for the Odroid HC1The CentOS site is now very good for the basic installation. It also lists all boards currently supported. The challenge is getting the proper uboot file. If you have a CentOS or Fedora system, it is easy to install the uboot-images-armv7 or uboot-images-armv8 rpm to source the uboot file. It is also very easy to make a Fedora arm image for your board and get the uboot file that way.
Uboot files hereCubieboards, with their integrated sata, can boot directly from sata with only uboot on the uSD card. Use a USB/sata adapter to install CentOS directly to a sata drive. I prefer to use gparted to size the partitions to my likings. Use the dd command to put the uboot on a uSD card (as small a card as you can find) that you have removed all partitions. I use fdisk to simply remove any partitions.
You can avoid needing sudo for screen by adding your user to group dialout:
Alternatively, you can get finer grain control over ttyUSB access with udev that is discussed here:
How do I allow a non-default user to use serial device ttyUSB0?
Booting the image and first steps
Throughout this guide, there are values unique to an installation
that have to be provided. For the most part, these can be
handled by first setting some environment variables that will be
used in cat and sed commands. Or you can manually alter the
variables. Special characters (\, $, and / tested)
MUST be proceeded by a \
To set date_timezone value. See
Set the following variables for this guide. Save your settings somewhere as there is at least one reboot where these variables will have to be set again.
Insert the uSD card, attach the sata drive, USB/TTL adapter, and Ethernet cable (no WiFi or Bluetooth support for the CubieTruck embedded interfaces). Power up and log in as root (default password is CentOS, change it!)
Next you should probably set your timezone.
SELinux is now set to Enforcing. You no longer need to set it! Unless you want to disable it...
Run yum update. Then reboot to use the current new
kernel. It is important to pay attention to space in /boot
before allowing yum to install a new kernel. Again, I use
gparted to make a larger /boot partition (as well as a larger swap
partition) than what comes in the base image.
At this point the system is ready to use. I like to add:
Screen is very helpful for running remote yum updates. If the SSH connection drops, it is easy to reconnect to the screen session which survived the disconnect.
To get the logwatch to my email account:
Since this is a server, you may want a static IP address (IPv6 support TBD):
Finally, you can add an external USB drive to FSTAB. Find its UUID in /dev/disk/by-uuid, and its label with fdisk or other tool. Then add to /etc/fstab (if type is not ext4, replace with appropriate type):
And that is pretty much it!
The Xfce Desktop is now available! For the most part, as I am
still finding missing pieces. Xfce is well suited for armv7
devices, requiring less of the device than Gnome or KDE.
Install the CentOS minimal image, follow all the instructions
above, then:
Xscreensaver is not (as of Dec 12, 2018) installed as part of the Xfce group. Plus its controls are not appearing on the Settings menu. So far the best way to access the screensaver settings is to run xsceensaver-demo from a terminal window.
Since the Cubieboards do not have an RTC (no battery!), Chrony is really great at making that huge time jump quickly on boot up, but it does not step the clock as it drifts. This may be OK for a workstation, but not all servers. If you need clock accuracy replace the makestep line in /etc/chrony.conf with the following:
If you want to serve NTP time to local clients, uncomment the "Allow local access" line.
Some services, like Postfix and Samba need to delay their startup until the system time is brought current. This is done via using Chrony-wait:
Apply the above commands from setting the service variable, on, to any service needing the delay after enabling the service.
An alternative tool, that sets the timestamp right after systemd starts can be found at:
The instructions there are easy to follow.
Replace swap partition with zram
Zram uses a portion of system memory for a compressed swap
partition. This can be very valuable on a system with only a
uSD drive. Fedora arm has standardized on using Zram since
v28 for the performace gain over memory tradeoff. Zram only
uses as much memory as currently needed for swap space and
compressions from 2:1 to 4:1 have been reported depending on the
application mix.
Zram is not currently part of EPEL, but a developer's repo can be installed with:
The size of the swap is determent by the factor in /etc/zram.conf.
Named wants to use random ports. SELinux does not like random ports.
You have to limit the range of random ports named will use to keep
SELinux happy. So add the following to your named.conf
This is actually a general CentOS7 with SELinux issue, not specific to arm.
Randomness, or Entropy, tends to be a little low and slow via
software on an ARM SOC. The Cubieboard does have a hardware
RNG, but we have to enable it.
Test the available Entropy with:
cat /proc/sys/kernel/random/entropy_availAdd the hardware RNG support by installing rng-tools:
If rng-tools does not bring the available entropy above 2000 bits, consider installing haveged from EPEL:
issihosts.com/haveged
Webmin
Webmin is probably the best interface to monitor and manage the
server. you can access it via yum by adding:
Next, install and start the Webmin service.
You can now access Webmin via:
https://your_host_tld:10000
VNC Server
VNC to the GNOME or Xfce desktop is another remote management
alternative. Install the Gnome or Xfce (see Xfce above) image, then follow these steps:
If you will not be accessing the graphic desktop directly, but only
remotely, you can disable graphic session startup.
The Gnome session can always be accessed from the local login with startx. For Xfce use startxfce4.
For those accounts that will be accessed via vnc (e.g. root, user), login to those accounts and run vncpasswd. This SHOULD be done prior to trying to start vncserver, as it creates the ~/.vnc directory and prevents the server start from failing.
Edit /etc/systemd/system/vncserver@\:1.service, replacing <USER> with the userID. Then:
Finally repeat these steps for user2, using @:2 and port 5902, etc.
Then restart vncserver:
EPEL - Extra Packages for Enterprise Linux
The CentOS armfhp site referenced at the beginning of this page is
the definitive source for setting up the EPEL repo.
The maintainer said to feel free to have a look at the build logs,
submit patch and enjoy!
https://armv7.dev.Centos.org/rpmbuild/epel-pass-1/And if you can fix any of the packages, "You're a better man than I am, Gunga Din!"
You can EMail Robert at his desk...