[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting grub booting in qemu..

From: Simon Kitching
Subject: getting grub booting in qemu..
Date: Sun, 02 May 2010 18:05:57 +1200

I'm trying to set up a qemu image for testing grub; see attached script.
When I start qemu with the resulting image file, via "qemu raw.img" I

  Booting from Hard Disk....
  Welcome to Grub!

  error: no such disk.
  Entering rescue mode...
  grub rescue> _

If I type
I get back
   Unknown command `hd0,1'

So it would seem that the MBR and embedded core.img are working well,
but that core.img cannot find /boot/grub.

Any ideas why, given that $root appears to be correct? I've tried
explicitly defining the disk in grub-mkimage with
"--prefix=(hd0,1)/boot/grub", and confirmed with gdb that this is indeed
being recognised, but it had no effect.

I have been trying to debug this by putting some print-statements in
disk/i386/pc/biosdisk.c to show what disk is being accessed, but this
code doesn't appear to be run.

How exactly is "kernel.img" built anyway? I've looked in the makefiles
and can't see what source files kernel.img is made from. File genmk.rb
perhaps has something to do with it, but I just don't understand..

And I see that in grub-mkimage there is something to do with qemu:
   #elif defined(GRUB_MACHINE_QEMU)
Is this relevant or not?

Any ideas how I might debug this further?


Description: application/shellscript

reply via email to

[Prev in Thread] Current Thread [Next in Thread]