help: failed to use qemu
Chris Johns
chrisj at rtems.org
Wed Feb 11 10:29:39 UTC 2009
PowerMan wrote:
> I do it as the follow steps:
> 1. download QEMU from http://bellard.org/qemu/qemu-0.9.1-i386.tar.gz
> 2. install it
> tar xfz qemu-0.9.1-i386.tar.gz -C /
> 3. download rtems floppy image from ftp server :
> ftp://ftp.rtems.com/pub/rtems/qemu/i386-pc/rtems-boot.img
> 4. download ftp://ftp.rtems.com/pub/rtems/qemu/i386-pc/rtems-grub.cfg
> and copy it to my root directory /
> 5. mkdir /capture
> cp hello.exe /capture/capture.exe
> 6. run qemu
> qemu -fda rtems-boot.img -boot a -hda /dev/sda
>
Is /dev/sda a separate disk or your host's main disk ?
This would mean QEMU would see your whole disk. What if you specify a
subdirectory to qemu rather than the whole disk. I cannot remember if this
works on Linux.
> but the capture.exe (which is actually helloworld I build with
> rtems-4.7.3) does not run as I excepted.
> This capture.exe could run on my host by modifying /boot/grub/menu.lst
>
> I type the following commands in grub:
> grub> set root=(hd0,0)
> grub> set kernel=/capture/capture.exe
> grub> boot
>
> then grub told me:
> error: no loaded kernel
>
There is a comment in the Wiki (http://www.rtems.org/wiki/index.php/QEMU)
about (hd0,0) needing to be (hd0,1). I wonder if this should be changed. Also
I see in the Wiki the commands are:
grub> set root=(hd0,1)
grub> multiboot (hd0,1)/capture/capture.exe
grub> boot
Note the executable path includes the disk part. Do you have a file
/capture/capture.exe on your host disk ?
The path above assumes you have provide the directory where the executable
file can be found as a parameter to
> I type the following commands in grub:
> grub> set root=(hd0,0)
> grub> multiboot /capture/capture.exe
>
> then grub told me:
> error: Couldn't open file
>
Same as above.
> Could somebody help me?
>
> My host is openSUSE 11.1, my disk information is:
> /dev/sda1 3091312 516528 2417752 18% /
> udev 252876 5428 247448 3% /dev
> /dev/sda8 3605268 153972 3268160 5% /home
> /dev/sda7 1130540 221192 851920 21% /tmp
> /dev/sda9 6412052 3541120 2545216 59% /usr
> /dev/sda6 1130540 193556 879556 19% /var
>
> I type the following commands in grub:
> grub> ls
>
> then grub told me:
> (fd0) (hd0) (hd0,0) (hd0,4) (hd0,5) (hd0,6) (hd0,7) (hd0,8)
>
> they didn't match my host disk partition number
>
What do you see when you do:
ls (hd0,0)
ls (hd0,4)
etc ?
Regards
Chris
More information about the users
mailing list