This blog entry will show you how to install Fedora Remix on the Raspberry Pi. Installing Fedora Remix on the Raspberry Pi is easier than installing Fedora on a laptop or desktop because all you have to do is copy the prepared image to a MicroSD card and plug in the Pi.

At the time of writing this post, the Raspberry Pi Fedora 17 Remix is only in testing, but in my experience it’s stable enough to use. According to Peter Robinson, a Fedora ARM developer, you may soon be able to use the official Fedora 18 ARM distribution on the Raspberry Pi, which will considerably improve performance and stability.

The first core components of the Broadcom BCM2835 landed in kernel 3.7 and there might be some bits to report soon with regard to firmware distribution.

At present, the Fedora Remix is the only option, so let’s get started with it!

Installing the Raspberry Pi Fedora 17 Remix

Hook up a monitor (preferably via HDMI), a USB keyboard and mouse (ideally that share a single USB port) and, optionally, an internet connection (ethernet cable, USB wireless card or USB tethering to a smartphone)

Power on and walk through the Fedora “first boot” wizard

Reboot, login and geek out!

The most mysterious part of this process is finding the download link to the image. (Hint: It’s not on the Raspberry Pi distribution downloads page). Fortunately, I’ve saved you the trouble of finding it. As for the rest of the process, it may seem daunting at first, but honestly, it’s not that tricky. Let’s forge ahead.

Loading the image on a MicroSD card

The MicroSD card serves as the Raspberry Pi’s primary harddrive. By default, the Pi will look on the MicroSD card for the operating system to load (though it’s possible to boot from other devices as well). Therefore, the first step is to grab the image and put it on the card.

Extract the archive using the Archive Manager (file-roller) application or unzip from the command line. This will create the file rpfr-17-xfce-RC2.img.

Get the device name of the MicroSD card using the Disks (palimpsest) application or sudo fdisk -l from the command line. Most likely the SD card is named /dev/mmcblk0.

Transfer the extracted image file rpfr-17-xfce-RC2.img to the MicroSD card using a terminal window.

Here’s the transfer command to execute in Step 4.

sudo dd if=rpfr-17-xfce-RC2.img of=/dev/mmcblk0 bs=1M

The command above assumes you saved rpfr-17-xfce-RC2.img in your home directory after extraction. If you saved the file elsewhere, you’ll need to change to the appropriate directory via the command line (cd directory/name) before executing the dd command. dd is a low-level copy command that can read and write complete disk images. if stands for “input file”, of stands for “output file” and bs tells dd how many bytes to read at a time.

In our case, the input file is the disk image rpfr-17-xfce-RC2.img, the output file is the MicroSD card device /dev/mmcblk0 and the block size is one megabyte (1M). This command will create the necessary file systems partitions on the MicroSD card, occupying 3.1GB of space, then copy the prepared operating system files to those partitions. A one step installation!

Note

As you’ll learn later, the first boot wizard will allow you to resize the main partition to use all available space on the card.

Tip

The dd command is also your friend if you need to move to a bigger MicroSD card. Simply reverse the if and of values, insert a bigger card and run the above command again.

The dd command doesn’t output any messages until the operation is complete, so be patient. The length of time to execute the command will vary depending on the speed of the card. With my Class 6 card, it takes about 8 minutes (7 MB/s). Here’s an example of the output you’ll see when the command finishes:

You can verify the operation worked by ejecting the MicroSD card, reinserting it, then browsing the contents using the file explorer. You should see two mounts, boot and rootfs. Once you’re done poking around, unmount boot and rootfs and eject the card.

The MicroSD card is ready. Now let’s prepare the Pi!

Preparing the Pi

Plug the following inputs into the Raspberry Pi board:

MicroSD card

Monitor HDMI cable

USB keyboard

USB mouse

Ethernet cable, USB wireless card or USB tethered smartphone

(Personally I use my Android phone as my wireless card by enabling the USB tethering feature).

Next, turn on the monitor and, if necessary, the keyboard and mouse. Set the resolution of the monitor to “Just Scan” if it offers that setting. Otherwise, use the default setting (e.g., 16:9 or 4:3).

The Raspberry Pi only has two USB ports, which you may quickly outgrow. One solution is to expand the number of ports by adding a (preferably powered) USB hub. Before going that route, you can save one of the USB ports by getting a keyboard and mouse that can share the same port.

Unifying a Logitech keyboard and mouse

If you have a Logitech keyboard and mouse that can connect to a single receiver, they can be configured to use that same unifying receiver in Linux. Copy the source code from this blog to the file unifying_pair.c and execute these commands:

While that’s running, switch off the keyboard and mouse, then switch them on. You should now be able to control both the keyboard and the mouse using a single USB receiver. Plug that receiver into the Raspberry Pi.

Power it up!

The final input is the power (otherwise known as the “on” switch).

Grab a cellphone charger cable (micro USB, I use my HTC Sensation’s power cable) and plug it into a power outlet. You may be tempted to use the USB port of your laptop as the power source; however, the USB port may not provide the necessary power required by the Model B Raspberry Pi (700mA). The general recommendation is to play it safe and use a wall outlet.

It’s action time! Plug the micro USB end of the cable into the micro USB input and wait a few seconds for a raspberry to appear on the monitor. If you see one, then the Fedora Remix is booting. If not, you may need to play with the settings on your monitor.

Customizing the installation on first boot

This wouldn’t be a Fedora installation without the first boot wizard. The inclusion of first boot is one of the features that sets the Fedora Remix apart from other Raspberry Pi distributions. In addition to the simple first boot operations (review license, set language, timezone and date, root password), the Fedora Remix allows you to:

Resize the rootfs partition to use all remaining space on the MicroSD card, optionally allocating some of that space for a swap file (I used the defaults)

Create a user account (add the user to administrators group)

On the system settings screen you can modify the host name (default is raspi.local), choose graphical or text boot type mode, configure the RAM allocation between the CPU and GPU (out of available 256MB), and select video display configurations. I used the wizard selected options shown in the screenshot below.

Hit the finish button. The Pi will reboot twice on its own (once to resize the disk). Go get some coffee, this will take several minutes.

Note

If you get the Oh no! Something has gone wrong. screen, don’t panic. Type ctrl+alt+delete to initiate a third reboot.

Once the desktop comes up, don’t worry if it doesn’t fill the screen, we can fix that later. Now log into the XFCE desktop with the user account you created during the boot wizard.

After you’ve logged in (go check your email, this may take a moment as well), you’ll see the following dialog window.

This is part of the XFCE desktop; I chose the default configuration.

Updating Fedora Remix on the Raspberry Pi

You use Fedora Remix on the Raspberry Pi just like any other Fedora installation. You might start by opening a terminal and updating the packages (internet connection required):

sudo yum -y update

You can browse the hardware information by installing and running hardinfo:

sudo yum -y install hardinfo

After you type the above command, you will be asked for your password. Next, the system will resolve dependencies, download new packages, run transaction check and test, run transaction, and install packages.

The flashing lights on the Raspberry Pi board will indicate that the computer is hard at work.

When the hardinfo installation is complete and the command line prompt reappears, type:

hardinfo

Now you can easily explore the Raspberry Pi and Fedora Remix system specifications.

The desktop may seem a bit sluggish, but keep in mind what you are running it on. (It’s also because the Fedora Remix has not been compiled to take full advantage of the processor, which may change in Fedora 18).

One setting you won’t be able to configure from the control panel is the resolution. For that to change, you have to modify the Raspberry Pi configuration file. Let’s explore a few of those settings.

Tweaking the display and memory on the Raspberry Pi

The Raspberry Pi hardware is configured in the config.txt file in the /boot partition (/boot/config.txt). One of the key settings is the display resolution. Here’s the setting I used to stretch the desktop to full 1080 resolution (since my monitor supports it):

Note

You can’t simply click on the text document, open it in leafpad, edit it and hit save because you need root priviledges. To update this file you’ll need to access it through a terminal using sudo.

Open a terminal window and type:

cd /boot
sudo leafpad config.txt

After you enter your password, leafpad will launch. Add the following setting to the file in leafpad:

hdmi_mode=5

I also recommend these settings to make the monitor display the image properly.

hdmi_force_hotplug=1
disable_overscan=1
hdmi_group=1

Save the file and close it. Reboot the Raspberry Pi for the changes to take affect. You can type the following command in the terminal to reboot.

sudo shutdown -r now

Keep in mind that running the desktop at higher resolution does take more memory. You may want to opt for a lower resolution. Experiment with the values until you find what works for you. Consult the full list of resolution modes to find the hdmi_mode value for each resolution.

You can also make the desktop run faster by allocating more memory to the CPU. The RAM partitioning is controlled by the file start.elf in the /boot partition (/boot/start.elf). There are several alternative partitioning files in that directory with the pattern arm*_start.elf.

The number after “arm” is the amount of RAM dedicated to the CPU. To give 240MB of RAM to the CPU and the remaining 16MB to the GPU, use this copy command:

cp arm240_start.elf start.elf

If you want to play multimedia, you probably want to split the RAM down the middle at 128MB a piece (the most you can give to the GPU):

cp arm128_start.elf start.elf

Reboot for the change to take affect. Play with the values and see which one works best for you.

Tinker!

The Fedora Remix is one of many distributions you can install on the Raspberry Pi, and there is plenty of room for it to improve. If your goal is to use the Raspberry Pi as a multimedia center, Fedora Remix may not be your best option (check out OpenELEC). You’d choose Fedora Remix for things the Fedora OS excels at, such as software development. Fortunately, you don’t have to limit yourself to a single distribution. Changing distributions is as easy as swapping MicroSD cards. We encourage you to try different distributions to get the most out of your Raspberry Pi.

Tuesday, October 9, 2012

“Why, yes it is! To be exact, it’s a Fedora Remix running on a Raspberry Pi.”

That was a popular exchange at the Fedora booth during this year’s Ohio LinuxFest. The iconic Model B Raspberry Pi, running Fedora Remix and proudly displaying the Beefy Miracle fireworks on a XFCE desktop, was drawing lots of attention.

As OLF attendees quickly discovered, using the desktop requires a little extra patience since the libraries aren’t (yet) optimized for the hardware. But, don’t underestimate this board. It packs a powerful punch and future releases plan to take full advantage of its capabilities to speed up execution of the programs. (See this fedora-arm mailinglist post or search for “soft-float vs hard-float” for details)

Questions at the booth that followed were typically:

“Who maintains it?”

“Where do I get it?”

“How do I install it?”

First, let’s start with, “What is a Raspberry Pi?”

What is a Raspberry Pi?

A Raspberry Pi is a system-on-a-chip (SoC) single-board computer. In other words, it’s an incredibly compact general purpose computer. It even fits inside one of my mini pie dishes. Mmmm, pie!

Let’s back up and begin with the central component that makes this all possible, the ARM chip.

ARM chips are the most widely-produced processors in the world because they are small, cheap and require minimal power. They are found in smart phones, tablets, routers, embedded controllers, gaming consoles and streaming digital media devices. As the chips become more powerful and SoCs less expensive, consumer operating systems such as Fedora can be installed on them.

Several companies manufacture and sell ARM-based SoC computers priced under $100 that are specifically designed for you to install your Linux distribution of choice. The Raspberry Pi is notable for its $35 price tag, less than half the price of the next cheapest ARM-based SoC, the $89 BeagleBone.

The Raspberry Pi Model B is based on the Broadcom BCM2835 SoC and includes these components and ports:

Single-board systems like the Raspberry Pi aren’t just miniaturized computers locked in a box, though. They’re open, development boards with general inputs and outputs (GPIOs) that allow expansion through add-on boards and external devices. Installing a Linux distribution like Fedora is just the first step of becoming a maker!

Who maintains the Fedora Remix for the Raspberry Pi?

It begins with the Fedora ARM project, an initiative to port Fedora to the ARM processor family. The group has successfully created Fedora 17 GA images for single-board computers including the BeagleBoard, SheevaPlug, PandaBoard, and Trim-Slice. However, the Fedora Project does not yet produce an official release for the Raspberry Pi due to certain licensing issues. Specifically, the Raspberry Pi relies upon a custom kernel (not upstream) as well as special GPU binary blobs which are not acceptable under the current firmware exception in Fedora.

But, if you want Fedora 17 on your Pi today, do not despair! There’s a Fedora Remix for that!

The Fedora ARM group is working to make ARM a primary Fedora architecture for all future releases and to expand support to additional SoCs, including the Raspberry Pi. Until Fedora officially supports the Raspberry Pi, you’ll need to use the Fedora Remix.

How do I get a Raspberry Pi and the Fedora Remix?

Let’s take it one question at a time.

How do I get a Raspberry Pi?

You may have heard that you need to know the right people to get your hands on a Raspberry Pi or that there is a purchasing restriction. Neither of those rumors are true anymore, though you may still run into backorders. Numerous distributors† sell the Pi, including http://www.alliedelec.com/lp/120626raso/?cm_mmc=Offline-Referral--Electronics--RaspberryPi-201203-_-World-Selector-Page[Allied Electronics], Newark, Adafruit Industries and MCM Electronics but be prepared to wait (last minute holiday shoppers, you’ve been warned!). MCM Electronics and Adafruit also sell an array of accessories like the clear case that houses my Pi, shown below.

Does the Raspberry Pi have a handbook?

If you want to become more familiar with your Raspberry Pi and the story behind it, check out the Raspberry Pi User Guide, written by the Pi’s master chef. That’s the book I read before booting the Raspberry Pi for the first time (on the plane heading to Ohio LinuxFest :)). Having that background knowledge helped make the installation process a breeze.

† We’re not endorsing any of the listed distributors of the Raspberry Pi or its accessories. The companies mentioned are just a sampling of results returned after executing a “buy Raspberry Pi” internet search. Sarah’s Pi was gifted to her by a spotted hypnotoad. Dan purchased the Adafruit case through MCM Electronics.

Tuesday, August 14, 2012

At OSCON 2012 in Portland, OR the Fedora booth may have been small, but it packed a full cast of characters and crowd-gathering technology. Beefy Miracle waved from atop the Fedora marquee and Tux stopped by for a few hours each day. Few attendees could resist posing for a picture with Tux or snagging a Beefy Miracle sticker to embellish their laptop.

Fedora on a Raspberry Pi

The Fedora booth showcased the features and capabilities of Fedora running on a Raspberry Pi (a cheap, low-power computer that features an ARM processor). People were in awe that a tiny system on a chip (SoC) could support a widescreen monitor and an external hard drive and run full length movies at 1080p resolution with no problems (except when I overheated the chip by leaving my laptop next to it (my bad!)).

Tux Photobooth

The Raspberry Pi ran the semi-automated photography booth. Hooked up to a camera and using a python script, the Pi snapped photos of the attendees posed with Tux. Attendees could then scan the QR code generated by the script and displayed in the web browser to retrieve their picture later.

The first photobooth session occurred on Tuesday night, during the opening of the expo floor. During the ever-popular OSCON booth crawl on Wednesday night, Tux returned to the photobooth and later toured the expo floor to meet his fans.

Amazing fact:Tux can write python code with his wings! Prior to the session on Wednesday, Tux took a few moments to modify the python program that captures, scales, and posts the pictures when the usual Nikon was replaced with a Canon (new drivers had to be loaded). The equipment and instructions to host your own Raspberry Pi photobooth are being drafted on the new Raspberry Pi photobooth wikipage.

Fedora Packages Search App

I did field a few questions about Fedora 17’s development environment and got to point out the servers and frameworks packaged in Fedora 17. There was also a question about the latest KVM virt-manager instance. I’m just learning about virtual machine technologies, and version numbers are not my strong point. However, this allowed me to show off the Fedora Packages Search app (using Firefox on the Pi!). If you’re not familiar with the Fedora packages search app, you need to check it out. It rocks! You can quickly find out if the program you’re interested in is packaged, which version is packaged in which release, what updates are coming, and much more all within a clean, easy to use web interface.

I use the packages search app almost every day as I continue to learn more about Fedora’s features, release cycle, and the awesome people dedicated to adding new and improved programs and capabilities to Fedora.