Friday, August 19, 2011

How to install ARM Debian on Ubuntu using Qemu

1. Install the "qemu" and "qemu-system" packages

$sudo apt-get install qemu qemu-system

2. Download the debian initrd and kernel image for ARM


3. Create a 10 GB disk image to be used as harddisk

$qemu-img create -f raw armdisk.raw 10G

4. Start qemu

$qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -initrd initrd.gz -hda armdisk.raw -append "root=/dev/ram" -m 256 

This will start the debian installer for ARM platform.

At the end of installation you will get a error message that boot loader cannot be installed - just ignore it.

5. Once it has finished installing next step is to copy the vmlinuz and initrd from the installed debian system for booting.

Create a mount point:
$sudo mkdir /mnt/armdeb

Mount the harddisk image:
$sudo mount -o loop,offset=32256 armdisk.raw /mnt/armdeb

Copy the kernel and initrd image:
cp /mnt/armdeb/boot/vmlinuz-2.6.26-2-versatile .
cp /mnt/armdeb/boot/initrd.img-2.6.26-2-versatile .

Unmount the harddisk image:
$sudo umount /mnt/armdeb

6. Finally boot into the newly installed ARM debian system:
$qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -initrd initrd.img-2.6.26-2-versatile -hda armdisk.raw -append "root=/dev/sda1"

1 comment:

  1. Hi,

    But this only gives me the console.
    How to get the GUI??
    Any help will be greatly appreciated!