jump to navigation

Installing Fedora 12 on a Guruplug May 13, 2010

Posted by Paul Whalen in ARM.

The first GuruPlug arrived recently for our planned ARM Koji farrm for the Fedora Project. The plug ships with Debian, so the first step was to install Fedora 12. With 512 MB NAND we decided to install the Fedora root file system provided here onto a 4 GB class 6 micro SD card. Initially we are going to use the Kernel provided on the GuruPlug and then upgrade at a later date. This will also leave the Debian file system in place in case it is needed later. The micro SD card was previously used in our OpenRD client and therefore has some existing partitioning which I left, so if you plan on following this as a guide make sure you substitute the major and minor device numbers so that your Uboot commands work for your partitioning.
First untar the provided rootfs tarball onto the SD card (pls change mount point of the SD card to match yours):
** The SD card should be formatted as an ext2/3 filesystem, and below commands executed as root**
[root@newzealand ~]# tar -jxf rootfs-f12.tar.bz2
[root@newzealand ~]# cp -r rootfs-f12/* /media/flash/

Insert the micro SD into your GuruPlug, connect the JTAG breakout box (hopefully you have one) provided to the GuruPlug and connect the USB to another PC running Linux (hopefully Fedora!). You will need to have the package Minicom installed, if you do already please skip the first step:
[root@newzealand ~]# yum install minicom
[root@newzealand ~]# minicom -s

Running the last command as root will allow you to configure minicom to use the USB you have connected to the GuruPlug as a serial connection. Go to the option ‘Serial port setup’ and hit enter. Edit the fields as shown below, substituting the USB connection if needed to match yours.
| A - Serial Device : /dev/ttyUSB0
| B - Lockfile Location : /var/lock
| C - Callin Program :
| D - Callout Program :
| E - Bps/Par/Bits : 115200 8N1
| F - Hardware Flow Control : No
| G - Software Flow Control : No

Once completed run the following command to connect to the serial connection on the GuruPlug:
[root@newzealand ~]# minicom

Power on the GuruPlug and you should see the boot up sequence, allow it to boot to Debian so you can find out the major and minor device numbers for the micro SD card that has the Fedora rootfs on it. Run the following command when you have logged into Debian as root:
sheevaplug-debian:/dev# ls -l /dev/sd*
brw-rw---- 1 root floppy 8, 0 2009-08-08 09:30 /dev/sda
brw-rw---- 1 root floppy 8, 16 2009-08-08 09:30 /dev/sdb
brw-rw---- 1 root floppy 8, 17 2009-08-08 09:30 /dev/sdb1
brw-rw---- 1 root floppy 8, 18 2009-08-08 09:30 /dev/sdb2

This shows that the major and minor device numbers for ‘/dev/sdb2’ which I put the rootfs on, are 8 and 18 respectively. That number needs to be converted to hex, for entry in Uboot – 8,18 in decimal converts to 8,12 in Hex, for entry in Uboot this will be entered as ‘0812’. Again, yours will be different, so be sure to substitute the correct values.
Reboot the GuruPlug and this time hit any key before the system boots into Debian. Once at the Marvell prompt type:
Marvell>> nand read.e 0x6400000 0x100000 0x400000
Marvell>> setenv bootargs console=ttyS0,115200 root=0812 rootdelay=10
Marvell>> bootm 0x6400000

This should boot the GuruPlug into Fedora 12, the default password for root is ‘fedoraarm’. I had some issues booting the plug initially as it was not recognizing the micro SD card and finding the rootfs, once I added the rootdelay of 10 this worked, however lesser numbers did not. You will also of course have issues if the major and minor numbers are incorrect, so please make sure this is correct and converted to Hex. If you are happy with the these settings and would like the GuruPlug to boot using the Fedora file system you will need to reboot, again hitting any key to get to the Marvell prompt, this time you will need to edit and remove existing boot parameters, below is the default output of the ‘printenv’ command:
Marvell>> printenv
bootcmd=setenv ethact egiga0; ${x_bootcmd_ethernet}; setenv ethact egiga1; ${x_;
x_bootcmd_usb=usb start
x_bootcmd_kernel=nand read.e 0x6400000 0x100000 0x400000
x_bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs

To change the location of the rootfs, enter commands below, changing the values again to represent your configuration:
Marvell>> editenv x_bootargs_root
edit: ubi.mtd=2 root=0812 rootdelay=10
Marvell>> saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x40000 -- 100% complete.
Writing to Nand... done
Marvell>> reset

Hopefully you see ‘Welcome to Fedora’ after the boot. If you would like to change the plug back to the default install of Debian, then you simply have to edit the boot parameters and change back to their original values, saving once completed.


1. John L Magee - May 15, 2010

So this works but iptables, probably among other things does not work with this combination of debian kernel and fedora 12 rootfs.

Would an updated Fedora 12 kernel supporting the GuruPlug be forthcoming soon or should I try building one on my own?

Thanks for this update by the way.

2. Biaherychiarl - May 16, 2010

Just want to say what a great blog you got here!
I’ve been around for quite a lot of time, but finally decided to show my appreciation of your work!

Thumbs up, and keep it going!


3. otto rey - May 28, 2010

Whit this great information we can build a GUI that helps to do at least half of steps and guide us through the process, dont you think?

4. Bernhard - May 28, 2010

Warning: unable to open an initial console.

Any idea?

Bernhard - May 28, 2010

I think I now know why, when extracting the rootfs as you did, it won’t create a dev/null nor dev/console which in my case is not that funny. So does anybody know which scripts of init.d need to be run before I can execute my own shellscript to create dev/console and dev/null ?

5. hans van den bogert - May 28, 2010

what’s the filesystem type on your sd card/ sdb2?

Paul Whalen - June 2, 2010


6. Bernhard - May 30, 2010

you should mention that untar is required to be root and the target filesystem must have support for hardlinks, softlinks and permissions (especially for those like my having to move data via usbstick to the plug)

Paul Whalen - June 2, 2010

Thanks and good point. Updated to include both.

7. Malcolm - June 22, 2010

When I boot the MAC addresses of eth0/eth1 are not detected, they are both set as 00:00:00:00:00
Jun 22 15:25:26 fedora-arm kernel: net eth0: port 0 with MAC address 00:00:00:00:00:00:00:00

Any ideas what is missing?

Paul Whalen - June 25, 2010

I had the same issue and set the MAC address manually using:

ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

8. joe - June 26, 2010

Hey Paul – Thanks for the GREAT howto. I wasted so much time on my sheevaplug when I first got it, this writeup was great.

Have you been able to get the wireless nic working?


9. Malcolm - June 26, 2010

Couple of Extra things I noticed.
you need to copy across /lib/modules/*
and /lib/firmware/mrvl as well as copying everything in the /root directory (the uap module and having initscripts I found usefull)
and also the /usr/bin/uaputl file

10. Bernhard - July 20, 2010

Can I somehow get the root partition number within uboot or from external? I am currently unable to boot. Or how can I boot debian again?

Bernhard - July 20, 2010

Sry, overread a part, but is it possible to get the device number from uboot?

Bernhard - July 21, 2010

Nvm, plx add the fact that rootdelay=… has to be put after root=.. otherwise it will be ignored (ate 2 days -.-)

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 )

Connecting to %s

%d bloggers like this: