WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [patch] fix the cdrom is not bootable, but boot device i

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [patch] fix the cdrom is not bootable, but boot device is cdrom.
From: chenjunb@xxxxxxxxxx
Date: Fri, 28 Apr 2006 10:20:36 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, chenjunb@xxxxxxxxxx
Delivery-date: Thu, 27 Apr 2006 19:21:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4ea3e534bc2169e375960513fa49fa4e@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>> When boot device is cdrom but the cdrom is not bootable, the guest
>> appears
>> to hang. This patch fixes this.
>>
>> Signed-off by: Chen Jun <chenjunb@xxxxxxxxxx>

>Doesn't the BIOS check for bootable media and fall back to a
>lower-priority boot device if it's not present? Maybe it's trying to do
>that but ioemu is not filling in second and third boot device entries?

>  -- Keir

Yes, you are right, the second and third boot device entries are not filled
by ioemu,
so there is a easy way to solve this problem. The below patch is following
your advice,
but it's better to specify the boot sequence in the python configue file.

Signed-off by: Chen Jun <chenjunb@xxxxxxxxxx>
-------------- next part --------------

diff -r 4d83bf50673d tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c     Wed Apr 26 17:44:46 2006 +0100
+++ b/tools/ioemu/hw/pc.c     Fri Apr 28 10:10:09 2006 +0800
@@ -167,14 +167,20 @@ static void cmos_init(uint64_t ram_size,
     switch(boot_device) {
     case 'a':
     case 'b':
-        rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */
+        //rtc_set_memory(s, 0x3d, 0x01); /* floppy boot */
+        rtc_set_memory(s, 0x3d, 0x21);   /* a->c->d */
+        rtc_set_memory(s, 0x38, 0x30);
         break;
     default:
     case 'c':
-        rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */
+        //rtc_set_memory(s, 0x3d, 0x02); /* hard drive boot */
+        rtc_set_memory(s, 0x3d, 0x32);   /* c->d->a */
+        rtc_set_memory(s, 0x38, 0x10);
         break;
     case 'd':
-        rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */
+        //rtc_set_memory(s, 0x3d, 0x03); /* CD-ROM boot */
+        rtc_set_memory(s, 0x3d, 0x23);   /* d->c->a */
+        rtc_set_memory(s, 0x38, 0x10);
         break;
     }



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>