Instructions to Run Raspberry Pi Fedora 14 Remix in QEMU

Orange Pi Development Boards

As mentioned in my previous post, the Raspberry Pi Foundation has just released the Fedora 14 Remix SD card image that can be installed either via  installer (easiest method) or using dd / windd as with the previous image.

In this blog post, I’ll give the instructions how to run Raspberry Pi Fedora 14 Remix in QEMU using a similar method than the one I used for Debian Squeeze. I tested since in machines with Ubuntu 10.04 LTS and Debian 6.0.4.

  1. Download the image using BitTorrent raspberrypi-fedora-remix-14-r1.img.gz.torrent or via the HTTP link available on Raspberry Pi Download page.
  2. Decompress the image:
  3. Download kernel 3.0.4 image for qemu, if you don’t have it yet.
  4. Since the rootfs is full (in the real board it will be resized to the size of the SD Card), we need to increase the size of the rootfs partition. First create and empty 3G image and format it to ext3:
  5. Find the offset for the rootfs in the SD card image, mount it and copy the files to the new image:

    #file raspberrypi-fedora-remix-14-r1.img
    raspberrypi-fedora-remix-14-r1.img: x86 boot sector; partition 1: ID=0xb, active, starthead 0, startsector 2048, 204800 sectors; partition 2: ID=0x83, starthead 0, startsector 206848, 3246080 sectors, code offset 0xb8
    mkdir mnt
    mkdir mnt2
    sudo mount -o loop,offset=$[206848*512] raspberrypi-fedora-remix-14-r1.img mnt
    sudo mount -o loop rootfs3G.ext3 mnt2
    sudo cp mnt/* mnt2 -a
    sudo umount mnt2
    sudo umount mnt

  6. Build the latest qemu-linaro (Optional) . This fixes the “qemu-system-arm: slirp/arp_table.c:41 ” error for me  (Cf Note 1 at the bottom of this post). Following the instructions at
  7. Run QEMU as follows:

    qemu-system-arm -M versatilepb -cpu arm1176 -m 192 -hda rootfs3G.ext3 -kernel zImage -append "root=/dev/sda" -serial stdio -redir tcp:2222::22

    There is no password as the first time the image runs, it will ask you to set the root password, create a regular user and set a password for that user, select your timezone, and select whether you wish to boot into graphical or text mode.  The very first time, it will stay in terminal mode even if you selected Graphical mode.  Login as root to access the command line and change the permissions of the temp directory:

    You can now either  reboot your emulator or type “init 5” to start the graphical interface.

    If for some reasons you have no access to the keyboard in the graphical interface, you can always login to qemu via ssh to access the command line:

Once you followed those steps and selected graphical mode, you should see a login screen that looks like the one below.

Raspberry Pi QEMU
Raspberry Pi Fedora 14 Remix in QEMU

Note 1: If you get the following error:

qemu-system-arm: slirp/arp_table.c:41: arp_table_add: Assertion `(ip_addr & (__extension__ ({ register unsigned int __v, __x = (~(0xf << 28)); if (__builtin_constant_p (__x)) __v = ((((__x) & 0xff000000) >> 24) | (((__x) & 0x00ff0000) >> 8) | (((__x) & 0x0000ff00) << 8) | (((__x) & 0x000000ff) << 24)); else __asm__ (“bswap %0” : “=r” (__v) : “0” (__x)); __v; }))) != 0′ failed.

You can either add “-net none” to make it “work”, but you won’t have network access or try step 6 in the instructions above.

60 Replies to “Instructions to Run Raspberry Pi Fedora 14 Remix in QEMU”

  1. Thank you for your post. A few remarks:

    – needless to say, but you need to gunzip the img.gz
    – md5sum is: 53d13c194ad37f7f59586ff10313b178 raspberrypi-fedora-remix-14-r1.img
    – I need the “-net none” too πŸ™ (Ubuntu 11.10 64-bit)
    – On the first login, you need to change your password, which was annoying: it kept saying the password was in a dictionary (even with a 4 letters + 3 numbers). Solution: 8 ‘random’ letters
    – on the first boot, indeed no GUI
    – on second boot, I get the login GUI (in brown, not blue), and I can select my name, but the password field is not accepting any keyboard input: the vertical line in that field is blinking, but nothing happens when typing on the keyboard and/or pressing ENTER. So I can’t login. πŸ™

  2. Some more results:

    – the forced password change on first login is horrible. And it keeps on saying “dictionary”. It’s very picky. I fear this will be a dissatisfier for Raspi users. I wonder why the Seneca/Raspi have chosen this high level of security.
    – On the first (so: non-GUI) run, after I login on the CLI and I issue “date > blabla.txt” it says “no space left on device”. And “df” shows 0 bytes free. There are two devices: /dev/mmcblk0p1 and tmpfs. Is that correct?

  3. @ Sander
    I also get 2 devices with tmpfs and /dev/mmcblk0p1 which are full. I think the reason for it is that this release of Fedora tries to resize the rootfs to the size of the SD card during the first boot. We don’t have SD card so no resizing takes place.

  4. @ Sander
    About “On the first login (and actually others), you need to change your password.”. This is most probably because the network is not working and we can’t get the time with NTP.

  5. I’m going to bed so here are some fixes and debug info in case somebody wants to look into it.

    To fix the network issue:

    Build qemu (using linaro development tree – 3rd option) as explained in

    To resize the rootfs:

    dd if=raspberrypi-fedora-remix-14-r1.img of=fedora-pi.ext3 skip=206848 count=3246080
    dd if=/dev/zero of=rootfs2G.ext3 count=3906250
    /sbin/mkfs.ext3 rootfs2G.ext3
    mkdir mnt
    mkdir mnt2
    sudo mount -o loop fedora-pi.ext3 mnt
    sudo mount -o loop rootfs2G.ext3 mnt2
    sudo cp mnt/* mnt2 -rf
    sudo umount mnt2
    sudo umount mnt

    The keyboard does not work yet in LXDE apparently because the haldaemon cannot start

    [[email protected] ~]# hald –daemon=no –verbose=yes
    09:07:33.433 [I] hald.c:673: hal 0.5.14
    09:07:33.447 [I] hald.c:674: using child timeout 250s
    09:07:33.453 [I] hald.c:739: Will not daemonize
    09:07:33.487 [I] hald_dbus.c:5444: local server is listening at unix:abstract=/var/run/hald/dbus-fVB2mXJwsx,guid=6a143e296f003ed39075d76d00000107
    09:07:33.673 [I] hald_runner.c:304: Runner has pid 463
    Runner started – allowed paths are ‘/usr/libexec:/usr/libexec/scripts:/usr/bin’
    09:07:33.805 [I] hald_runner.c:184: runner connection is 0x699a0
    09:07:33.991 [W] osspec.c:388: Unable to open /proc/mdstat: No such file or directory
    09:07:34.232 [I] mmap_cache.c:126: Regenerating fdi cache..
    Run started hald-generate-fdi-cache (60000) (0)
    ! full path is ‘/usr/libexec/hald-generate-fdi-cache’, program_dir is ‘/usr/libexec’
    pid 465: rc=0 signaled=0: /usr/libexec/hald-generate-fdi-cache
    09:07:37.872 [I] mmap_cache.c:104: In regen_cache_cb exit_type=0, return_code=0
    09:07:37.902 [I] mmap_cache.c:156: fdi cache generation done
    09:07:37.903 [I] mmap_cache.c:278: cache mtime is 1331214887
    *** [DIE] mmap_cache.c:di_rules_init():70 : Unable to open cache /var/cache/hald/fdi-cache

    [[email protected] ~]# ls -l /var/cache/hald/fdi-cache
    -rw-r–r– 1 root root 251828 Mar 8 09:07 /var/cache/hald/fdi-cache
    [[email protected] ~]#

  6. I’ve just fixed hald issue by change the ownership of hald directory: chmod haldaemon:haldaemon /var/cache/hald -R.

    /etc/init.d/haldaemon start works fine.

    However, It still did not fix the keyboard issue for me.

  7. Thanks to your new instructions, I was able to get it running.

    Typos IMHO:

    dd if=/dev/zero of=rootfs3G count=6M
    dd if=/dev/zero of=rootfs3G.ext3 count=6M
    (so: .ext3 as extension)

    sudo mount -o loop ,offset=$[206848*512] raspberrypi-fedora-remix-14-r1.img mnt
    sudo mount -o loop,offset=$[206848*512] raspberrypi-fedora-remix-14-r1.img mnt
    (so: no space)

    sudo mount -o loop rootfs3G.ext3 mnt3
    sudo mount -o loop rootfs3G.ext3 mnt2
    (s0: mnt2, not mnt3)


    The “ssh … / chmod 777 /tmp” was indeed necessary, so better to include it in the instruction itself?
    I didn’t want/dare to “make install” (BTW: isn’t sudo needed) the new qemu, so I’m running it from the subdirectory it was made in: ” qemu-linaro/arm-softmmu/qemu-system-arm …” and that works.

    Result: a working GUI. Great. Thank you for your work and instructions!

    Now I have to find the Fedora commands (after 6 years Ubuntu) …

  8. BTW: the “ssh -p 2222 [email protected]” is fantastic! That way the emulated-arm only needs to run a prompt (and no Firefox, which seems to be very heavy), and I can just copy-paste command from Chromium on the host into the ssh terminal of the emulated ARM. Works much better.

  9. Hi,

    I followed your instructions until step 7 without an error. But when i try to start qemu with the command:

    qemu-system-arm -M versatilepb -cpu arm1176 -m 192 -hda rootfs3G.ext3 -kernel zImage -append “root=/dev/sda” -serial stdio -redir tcp:2222::22

    The following happens:

    oss: Could not initialize DAC
    oss: Failed to open /dev/dsp'
    oss: Reason: No such file or directory
    oss: Could not initialize DAC
    oss: Failed to open
    oss: Reason: No such file or directory
    audio: Failed to create voice lm4549.out'
    VNC server running on′
    Uncompressing Linux… done, booting the kernel.

    After this output nothing more happens.

    I hope you can help me with this problem.
    I am working on a Fedora 16 with version 1.0.50 of qemu

    Thanks for your great how-to,

  10. @skyspy:

    You need to open a VNC connection to

    On Ubuntu: vinagre localhost:5900


  11. Ouch: no IPv6 in the Fedora-ARM-image … ?

    [[email protected] ~]# service miredo-client start
    Starting miredo: Error: IPv6 stack not available.
    [[email protected] ~]# ifconfig
    eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
    inet addr: Bcast: Mask:
    RX packets:73657 errors:0 dropped:0 overruns:0 frame:0
    TX packets:31052 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:91319418 (87.0 MiB) TX bytes:2823309 (2.6 MiB)
    Interrupt:25 DMA chan:ff

    lo Link encap:Local Loopback
    inet addr: Mask:
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1547 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1547 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:162859 (159.0 KiB) TX bytes:162859 (159.0 KiB)

    [[email protected] ~]#

  12. @ skyspy
    I’ve never had this issue, actually qemu-system-arm will only show the line:
    Uncompressing Linux… done, booting the kernel.

    What’s the output of qemu-system-arm –version ?

  13. @Sander

    Thanks using tigervnc on Fedora works!

    I think the errors concerning the audio hardware are based on the fact that I run my Fedora in a virtual machine.

    qemu-system-arm -version sais: QEMU emulator version 1.0.50 (qemu-linaro from git), Copyright (c) 2003-2008 Fabrice Bellard

  14. I have a problem with the XScreenSaver 5.12 that is locking the screen after a while: after typing my password, it says “authentication failed”. It is the password I used to logon. I still can logon using ssh.


    I will reboot, get into the GUI and then try to disable the screen saver / screen locker.

  15. I have the same messages:

    oss: Could not initialize DAC
    oss: Failed to open /dev/dsp'
    oss: Reason: No such file or directory
    oss: Could not initialize DAC
    oss: Failed to open
    oss: Reason: No such file or directory
    audio: Failed to create voice lm4549.out'
    VNC server running on′

  16. Thanks for the instructions. Worked beautifully for me πŸ™‚ !

    I tried first with a stock QEMU but ran into the documented slirp assertion. Following step 6 resolved it and now everything works fine. Rather slow (a BogoMIPS of 183 on my system – not exactly a speed daemon ;-)), but it works.

    Sander, I get the same messages on startup but the VM starts up just fine. Run “vncviewer localhost” and you should be able to see the VM boot.

  17. Working great here also.
    I don’t suppose you have the built 3.0.4 kernel modules also? Would be useful for things like ext3 support etc.

  18. @ Brian
    Depending on what you want to do you could also build some kernel modules or (easier) build missing features into the kernel, but most of what you need is already in the kernel zImage. Somebody already noticed IPv6 is missing in my kernel, so if you need it you’d have to rebuilt it.

  19. @cnxsoft

    Could you create and provide a kernel with IPv6? I tried the instruction, but that’s above my head: I got stuck at “General Setup β€”>Cross-compiler tool prefix (We need to enter the path of the toolchain followed by β€˜/bin/arm-none-eabi-’)” … toolchain?

  20. @ cnxsoft

    Typos IMHO:

    chmod haldaemon:haldaemon /var/cache/hald -R.
    chown haldaemon:haldaemon /var/cache/hald -R.

    Thank you for your howto!

  21. I have similar issue with the screensaver, except I can type but the password is not accepted. The second digit is an @ so I tried both [shift] [2] and [shift] the key next to [L].
    Still looking.

  22. @cnxsoft Thank you for the IPv6-enabled kernel. With IPv6 I will be able to access the emulated ARM directly on all ports, as IPv6 is not bother by Qemu’s NAT

    @rod: Even my quite normal password (letters + numbers)doesn’t work. I think there is something wrong with the screensaver.
    As I couldn’t find yet where to disable the screensaver, I’ve just kill-ed the it: ps -ef | grep -i xscreen, and then kill it. Maybe “kill xscreensaver” also works.

  23. FYI:

    As root, I removed the screensaver like this:

    yum remove xscreensaver-base.armv5tel

    No screensaver, so no screensaver login problem, I hope.

  24. I now have a Qemu resolution of 640×480. I tried starting with “-vga cirrus” and “-vga std”, but I got “Error: Cirrus VGA not available”

    Does anybody else know a method to get a higher resolution than 640×480?

  25. Hi Guys,

    Following the instructions I got the image to boot and (after setup and restart) to get to the login GUI. But after choosing the user and putting in the password, it loops back to the login screen. Has anyone else had this problem? I tried it both on my Mac and in a linux VM running in virtualbox, with the same results.



  26. Thanks cnxsoft – that did the trick. I get the desktop and I was able to check with firefox and network is OK, also.


  27. Perfect HOWTO: worked exactly as described, even as far as the error message and the fix for it by compiling up a new qemu-system-arm obtained from Linaro’s Git repo. And I’m not even on Ubuntu. πŸ˜› (Gentoo x86)

    That Fedora password enforcement is the work of a pure sadist, btw. If I have to reset my password one more time to something that it thinks is suitable, I’ll scream. Anyone know where that is configured? There’s no need for such overkill security in this image which I only use for testing in a closed environment.

  28. @cnxsoft

    Thank you for the ipv6-enabled kernel. It indeed shows fe80::… in the ifconfig, so that’s gooed. I tried to install miredo-client to get IPv6 connectivity to the outside world, which … needs the TUNTAP driver. πŸ™

    [[email protected] ~]# service miredo-client start
    Starting miredo: Error: your operating system does not seem to provide a network tunneling
    device driver, which is required.
    Make sure your Linux kernel includes the “Universal TUNTAP driver”
    (CONFIG_TUN option), possibly as a module.

    So … can you include TUNTAP too, or is it time for me to setup a “toolchain” … ?

  29. BTW:

    my raspi-image seems to have a different startsector. I used your number anyway, and that works … good or bad?

    $ file raspberrypi-fedora-remix-14-r1.img

    raspberrypi-fedora-remix-14-r1.img: x86 boot sector; partition 1: ID=0xb, active, starthead 0, startsector 2048, 204800 sectors; partition 2: ID=0x83, starthead 0, startsector 206848, 3246080 sectors, code offset 0xb8

  30. PS: is my md5sum the same as yours?

    $ md5sum raspberrypi-fedora-remix-14-r1.img
    039673ad14ebe98f36697e461cabeb7c raspberrypi-fedora-remix-14-r1.img

  31. @ Sander
    I propose you try to build your own kernel, it’s not that difficult and you won’t have to wait for me each time you need a new feature. If it fails, you can always comment with your error in the post explaining how to build the kernel.

  32. @cnxsoft

    OK, I tried … I can’t find “PCI Support”. So, to speed things up: could post or mail me your “.config”? After changing “CONFIG_CROSS_COMPILE” to mine, and putting in TUNTAP, I should be able to compile it … πŸ™‚

  33. @ Jason

    I have this problem also, but how do I get to the command line if the system goes straight to GUI login?
    I tried to create the image again and chose No to go straight to GUI when first setting up the system, but I cannot use ‘su’ command – it insists I have entered the password incorrectly, even though I am sure I have entered it as I set it up! therefore I cannot use the command
    chmod 777 /tmp

    Any idea’s ??

  34. You can create the file “/etc/X11/xorg.conf” with the following content:

    Section “Screen”
    Identifier “Default Screen”
    DefaultDepth 16
    SubSection “Display”
    # Viewport 0 0
    Depth 16
    Modes “800×600”

    It will not really change the resolution, but it should expand the 640×480 window to 800×600. I haven’t found a way to do it. I’ve also tried “fbset -xres 800 -yres 600” which will change the resolution successfully in the command line, but will revert to 640×480 in LXDE.

  35. There is a better method to keep access rights and avoid a few issues (Provided by Jojopi in R-Pi Forums @ (Post 22)

    qemu-img resize raspberrypi-fedora-remix-14-r1.img 3712M
    echo -e “dn2nnnpn2nnnpnwn” |fdisk raspberrypi-fedora-remix-14-r1.img
    losetup -o $((206848*512)) /dev/loop7 raspberrypi-fedora-remix-14-r1.img
    fsck -fy /dev/loop7
    resize2fs /dev/loop7
    losetup -d /dev/loop7then you can start qemu as follows:

    qemu-system-arm -M versatilepb -cpu arm1176 -m 192 -hda raspberrypi-fedora-remix-14-r1.img
    -kernel zImage -append “root=/dev/sda2” -serial stdio -redir tcp:2222::22

    You would also be able to dd that image (with your modifications) to the SD Card.

  36. Help needed:

    1) how is the speed of your emulated Fedora-ARM-systems? I must say mine is extremely slow when / with running Firefox. I wonder what this means for the real raspi … is it really faster, or about the same speed … πŸ™ ? The 256MB RAM is quite little for a browser like Firefox and even Midori.

    2) as a user, is there a GUI option to shutdown the system? I do see a Logout, but no Shutdown. So I now login as root and then type “shutdown now”. I prefer an easier method.

  37. @ Sander
    1. I haven’t used it that much (I haven’t started Firefox), but it ought to be slow. You can see the Bogomips are about 150 to 200 in the emulator, but the real hardware should be around 700 Bogomips so a few times faster.
    However, none of the current images uses the GPU to accelerated the GPU, so it will feel sluggish, probably worse than if you run Windows in a netbook with the default video driver (e.g. in safe mode). There is a long thread about performance on the Raspberry Pi forum , there are even talks about the board having problem to handle the keyboard input… Most likely a software issue though. Hopefully, in a few months, when most of us get our board X11 GPU acceleration will be implemented.

    2. Sorry I don’t know. πŸ™

  38. @ Sander
    Hmm, it did. Maybe I’d previously sudo’d in a term session and it remembered my password. Actually, I’ve now set the ability for root to login to the GUI and the logout windows for root also displays shutdown and restart buttons, so I’m looking into adding them for users (or a power group.) Will let you know if I get anywhere.


  39. If you select the “Logout” option you should then get a menu with options to Shutdown, Reboot, Suspend, Hibernate, Logout or Cancel.

    You do not need to be root to do this..

  40. Thanks for this, if anyone else wants to try this on Windows, I managed to get it working by using the following command line –

    qemu-system-arm -kernel kernel-qemu -cpu arm1176 -M versatilepb -serial stdio -append “root=/dev/sda2 panic=1” -hda archlinuxarm-19-04-2012.img -clock dynticks

    The -clock dynticks was the key thing that helped. Hope this helps others, good luck!

Comments are closed.