Skip to contentSkip to conversation

don't require a disk image for network boot

PATCH In review andrzej zaborowski 6 participants 6 messages Feb 13, 2007 – Feb 17, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 don't require a disk image for network boot

---------- Forwarded message ----------
From: Ferenc Wagner <[email protected]>
To: [email protected]
Date: Thu, 08 Feb 2007 18:02:23 +0100
Subject: don't require a disk image for network boot Hi,

What do you think about the following patch? As a side note, I'd really prefer option roms with serial output enabled (check CONSOLE_DUAL on rom-o-matic). Maybe even uncheck ASK_BOOT... Hmm, maybe that's already done, I couldn't see... :)

Anyway, thanks for the nice work!

Regards,
Feri.
(please Cc: me, I'm not subscribed)

vl.c 2007-02-08 17:54:00.723622909 +0100 renamed from vl.c 2007-02-06 00:01:54.000000000 +0100 +1 -0
diff -Nru qemu-0.9.0/vl.c qemu/vl.c
@@ -7017,6 +7017,7 @@
    linux_boot = (kernel_filename != NULL);
 
    if (!linux_boot &&
+        boot_device != 'n' &&
        hd_filename[0] == '\0' &&
        (cdrom_index >= 0 && hd_filename[cdrom_index] == '\0') &&
        fd_filename[0] == '\0')
#2 lore raw
Quoted 4 lines · andrzej zaborowski

What do you think about the following patch? As a side note, I'd really prefer option roms with serial output enabled (check CONSOLE_DUAL on rom-o-matic). Maybe even uncheck ASK_BOOT... Hmm, maybe that's already done, I couldn't see... :)

As requested, here's the diff with the correct formatting:

vl.c 2007-02-08 17:54:00.723622909 +0100 renamed from vl.c 2007-02-06 00:01:54.000000000 +0100 +1 -0
diff -Nru qemu-0.9.0/vl.c qemu/vl.c
@@ -7017,6 +7017,7 @@
     linux_boot = (kernel_filename != NULL);
 
     if (!linux_boot &&
+        boot_device != 'n' &&
         hd_filename[0] == '\0' && 
         (cdrom_index >= 0 && hd_filename[cdrom_index] == '\0') &&
         fd_filename[0] == '\0')
#3 lore raw
In reply to andrzej zaborowski

Hi,

Quoted 1 line · andrzej zaborowski

Subject: don't require a disk image for network boot

BTW, is there a reason why a disk image is required when using the -kernel option ?

In the following case: -kernel vmlinuz -append "nfsroot=blabla", we could boot over the network, without the need for any disk image, but Qemu wants to have a disk image. Is it mandatory ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni - [email protected]
http://{thomas,sos,kos}.enix.org - http://www.toulibre.org
http://www.{livret,agenda}dulibre.org
#4 lore raw
Quoted 6 lines · Thomas Petazzoni

BTW, is there a reason why a disk image is required when using the -kernel option ?

In the following case: -kernel vmlinuz -append "nfsroot=blabla", we could boot over the network, without the need for any disk image, but Qemu wants to have a disk image. Is it mandatory ?

On Linux, -hda /dev/zero works fine, so I'd say there's no reason a disk image is necessary.

--Ed

#5 lore raw
In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

Hi,

Le Tue, 13 Feb 2007 15:58:13 +0100,

"andrzej zaborowski" <[email protected]> a écrit :

Quoted 8 lines
Quoted 1 line

Subject: don't require a disk image for network boot

BTW, is there a reason why a disk image is required when using the -kernel option ?

In the following case: -kernel vmlinuz -append "nfsroot=blabla", we could boot over the network, without the need for any disk image, but Qemu wants to have a disk image. Is it mandatory ?

The BIOS doesn't know about the -kernel option, so qemu replaces the first sector of the disk image with a dummy bootloader that jumps to the preloaded kernel. It can only do that if there is an image to replace.

Paul

#6 lore raw
Quoted 11 lines · Paul Brook
Quoted 10 lines · Thomas Petazzoni

Hi,

Le Tue, 13 Feb 2007 15:58:13 +0100,

Quoted 1 line · andrzej zaborowski

Subject: don't require a disk image for network boot

BTW, is there a reason why a disk image is required when using the -kernel option ?

Quoted 7 lines
Quoted 3 lines

In the following case: -kernel vmlinuz -append "nfsroot=blabla", we could boot over the network, without the need for any disk image, but Qemu wants to have a disk image. Is it mandatory ?

The BIOS doesn't know about the -kernel option, so qemu replaces the first sector of the disk image with a dummy bootloader that jumps to the preloaded kernel. It can only do that if there is an image to replace.

Yeah, but on Linux the standard workaround is to supply -hda /dev/zero, and if qemu notices that it has -kernel but no hda, from a UI perspective qemu could easily supply the standard workaround for itself...

Rob

Signature · 2 lines
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery