I saw this command to make image

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \
-no-reboot -serial stdio -append "root=/dev/sda2 panic=1" \
-hda 2013-05-25-wheezy-raspbian.img

Here the -append field gives me some doubt...

It says /dev/sda2: does it refer to my own disk (/dev/sda2) ?

On manual page it says:

-append cmdline

Use cmdline as kernel command line

I'm confused here.


The append line adds extra options to the kernel command line in UNIX derivatives. You can add many extra options such as

  • root device (/dev/sda2 in your example)
  • initrd file
  • debugging options such as 'quiet'
  • hdd emaulation (ide-scsi)
  • boot type (single, rescue etc.)
  • VGA mode

You can find which options you can pass to append line in QEMU kernel options manual : page is now archived


If you want to pass different root partition you can pass via root=/dev/sdXX. You should display your disk layout with fdisk command if you don't know your image's root partition. Example of a sd card image disk layout:

root@pi# fdisk -l moebius.1.0.1.img 

Disk moebius.1.0.1.img: 943 MB, 943718400 bytes
255 heads, 63 sectors/track, 114 cylinders, total 1843200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000714e9

            Device Boot      Start         End      Blocks   Id  System
moebius.1.0.1.img1            8192      122879       57344    c  W95 FAT32 (LBA)
moebius.1.0.1.img2          122880     1761279      819200   83  Linux

As you can see linux root partition is 2nd partition, that means it will named /dev/sda2 when you try to boot via qemu-system-arm.

| improve this answer | |
  • thnks.....i thought /dev/sda2 will mess up with my disk /dev/sda2 but, i just did it....and it worked for me..... – Sumit Murari Sep 10 '13 at 7:36
  • if you can help me....who actually made: /dev/sda2 i just used the image and tutorial...was partition made in the image have i used to build it ....??? – Sumit Murari Sep 10 '13 at 7:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.