public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Problems with GRUB and boot=on flag
@ 2008-05-22 23:42 Alberto Treviño
  2008-05-23  0:46 ` Anthony Liguori
  0 siblings, 1 reply; 3+ messages in thread
From: Alberto Treviño @ 2008-05-22 23:42 UTC (permalink / raw)
  To: kvm

I am having a really weird problem.  I reported about it earlier (see 
http://article.gmane.org/gmane.comp.emulators.kvm.devel/15884) thinking 
the problem was with SCSI disks, but that's not the case.  Let me try 
to explain.

I have a drive that has GRUB and Linux.  If I run the following command, 
it boots normally, even though the boot flag has been set to off:

  qemu-system-x86_64 -m 256
   -drive file=hd0.qcow2,if=ide,bus=0,index=0,media=disk,boot=off

If I run the following, qemu crashes when GRUB loads:

  qemu-system-x86_64 -m 256
   -drive file=hd0.qcow2,if=ide,bus=0,index=0,media=disk,boot=on

Qemu reports the following when it crashes:

exception 13 (33)
rax 0000000000000000 rbx 0000000000000800 rcx 0000000000000000 rdx 
00000000000000e0
rsi 00000000ffff7d98 rdi 000000000008f788 rsp 0000000000002018 rbp 
0000000000000001
r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11 
0000000000000000
r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 
0000000000000000
rip 0000000000000003 rflags 00033202
cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 0800 (00008000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt fb1f2/30
idt 0/3ff
cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 53 ff 00 --> f0 53 ff 00 f0 53 ff 00 f0 53 ff 00 f0 53 ff 00 f0 53 
ff 00 f0 53 ff 00 f0 53 ff 00 f0 a5 fe 00 f0 87 e9 00 f0 53 ff 00 f0 53 
ff 00 f0 53 ff
Aborted

If I change the interface to SCSI and set the boot flag to off, Qemu 
can't find a valid boot drive and does not boot.  If I change the 
interface to SCSI and set the boot flag to on, I get the same crash.

According to Anthony Liguori's original extboot post, "boot=on" turns on 
the extboot code, so my problem is the combination of extboot and GRUB.  
A response on my original post suggested this might be a real mode 
issue.  However, it seems more of an extboot problem with some of the 
calls from GRUB.

What's the status of the extboot in C project?  Perhaps I could try that 
to see if it fixes the problem.  Does anyone have any other 
suggestions?

-- 
Alberto Treviño
alberto@byu.edu
Testing Center
Brigham Young University

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with GRUB and boot=on flag
  2008-05-22 23:42 Problems with GRUB and boot=on flag Alberto Treviño
@ 2008-05-23  0:46 ` Anthony Liguori
  2008-05-23 16:30   ` Alberto Treviño
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2008-05-23  0:46 UTC (permalink / raw)
  To: Alberto Treviño; +Cc: kvm

Alberto Treviño wrote:
> I am having a really weird problem.  I reported about it earlier (see 
> http://article.gmane.org/gmane.comp.emulators.kvm.devel/15884) thinking 
> the problem was with SCSI disks, but that's not the case.  Let me try 
> to explain.
>
> I have a drive that has GRUB and Linux.  If I run the following command, 
> it boots normally, even though the boot flag has been set to off:
>
>   qemu-system-x86_64 -m 256
>    -drive file=hd0.qcow2,if=ide,bus=0,index=0,media=disk,boot=off
>   

How did you install grub on this drive?  Is this a distro image or did 
you install grub yourself?

Regards,

Anthony Liguori

> If I run the following, qemu crashes when GRUB loads:
>
>   qemu-system-x86_64 -m 256
>    -drive file=hd0.qcow2,if=ide,bus=0,index=0,media=disk,boot=on
>
> Qemu reports the following when it crashes:
>
> exception 13 (33)
> rax 0000000000000000 rbx 0000000000000800 rcx 0000000000000000 rdx 
> 00000000000000e0
> rsi 00000000ffff7d98 rdi 000000000008f788 rsp 0000000000002018 rbp 
> 0000000000000001
> r8  0000000000000000 r9  0000000000000000 r10 0000000000000000 r11 
> 0000000000000000
> r12 0000000000000000 r13 0000000000000000 r14 0000000000000000 r15 
> 0000000000000000
> rip 0000000000000003 rflags 00033202
> cs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ds 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> es 0800 (00008000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> ss 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> fs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> gs 0000 (00000000/0000ffff p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> tr 0000 (fffbd000/00002088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
> ldt 0000 (00000000/0000ffff p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt fb1f2/30
> idt 0/3ff
> cr0 10 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> code: 53 ff 00 --> f0 53 ff 00 f0 53 ff 00 f0 53 ff 00 f0 53 ff 00 f0 53 
> ff 00 f0 53 ff 00 f0 53 ff 00 f0 a5 fe 00 f0 87 e9 00 f0 53 ff 00 f0 53 
> ff 00 f0 53 ff
> Aborted
>
> If I change the interface to SCSI and set the boot flag to off, Qemu 
> can't find a valid boot drive and does not boot.  If I change the 
> interface to SCSI and set the boot flag to on, I get the same crash.
>
> According to Anthony Liguori's original extboot post, "boot=on" turns on 
> the extboot code, so my problem is the combination of extboot and GRUB.  
> A response on my original post suggested this might be a real mode 
> issue.  However, it seems more of an extboot problem with some of the 
> calls from GRUB.
>
> What's the status of the extboot in C project?  Perhaps I could try that 
> to see if it fixes the problem.  Does anyone have any other 
> suggestions?
>
>   


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with GRUB and boot=on flag
  2008-05-23  0:46 ` Anthony Liguori
@ 2008-05-23 16:30   ` Alberto Treviño
  0 siblings, 0 replies; 3+ messages in thread
From: Alberto Treviño @ 2008-05-23 16:30 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: kvm

On Thursday 22 May 2008 06:46:49 pm Anthony Liguori wrote:
> How did you install grub on this drive?  Is this a distro image or
> did you install grub yourself?

I compiled GRUB from source, and installed to the MBR as normal.  You 
can download a CD image that boots with GRUB from:

  http://mel.byu.edu/slim-cd-v4.iso

If I boot from that CD, I get the same crash.

-- 
Alberto Treviño
alberto@byu.edu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-23 16:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 23:42 Problems with GRUB and boot=on flag Alberto Treviño
2008-05-23  0:46 ` Anthony Liguori
2008-05-23 16:30   ` Alberto Treviño

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox