Virtualise Raspbian Wheezy 2013-02-09 on Ubuntu Linux 12.10
Why?/What do I get?
It's a pretend Raspberry Pi, running completely in software, on your desktop, that you can use as if it is a real one (minus the ports and GPIO obviously). LXDE (Desktop) runs, and the internet/network is connected. You can SSH into it, make copies of it, trash it, start a new one from a previous saved copy, and generally do pretty much anything software-wise with it that you would do with a real one.
Using X (the desktop) may be a bit slow depending on your hardware. I ran this on an Intel d525mw dual core Atom board with 4GB of RAM and a fresh install of Ubuntu 12.10, and the desktop was sluggish at best, and sometimes unresponsive. The console was very quick, and was like using the real thing.
Qemu is a typical old-school Linux console app - it's pretty terse with error messages, and has esoteric command line switches. I'm going to check out some Qemu managers in the Ubuntu Software Store.
Ubuntu 12.10 Desktop installed and running with up-to-date packages/list
Raspbian Wheezy 2013-02-09
Linux kernel for Qemu
(Note that a Raspberry Pi is not required for this)
These instructions may very well work with Ubuntu 12.04 LTS and earlier, as well as Debian, Mint, and other Linux's/Linuxi/Linuxes. If you have a non-Debian distribution, you will need to use your package managers commands instead of apt-get.
http://xecdesign.com/qemu-emulating-ras ... -easy-way/
http://www.raspberrypi.org/phpBB3/membe ... file&u=356
$ mkdir ~/qemu_vms/
Download/copy Raspbian Wheezy to ~/qemu_vms/
Download kernel-qemu to ~/qemu_vms/
$ sudo apt-get install qemu-system
$ file ~/qemu_vms/2013-02-09-wheezy-raspbian.img
From the output of the file command, take the partition 2 'startsector' value an multiply by 512, and use this figure as the offset value in the mount command below.
$ sudo mount ~/qemu_vms/2013-02-09-wheezy-raspbian.img -o offset=62914560 /mnt
$ sudo nano /mnt/etc/ld.so.preload
Comment out the line in the file (use a # as the first character of the line) and save the file (CTRL+X, then "Y" for yes).
$ sudo umount ~/qemu_vms/2013-02-09-wheezy-raspbian.img /mnt
$ cd ~/qemu_vms/
$ qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda ~/qemu_vms/2013-02-09-wheezy-raspbian.img -redir tcp:5022::22
Qemu gives you a root shell, run:
$ fsck /dev/sda2
$ shutdown -r now
Login as pi
Thanks so much to user/moderator 'ShiftPlusOne' for devoting some time on IRC to helping me get this going.
NOTE: The command list above is pretty terse, and without comment/explanation per command. It is all self explanatory for people vaguely familiar with the command line, and I wanted to keep that section brief, so it looks less scary for newbies (a short set of clear commands!). If anyone needs an explanation of any of this, ask away...