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

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



>> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.