Package: qemu
Version: 0.8.2-4
Severity: normal
Tags: patch
$ qemu -kernel /dev/null
A disk image must be given for 'hda' when booting a Linux kernel
Violació de segment
The following code is causing it:
if (bdrv_read(bs_table[0], 0, old_bootsect, 1) >= 0) {
/* copy the MSDOS partition table */
memcpy(bootsect + 0x1be, old_bootsect + 0x1be, 0x40);
}
bdrv_set_boot_sector(bs_table[0], bootsect, sizeof(bootsect));
I have tried conditionalising this code with "if (bs_table[0] != NULL)", but
qemu really needs to have a device somewhere for the implicit "-boot xx" to
work.
I would then suggest that instead of exiting, we just add some clarification
to the message, like:
--- hw/pc.c~ 2007-02-20 23:19:49.000000000 +0100
+++ hw/pc.c 2007-02-20 23:23:14.000000000 +0100
@@ -695,7 +695,7 @@
uint8_t old_bootsect[512];
if (bs_table[0] == NULL) {
- fprintf(stderr, "A disk image must be given for 'hda' when booting
a Linux kernel\n");
+ fprintf(stderr, "A disk image must be given for 'hda' when booting
a Linux kernel (if you really don't want it, use /dev/zero)\n");
exit(1);
}
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, LINUX_BOOT_FILENAME);
(yes, this works fine)
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Versions of packages qemu depends on:
ii bochsbios 2.3-2 BIOS for the Bochs emulator
ii libasound2 1.0.13-1 ALSA library
ii libc6 2.3.6.ds1-11 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
ii libsdl1.2debian 1.2.11-7 Simple DirectMedia Layer
ii openhackware 0.4.1-2 OpenFirmware emulator for PowerPC
ii proll 18-2 JavaStation PROM 2.x compatible re
ii vgabios 0.6a-1 VGA BIOS software for the Bochs an
ii zlib1g 1:1.2.3-13 compression library - runtime
Versions of packages qemu recommends:
ii debootstrap 0.3.3.1 Bootstrap a basic Debian system
ii sharutils 1:4.2.1-15 shar, unshar, uuencode, uudecode
pn vde <none> (no description available)
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]