Skip to contentSkip to conversation

Boot order problem and disable iPXE/gPXE

Qemu-devel Gerhard Wiesinger 4 participants 44 messages Jan 4, 2012 – Jan 25, 2012

lore
Share & tools
lore
#0 lore raw

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Command line:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64 -drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3
-cdrom KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=c -m 256 -k de -vga vmware -vnc :0
-bios /root/download/seabios/git/seabios/out/bios.bin -option-rom BIOS/8xx_64.rom -net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c
-net tap,ifname=tap0,script=no,downscript=no

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

Going into boot menu (-boot order=c,menu=on)and selecting HD works well. Any ideas to fix it?

I also want to disable iPXE/gPXE on boot. I found several "workarounds" specifying rom files on different command lines:
1.) -net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,rom=/dev/null
(https://lists.gnu.org/archive/html/qemu-devel/2010-03/msg00546.html)
2.) -device rtl8139,romfile=/dev/null
3.) remove ROM files.

I think best way would be:
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,rom=/dev/null or by SEABIOS boot option.

Removing rom files isn't an option because I want it by command line switch and need them for other VMs.

Any thoughts?

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#1 lore raw
Quoted 17 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Command line:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64

(quoted diff) +0 -7
-drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3
-cdrom KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=c -m 256 -k de -vga vmware -vnc :0
-bios /root/download/seabios/git/seabios/out/bios.bin -option-rom

BIOS/8xx_64.rom

(quoted diff) +0 -2
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c
-net tap,ifname=tap0,script=no,downscript=no
Quoted 5 lines

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

Going into boot menu (-boot order=c,menu=on)and selecting HD works well. Any ideas to fix it?

There is a "bootindex" option that can be passed to the "-device" parameter of QEMU. This option give more fine grained control of boot order.

However, the default should have been to boot from a harddrive first, so I'm not sure why you see the cdrom first. You could add the following to the QEMU command line to see the seabios debugging info:
-chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios

-Kevin

#2 lore raw
Quoted 9 lines · Kevin O'Connor

On Wed, Jan 04, 2012 at 07:02:34PM +0100, Gerhard Wiesinger wrote:
There is a "bootindex" option that can be passed to the "-device" parameter of QEMU. This option give more fine grained control of boot order.

However, the default should have been to boot from a harddrive first, so I'm not sure why you see the cdrom first. You could add the following to the QEMU command line to see the seabios debugging info:
-chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios

|0ffdf000| Searching bootorder for: /pci@i0cf8/*@1,1/drive@1/disk@0
|0ffdf000| Registering bootable: DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] (type:3 prio:9999 data:fd940)

Searching bootorder for: /pci@i0cf8/*@3
Registering bootable: iPXE (PCI 00:03.0) (type:128 prio:9999 data:ca000372) Searching bootorder for: /rom@genroms/8xx_64.rom
Registering bootable: #28 ID00 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003d4e)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom1
Registering bootable: #28 ID01 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003da2)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom2
Registering bootable: #28 ID02 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003df6)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom3
Registering bootable: #28 ID03 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003e4a)
Searching bootorder for: /rom@genroms/vapic.bin
Registering bootable: Legacy option rom (type:129 prio:9999 data:cf000003) Searching bootorder for: /rom@genroms/pxe-pcnet.rom
Registering bootable: iPXE (PCI 00:00.0) (type:128 prio:9999 data:d1800372) Booting from DVD/CD...
Booting from 0000:7c00

BTW: I didn't get any answer to the following thread:
https://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00602.html

Thnx.

Ciao,
Gerhard

Full relevant trace:
cat boot_cdrom.log | grep -v a= | grep -v si= | grep -v "enter handle" | grep -v "invalid handle" | grep -v "handle_" | grep -v "pmm_malloc" | grep -v "pmm_free" | grep -v "Read sector" | grep -v "ata_pio_transfer" | grep -v "send_atapi_cmd" Start bios (version pre-1.6.4-20111228_082807-host)
enabling shadow ram
qemu_cfg_present=1
Find memory size
Add to e820 map: 00000000 10000000 1
Add to e820 map: 00000000 00000000 1
Add to e820 map: fffc0000 00040000 2
Add to e820 map: 000a0000 00050000 -1
Add to e820 map: 000f0000 00010000 2
Add to e820 map: feffc000 00004000 2
Ram Size=0x10000000 (0x0000000000000000 high)
malloc setup
Add to e820 map: 0fff0000 00010000 2
Relocating init from 0x000e31f0 to 0x0ffe1e60 (size 57468)
malloc fixup reloc
init ivt
init bda
Add to e820 map: 0009fc00 00000400 2
init pic
init timer
tsc calibrate start=136992957 end=142144437 diff=5151480
CPU Mhz=3001
math cp init
init mtrr
pci setup
=== PCI bus & bridge init ===
PCI: pci_bios_init_bus_rec bus = 0x0
=== PCI device probing ===
PCI probe
PCI device 00:00.0 (vd=8086:1237 c=0600)
PCI device 00:01.0 (vd=8086:7000 c=0601)
PCI device 00:01.1 (vd=8086:7010 c=0101)
PCI device 00:01.3 (vd=8086:7113 c=0680)
PCI device 00:02.0 (vd=15ad:0405 c=0300)
PCI device 00:03.0 (vd=10ec:8139 c=0200)
PCI device 00:04.0 (vd=1022:2000 c=0200)
PCI device 00:05.0 (vd=1000:0012 c=0100)
Found 8 PCI devices (max PCI bus is 00)
=== PCI new allocation pass #1 ===
PCI: check devices
=== PCI new allocation pass #2 ===
PCI: init bases bus 0 (primary)
type io max 100 sum 240 base c000

    size      100: 2 bar(s),     c000 ->     c1ff
    size       20: 1 bar(s),     c200 ->     c21f
    size       10: 2 bar(s),     c220 ->     c23f
  type mem max 10000 sum 25000 base febd0000
    size    10000: 2 bar(s), febd0000 -> febeffff
    size     2000: 1 bar(s), febf0000 -> febf1fff
    size     1000: 3 bar(s), febf2000 -> febf4fff
  type prefmem max 1000000 sum 1010000 base fd000000
    size  1000000: 1 bar(s), fd000000 -> fdffffff
    size    10000: 1 bar(s), fe000000 -> fe00ffff

PCI: map device bdf=00:00.0
PCI: map device bdf=00:01.0
PCI: map device bdf=00:01.1
bar 4, addr c220, size 10 [io]
PCI: map device bdf=00:01.3
PCI: map device bdf=00:02.0
bar 0, addr c230, size 10 [io]
bar 1, addr fd000000, size 1000000 [prefmem]
bar 2, addr fe000000, size 10000 [prefmem]
bar 6, addr febd0000, size 10000 [mem]
PCI: map device bdf=00:03.0
bar 0, addr c000, size 100 [io]
bar 1, addr febf2000, size 100 [mem]
bar 6, addr febe0000, size 10000 [mem]
PCI: map device bdf=00:04.0
bar 0, addr c200, size 20 [io]
bar 1, addr febf3000, size 20 [mem]
PCI: map device bdf=00:05.0
bar 0, addr c100, size 100 [io]
bar 1, addr febf4000, size 400 [mem]
bar 2, addr febf0000, size 2000 [mem]
PCI: init bdf=00:00.0 id=8086:1237
PCI: init bdf=00:01.0 id=8086:7000
PCI: init bdf=00:01.1 id=8086:7010
PCI: init bdf=00:01.3 id=8086:7113
PCI: init bdf=00:02.0 id=15ad:0405
PCI: init bdf=00:03.0 id=10ec:8139
PCI: init bdf=00:04.0 id=1022:2000
PCI: init bdf=00:05.0 id=1000:0012
PIIX3/PIIX4 init: elcr=00 0c
init smm
Found 1 cpu(s) max supported 1 cpu(s)
init bios32
init PMM
init PNPBIOS table
init keyboard
init mouse
init PIR table
init MPTable
MP table addr=0x000fdaf0 MPC table addr=0x000fdb00 size=232 init SMBIOS tables
SMBIOS ptr=0x000fdad0 table=0x000fd9c0 size=263
init ACPI tables
ACPI DSDT=0x0fffe640
ACPI tables: RSDP=0x000fd990 RSDT=0x0fffe600
Scan for VGA option rom
Attempting to init PCI bdf 00:02.0 (vd 15ad:0405) Attempting to map option rom on dev 00:02.0
Option rom sizing returned febd0000 ffff0000 Inspecting possible rom at 0xfebd0000 (vd=15ad:0405 bdf=00:02.0) Copying option rom (size 40448) from 0xfebd0000 to c0000 Checking rom 0x000c0000 (sig aa55 size 79)
Running option rom at c000:0003
Turning on vga text mode console

init usb
init ps2port
/0ffe0000\ Start thread

|0ffe0000| i8042_flush
|0ffe0000| i8042_command cmd=1aa
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_read
|0ffe0000| i8042 param=55
|0ffe0000| i8042_command cmd=1ab
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_read
|0ffe0000| i8042 param=0
|0ffe0000| ps2_command aux=0 cmd=2ff
|0ffe0000| i8042 ctr old=30 new=30
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write

init lpt
Found 1 lpt ports
init serial
Found 1 serial ports
init floppy drives
init hard drives
ATA controller 1 at 1f0/3f4/0 (irq 14 dev 9)
/0ffdf000\ Start thread

|0ffdf000| powerup iobase=1f0 st=0
|0ffdf000| powerup iobase=1f0 st=0
|0ffdf000| ata_detect ata0-0: sc=0 sn=0 dh=0
|0ffdf000| powerup iobase=1f0 st=0
|0ffdf000| powerup iobase=1f0 st=0
|0ffdf000| ata_detect ata0-1: sc=0 sn=0 dh=0
\0ffdf000/ End thread
ATA controller 2 at 170/374/0 (irq 15 dev 9)
/0ffdf000\ Start thread
|0ffdf000| powerup iobase=170 st=50
|0ffdf000| powerup iobase=170 st=50
|0ffdf000| ata_detect ata1-0: sc=55 sn=aa dh=a0
|0ffdf000| ata_reset drive=0x0ffdffc4
init virtio-blk
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_sendbyte aux=0 cmd=ff
|0ffe0000| i8042_kbd_write c=255
|0ffe0000| i8042_wait_write
|0ffe0000| ps2 read fa
|0ffe0000| ps2 read aa
|0ffdf000| ata_reset exit status=0
|0ffdf000| DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
|0ffdf000| Searching bootorder for: /pci@i0cf8/*@1,1/drive@1/disk@0
|0ffdf000| Registering bootable: DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] (type:3 prio:9999 data:fd940)
|0ffdf000| ata_detect resetresult=0000
|0ffdf000| powerup iobase=170 st=50
|0ffdf000| powerup iobase=170 st=0
|0ffdf000| ata_detect ata1-1: sc=55 sn=aa dh=b0
|0ffdf000| send_cmd : DRQ not set (status 00)
\0ffdf000/ End thread
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_command aux=0 cmd=f5
|0ffe0000| i8042 ctr old=30 new=30
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_sendbyte aux=0 cmd=f5
|0ffe0000| i8042_kbd_write c=245
|0ffe0000| i8042_wait_write
|0ffe0000| ps2 read fa
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_command aux=0 cmd=10f0
|0ffe0000| i8042 ctr old=30 new=30
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_sendbyte aux=0 cmd=f0
|0ffe0000| i8042_kbd_write c=240
|0ffe0000| i8042_wait_write
|0ffe0000| ps2 read fa
|0ffe0000| ps2_sendbyte aux=0 cmd=2
|0ffe0000| i8042_kbd_write c=2
|0ffe0000| i8042_wait_write
|0ffe0000| ps2 read fa
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_command aux=0 cmd=f4
|0ffe0000| i8042 ctr old=61 new=70
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| ps2_sendbyte aux=0 cmd=f4
|0ffe0000| i8042_kbd_write c=244
|0ffe0000| i8042_wait_write
|0ffe0000| ps2 read fa
|0ffe0000| i8042_command cmd=1060
|0ffe0000| i8042_wait_write
|0ffe0000| i8042_wait_write
|0ffe0000| PS2 keyboard initialized

\0ffe0000/ End thread
All threads complete.
Scan for option roms
Attempting to init PCI bdf 00:00.0 (vd 8086:1237)
Attempting to map option rom on dev 00:00.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:01.0 (vd 8086:7000)
Attempting to map option rom on dev 00:01.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:01.3 (vd 8086:7113)
Attempting to map option rom on dev 00:01.3
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:03.0 (vd 10ec:8139)
Attempting to map option rom on dev 00:03.0
Option rom sizing returned febe0000 ffff0000
Inspecting possible rom at 0xfebe0000 (vd=10ec:8139 bdf=00:03.0) Copying option rom (size 61440) from 0xfebe0000 to ca000 Checking rom 0x000ca000 (sig aa55 size 120)
Running option rom at ca00:0003
pmm call arg1=1
pmm01: handle=18ae1000
pmm call arg1=0
pmm00: length=f00 handle=18ae1000 flags=2
pmm call arg1=1
pmm01: handle=18ae2004
pmm call arg1=0
pmm00: length=4000 handle=18ae2004 flags=2
Attempting to init PCI bdf 00:04.0 (vd 1022:2000)
Attempting to map option rom on dev 00:04.0
Option rom sizing returned 0 0
Attempting to init PCI bdf 00:05.0 (vd 1000:0012)
Attempting to map option rom on dev 00:05.0
Option rom sizing returned 0 0
Checking rom 0x000cb000 (sig aa55 size 128)
Running option rom at cb00:0003
pmm call arg1=0
pmm00: length=1000 handle=ffffffff flags=5
pnp call arg1=55
pmm call arg1=2
pmm02: buffer=80000
Checking rom 0x000cf000 (sig aa55 size 17)
Checking rom 0x000d1800 (sig aa55 size 120)
Running option rom at d180:0003
pmm call arg1=1
pmm01: handle=18ae1000
pmm call arg1=1
pmm01: handle=18ae1001
pmm call arg1=0
pmm00: length=f00 handle=18ae1001 flags=2
pmm call arg1=1
pmm01: handle=18ae2004
Checking rom 0x000ca000 (sig aa55 size 5)
Searching bootorder for: /pci@i0cf8/*@3
Registering bootable: iPXE (PCI 00:03.0) (type:128 prio:9999 data:ca000372) Checking rom 0x000cb000 (sig aa55 size 32)
Searching bootorder for: /rom@genroms/8xx_64.rom
Registering bootable: #28 ID00 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003d4e)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom1
Registering bootable: #28 ID01 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003da2)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom2
Registering bootable: #28 ID02 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003df6)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom3
Registering bootable: #28 ID03 LUN0 QEMU QEMU HARDDISK (type:129 prio:9999 data:cb003e4a)
Checking rom 0x000cf000 (sig aa55 size 17)
Searching bootorder for: /rom@genroms/vapic.bin
Registering bootable: Legacy option rom (type:129 prio:9999 data:cf000003) Checking rom 0x000d1800 (sig aa55 size 5)
Searching bootorder for: /rom@genroms/pxe-pcnet.rom
Registering bootable: iPXE (PCI 00:00.0) (type:128 prio:9999 data:d1800372) Mapping cd drive 0x000fd940
Running option rom at cb00:3d4e
Running option rom at cb00:3da2
Running option rom at cb00:3df6
Running option rom at cb00:3e4a
Running option rom at cf00:0003
ebda moved from 9f000 to 9e800
finalize PMM
malloc finalize
Add to e820 map: 0009e800 00001800 2
Add to e820 map: 0fff0000 0000e000 1
Returned 57344 bytes of ZoneHigh
e820 map has 7 items:
0: 0000000000000000 - 000000000009e800 = 1 RAM
1: 000000000009e800 - 00000000000a0000 = 2 RESERVED
2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
3: 0000000000100000 - 000000000fffe000 = 1 RAM
4: 000000000fffe000 - 0000000010000000 = 2 RESERVED
5: 00000000feffc000 - 00000000ff000000 = 2 RESERVED
6: 00000000fffc0000 - 0000000100000000 = 2 RESERVED
locking shadow ram
Jump to int19
NULL
Booting from DVD/CD...
scsi_is_ready (drive=0x000fd940)
test unit ready failed
scsi_is_ready returned -1
Booting from 0000:7c00

#5 lore raw
Quoted 11 lines · Gerhard Wiesinger
Quoted 7 lines · Kevin O'Connor
Quoted 2 lines · Gerhard Wiesinger

BTW: I didn't get any answer to the following thread:
https://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00602.html

Odd - that email never made it to my inbox. Anyway, Gerd reported a similar issue to the SeaBIOS mailing list, and it should be fixed on SeaBIOS tip now.

Which commit fixed it?

891766f3b4d6996d02322aa48070d2e7e950e582

cheers,
Gerd

#6 lore raw
In reply to Gerhard Wiesinger
Quoted 15 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Command line:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64

(quoted diff) +0 -7
-drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3
-cdrom KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=c -m 256 -k de -vga vmware -vnc :0
-bios /root/download/seabios/git/seabios/out/bios.bin -option-rom

BIOS/8xx_64.rom

Review

Quoted 2 lines
(quoted diff) +0 -2
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c
-net tap,ifname=tap0,script=no,downscript=no

Try changing option-rom flags like this: -option-rom BIOS/8xx_64.rom,bootindex=1

--
Gleb.

#7 lore raw
In reply to Gerhard Wiesinger
Quoted 7 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Quoted 1 line

2.) -device rtl8139,romfile=/dev/null

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

HTH,
Gerd

#8 lore raw
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Ok, works well, but I think than "-boot order=c" is buggy, right?

Quoted 4 lines
Quoted 1 line

2.) -device rtl8139,romfile=/dev/null

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?
What's this option ROM doing? Is it a general iPXE main loader?

Thnx to all who replied.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#9 lore raw
Quoted 8 lines · Gerhard Wiesinger
Quoted 6 lines · Gerd Hoffmann
Quoted 4 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 15 lines
Quoted 4 lines
Quoted 1 line

2.) -device rtl8139,romfile=/dev/null

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the
following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?
What's this option ROM doing? Is it a general iPXE main loader?

Quoted 7 lines

Thnx to all who replied.

Ciao,
Gerhard

--
http://www.wiesinger.com/

--
Gleb.

#10 lore raw
Quoted 14 lines · Gleb Natapov
Quoted 13 lines · Gerhard Wiesinger
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Quoted 7 lines
Quoted 2 lines

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk. I think this usecase is currently not supported.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#11 lore raw
Quoted 24 lines · Gerhard Wiesinger
Quoted 14 lines · Gleb Natapov
Quoted 13 lines · Gerhard Wiesinger
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Quoted 7 lines
Quoted 2 lines

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 3 lines

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Quoted 7 lines

I think this usecase is currently not supported.

Ciao,
Gerhard

--
http://www.wiesinger.com/

--
Gleb.

#12 lore raw
Quoted 25 lines · Gleb Natapov
Quoted 24 lines · Gerhard Wiesinger
Quoted 21 lines · Gleb Natapov
Quoted 8 lines · Gerhard Wiesinger
Quoted 6 lines · Gerd Hoffmann
Quoted 4 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 8 lines
Quoted 3 lines

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

But to get rid of this problem typical BIOSes have an option whether they prefer to BOOT from SCSI (with an option ROM) or from the other devices. Then the option ROM typically boots from the first registered device.

I think this is a missing feature in Seabios.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#13 lore raw
Quoted 36 lines · Gerhard Wiesinger
Quoted 25 lines · Gleb Natapov
Quoted 24 lines · Gerhard Wiesinger
Quoted 21 lines · Gleb Natapov
Quoted 8 lines · Gerhard Wiesinger
Quoted 6 lines · Gerd Hoffmann
Quoted 4 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 8 lines
Quoted 3 lines

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Quoted 7 lines

But to get rid of this problem typical BIOSes have an option whether they prefer to BOOT from SCSI (with an option ROM) or from the other devices. Then the option ROM typically boots from the first registered device.

I think this is a missing feature in Seabios.

How is it missing if you just used it and confirmed that it worked?

--
Gleb.

#14 lore raw
Quoted 37 lines · Gleb Natapov
Quoted 36 lines · Gerhard Wiesinger
Quoted 33 lines · Gleb Natapov
Quoted 24 lines · Gerhard Wiesinger
Quoted 14 lines · Gleb Natapov
Quoted 13 lines · Gerhard Wiesinger
Quoted 10 lines · Gerd Hoffmann
Quoted 7 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Quoted 7 lines
Quoted 2 lines

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 3 lines

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Quoted 8 lines
Quoted 7 lines

But to get rid of this problem typical BIOSes have an option whether they prefer to BOOT from SCSI (with an option ROM) or from the other devices. Then the option ROM typically boots from the first registered device.

I think this is a missing feature in Seabios.

How is it missing if you just used it and confirmed that it worked?

It had to specify it on the option ROM itself. But I think a generic way would be e.g.:
boot=SCSI,c,a

Ciao,
Gerhard

--
http://www.wiesinger.com/

#15 lore raw
Quoted 44 lines · Gerhard Wiesinger
Quoted 42 lines · Gleb Natapov
Quoted 41 lines · Gerhard Wiesinger
Quoted 25 lines · Gleb Natapov
Quoted 24 lines · Gerhard Wiesinger
Quoted 21 lines · Gleb Natapov
Quoted 8 lines · Gerhard Wiesinger
Quoted 6 lines · Gerd Hoffmann
Quoted 4 lines · Gerhard Wiesinger

Hello,

I'm having the following boot order problem using an SCSI option ROM:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Still boots the cdrom instead of harddisk. So it is impossible to have a bootable CDROM in the VM without booting from it.

-option-rom romfile=/root/roms/8xx_64.rom,bootindex=1

Ok, works well, but I think than "-boot order=c" is buggy, right?

Wrong. "-boot order=c" tells seabios to boot from a HD, but for that Seabios needs to actually know what is HD and what is not. Since Seabios does not support scsi controller natively it only sees pci device and has no idea that you have scsi disk there. It uses pci option rom to boot from this unknown device.

Quoted 8 lines
Quoted 3 lines

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

But to get rid of this problem typical BIOSes have an option whether they prefer to BOOT from SCSI (with an option ROM) or from the other devices. Then the option ROM typically boots from the first registered device.

Quoted 8 lines
Quoted 3 lines
Quoted 2 lines

I think this is a missing feature in Seabios.

How is it missing if you just used it and confirmed that it worked?

It had to specify it on the option ROM itself. But I think a generic way would be e.g.:
boot=SCSI,c,a

boot option is deprecated in favor of bootindex. The later has much more fine grained control of boot sequence. What if you have 5 SCSI controllers? Even boot=c does not tell you much if you have more then one disk.

--
Gleb.

#16 lore raw
Quoted 4 lines · Gleb Natapov

boot option is deprecated in favor of bootindex. The later has much more fine grained control of boot sequence. What if you have 5 SCSI controllers? Even boot=c does not tell you much if you have more then one disk.

Ok, then this is a documentation issue (command line, etc.):
1.) boot should be documented as deprecated with "use bootindex instead" 2.) bootindex should be documented at all

Thnx so far.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#17 lore raw
Quoted 10 lines · Gerhard Wiesinger
Quoted 4 lines · Gleb Natapov

boot option is deprecated in favor of bootindex. The later has much more fine grained control of boot sequence. What if you have 5 SCSI controllers? Even boot=c does not tell you much if you have more then one disk.

Ok, then this is a documentation issue (command line, etc.):
1.) boot should be documented as deprecated with "use bootindex instead" 2.) bootindex should be documented at all

Agree. Documentation is missing. bootindex is a device property (in QEMU terms) and those are not documented in qemu help screen. Don't know where is the proper place to add documentation for that.

--
Gleb.

#18 lore raw
In reply to Gerhard Wiesinger

Hi,

Quoted 4 lines

But to get rid of this problem typical BIOSes have an option whether they prefer to BOOT from SCSI (with an option ROM) or from the other devices. Then the option ROM typically boots from the first registered device.

qemu+seabios have bootindex to address that issue. It was created exactly because "boot from hard disk" isn't good enougth with multiple disks in the system ...

cheers,
gerd

#19 lore raw
In reply to Gleb Natapov
Quoted 9 lines · Gleb Natapov
Quoted 3 lines · Gerhard Wiesinger

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Gerhard's option rom is actually registering a BCV, and SeaBIOS can know that is likely a hard drive. So, I think Gerhard has a point. SeaBIOS could probably fall back to the harddrive priority if it finds a BCV without an explicit bootindex priority.

Gerhard - does the patch below improve things for you?

-Kevin

src/boot.c +1 -1
@@ -326,7 +326,7 @@ boot_add_bev(u16 seg, u16 bev, u16 desc, int prio)
 void
 boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio)
 {
-    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DEFAULT_PRIO)
+    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DefaultHDPrio)
                   , SEGOFF(seg, ip).segoff
                   , desc ? MAKE_FLATPTR(seg, desc) : "Legacy option rom");
 }
#20 lore raw
Quoted 5 lines · Kevin O'Connor
Quoted 4 lines · Gleb Natapov
Quoted 3 lines · Gerhard Wiesinger

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

Quoted 8 lines
Quoted 5 lines

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Gerhard's option rom is actually registering a BCV, and SeaBIOS can know that is likely a hard drive. So, I think Gerhard has a point.

Ah, yeah. I see now that pnp rom can register either bev or bcv. But non of them tell us what device it actually is.

Quoted 2 lines

SeaBIOS could probably fall back to the harddrive priority if it finds a BCV without an explicit bootindex priority.

The same option rom probably will register bcv for SCSI CD/DVD too. Also are you sure pxe roms do not register bcv for network booting?

Quoted 9 lines

Gerhard - does the patch below improve things for you?

(quoted diff) +0 -1
-Kevin

src/boot.c boot_add_bev(u16 seg, u16 bev, u16 desc, int prio) · line 332

Quoted 8 lines
src/boot.c +1 -1
@@ -326,7 +326,7 @@ boot_add_bev(u16 seg, u16 bev, u16 desc, int prio)
 void
 boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio)
 {
-    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DEFAULT_PRIO)
+    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DefaultHDPrio)
                   , SEGOFF(seg, ip).segoff
                   , desc ? MAKE_FLATPTR(seg, desc) : "Legacy option rom");
 }

--
Gleb.

#21 lore raw
Quoted 5 lines · Gleb Natapov
Quoted 2 lines · Kevin O'Connor

SeaBIOS could probably fall back to the harddrive priority if it finds a BCV without an explicit bootindex priority.

The same option rom probably will register bcv for SCSI CD/DVD too. Also are you sure pxe roms do not register bcv for network booting?

BCV is just for drives - network cards would use a BEV. The BBS spec isn't clear on whether BCV is just for harddrives (as opposed to floppy/cd), but it seems to imply that.

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

-Kevin

#22 lore raw
Quoted 6 lines · Kevin O'Connor

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

As far as I remember from SCSI only systems one can just boot from CD drives, too. Order is SCSI id (starting with SCSI id 0, up to 7, 15, etc. depending on host adapeter).

Tried:
-drive file=KNOPPIX_V6.2CD-2009-11-18-DE.iso,media=cdrom,if=scsi,bus=0,unit=0 all other drives are afterwards.

Registers as CDROM, selecting Legacy Option ROM from boot menu, but can't boot:
Screen:
Booting from DVD/CD...
Boot failed: Could not read from CDROM (code 0003)

Log:
Booting from DVD/CD...
scsi_is_ready (drive=0x000fd920)
ata_pio_transfer id=0x000fd920 write=0 count=1 bs=18 buf=0x00006746 Read sector id=0x000fd920 dest=0x00006746
Device reports MEDIUM NOT PRESENT
scsi_is_ready returned -1
Boot failed: Could not read from CDROM (code 0003)

Ciao,
Gerhard

--
http://www.wiesinger.com/

#23 lore raw
Quoted 12 lines · Gerhard Wiesinger
Quoted 6 lines · Kevin O'Connor

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

As far as I remember from SCSI only systems one can just boot from CD drives, too. Order is SCSI id (starting with SCSI id 0, up to 7, 15, etc. depending on host adapeter).

Quoted 8 lines

Tried:
-drive file=KNOPPIX_V6.2CD-2009-11-18-DE.iso,media=cdrom,if=scsi,bus=0,unit=0 all other drives are afterwards.

Registers as CDROM, selecting Legacy Option ROM from boot menu, but can't boot:
Screen:
Booting from DVD/CD...

This is SeaBIOS attempting to boot from its internal CD code which wont work for SCSI. (The "Legacy Option ROM" seletion is probably the KVM vapic.bin rom.) The question is, what will the 8xx_64.rom do with a cdrom on a scsi adapter...

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

-Kevin

#24 lore raw
Quoted 27 lines · Kevin O'Connor
Quoted 12 lines · Gerhard Wiesinger
Quoted 6 lines · Kevin O'Connor

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

As far as I remember from SCSI only systems one can just boot from CD drives, too. Order is SCSI id (starting with SCSI id 0, up to 7, 15, etc. depending on host adapeter).

Quoted 8 lines

Tried:
-drive file=KNOPPIX_V6.2CD-2009-11-18-DE.iso,media=cdrom,if=scsi,bus=0,unit=0 all other drives are afterwards.

Registers as CDROM, selecting Legacy Option ROM from boot menu, but can't boot:
Screen:
Booting from DVD/CD...

This is SeaBIOS attempting to boot from its internal CD code which wont work for SCSI. (The "Legacy Option ROM" seletion is probably the KVM vapic.bin rom.) The question is, what will the 8xx_64.rom do with a cdrom on a scsi adapter...

Quoted 5 lines

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

Any plans to implement it?

BTW: Where is the "Spec" about BEVs and BCVs?

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#25 lore raw
Quoted 8 lines · Gerhard Wiesinger
Quoted 5 lines · Kevin O'Connor

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

Any plans to implement it?

It's on my queue, as is the change to have BCV inherit from DefaultHDPrio.

Quoted 2 lines

BTW: Where is the "Spec" about BEVs and BCVs?

Google for "specsbbs101.pdf".

-Kevin

#26 lore raw
In reply to Kevin O'Connor
Quoted 27 lines · Kevin O'Connor
Quoted 12 lines · Gerhard Wiesinger
Quoted 6 lines · Kevin O'Connor

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

As far as I remember from SCSI only systems one can just boot from CD drives, too. Order is SCSI id (starting with SCSI id 0, up to 7, 15, etc. depending on host adapeter).

Quoted 8 lines

Tried:
-drive file=KNOPPIX_V6.2CD-2009-11-18-DE.iso,media=cdrom,if=scsi,bus=0,unit=0 all other drives are afterwards.

Registers as CDROM, selecting Legacy Option ROM from boot menu, but can't boot:
Screen:
Booting from DVD/CD...

This is SeaBIOS attempting to boot from its internal CD code which wont work for SCSI. (The "Legacy Option ROM" seletion is probably the KVM vapic.bin rom.) The question is, what will the 8xx_64.rom do with a cdrom on a scsi adapter...

Quoted 6 lines

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

Cool! What about non pnp roms that also register bcv? Should we use HD priority for those too?

--
Gleb.

#27 lore raw
Quoted 9 lines · Gleb Natapov
Quoted 6 lines · Kevin O'Connor

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

Cool! What about non pnp roms that also register bcv? Should we use HD priority for those too?

A non-pnp rom can't register a BCV, but it can hook int13 (or hook int19 or do a direct boot). Right now, if a user selects a "legacy option rom" from the boot menu, SeaBIOS will still prioritize HD booting even if the rom doesn't hook int13. It's an open question whether that is the right thing to do. In practice, though, there aren't many legacy option roms, so it's probably not a big deal. The "vapic.bin" should probably be upgraded to use a PNP header just so it doesn't show up in the boot menu.

-Kevin

#28 lore raw
Quoted 11 lines · Kevin O'Connor
Quoted 9 lines · Gleb Natapov
Quoted 6 lines · Kevin O'Connor

I downloaded 8xx_64.rom and tried the above command line. Interestingly, it will register a BEV for a CD drive - which confirms my suspicion that it wont use a BCV. Also interesting is that if both a harddrive and a CD are found, both a BEV and a BCV will be present - SeaBIOS doesn't support this, but I don't see any reason it couldn't.

Cool! What about non pnp roms that also register bcv? Should we use HD priority for those too?

Quoted 9 lines

A non-pnp rom can't register a BCV, but it can hook int13 (or hook int19 or do a direct boot). Right now, if a user selects a "legacy option rom" from the boot menu, SeaBIOS will still prioritize HD booting even if the rom doesn't hook int13. It's an open question whether that is the right thing to do. In practice, though, there aren't many legacy option roms, so it's probably not a big deal. The "vapic.bin" should probably be upgraded to use a PNP header just so it doesn't show up in the boot menu.

I was talking about this code in optionroms.c:

        if (! pnp) {
            // Legacy rom.
            boot_add_bcv(FLATPTR_TO_SEG(rom), OPTION_ROM_INITVECTOR, 0
                         , getRomPriority(sources, rom, 0));
            continue;
        }

Isn't it register bcv for each non pnp option rom found? As far as I understand this is done in order to postpone executing such rom until it is absolutely clear that user wants to use it for booting. If boot_add_bcv() will unconditionally give HD boot priority to such bcv it will have higher priority than CD or pxe boot option, no?

Yes, we should fix vapic.bin to not show up in boot menu.

--
Gleb.

#29 lore raw
Quoted 16 lines · Gleb Natapov
Quoted 4 lines · Kevin O'Connor
Quoted 2 lines · Gleb Natapov

Cool! What about non pnp roms that also register bcv? Should we use HD priority for those too?

Quoted 9 lines

A non-pnp rom can't register a BCV, but it can hook int13 (or hook int19 or do a direct boot). Right now, if a user selects a "legacy option rom" from the boot menu, SeaBIOS will still prioritize HD booting even if the rom doesn't hook int13. It's an open question whether that is the right thing to do. In practice, though, there aren't many legacy option roms, so it's probably not a big deal. The "vapic.bin" should probably be upgraded to use a PNP header just so it doesn't show up in the boot menu.

I was talking about this code in optionroms.c:

Quoted 8 lines
        if (! pnp) {
            // Legacy rom.
            boot_add_bcv(FLATPTR_TO_SEG(rom), OPTION_ROM_INITVECTOR, 0
                         , getRomPriority(sources, rom, 0));
            continue;
        }

Isn't it register bcv for each non pnp option rom found?

Yes.

Quoted 3 lines

As far as I
understand this is done in order to postpone executing such rom until it is absolutely clear that user wants to use it for booting.

No - the option rom will always be executed. The purpose of placing it in the BCV list is to order its execution with respect to other BCVs so that if the legacy option rom hooks int13 it will do so after other drives have had a chance.

Should a legacy rom do direct boot or hook int19 it will take priority over everything else - irrespective of seabios priorities or what the user selects in the boot menu. This lack of control is what spawned the whole PNP rom stuff.

Quoted 3 lines

If
boot_add_bcv() will unconditionally give HD boot priority to such bcv it will have higher priority than CD or pxe boot option, no?

As above, the BCV priorities are only relevant when compared to the priority of other BCVs. So, no - it should have no impact on CD/PXE.

As I mentioned in my previous post, SeaBIOS does currently prioritizes hard drive booting when the user selects "Legacy option rom" from the boot menu - it's unclear if this is the right thing to do.

To be honest, this wasn't all that clear to me yesterday - I had to think on it a bit. This legacy boot stuff is crazy.

-Kevin

#30 lore raw
Quoted 18 lines · Kevin O'Connor

On Sun, Jan 08, 2012 at 05:17:45PM +0200, Gleb Natapov wrote:
No - the option rom will always be executed. The purpose of placing it in the BCV list is to order its execution with respect to other BCVs so that if the legacy option rom hooks int13 it will do so after other drives have had a chance.

Should a legacy rom do direct boot or hook int19 it will take priority over everything else - irrespective of seabios priorities or what the user selects in the boot menu. This lack of control is what spawned the whole PNP rom stuff.

Quoted 3 lines

If
boot_add_bcv() will unconditionally give HD boot priority to such bcv it will have higher priority than CD or pxe boot option, no?

As above, the BCV priorities are only relevant when compared to the priority of other BCVs. So, no - it should have no impact on CD/PXE.

Quoted 6 lines

As I mentioned in my previous post, SeaBIOS does currently prioritizes hard drive booting when the user selects "Legacy option rom" from the boot menu - it's unclear if this is the right thing to do.

To be honest, this wasn't all that clear to me yesterday - I had to think on it a bit. This legacy boot stuff is crazy.

Thanx for applying the patch/adding SCSI boot order feature to Seabios and supporting the LSI option ROM. (For the records: 88e745e11242bbe13fa4f22093029ccf04087472 and 1e15725c92858a0cb1dd5c76bd44af1fec09fee3)

I think we have added even more compliance to QEMU/KVM and Seabios regarding option ROMs and SCSI boot order support.

Sometimes lateral thinking is necessary to achieve good results :-)

Ciao,
Gerhard

--
http://www.wiesinger.com/

#31 lore raw
In reply to Kevin O'Connor

Hi,

Quoted 6 lines

I'm not sure what a SCSI rom would do with a CD drive. My guess is that it wouldn't map it to a BIOS visible drive id at all, as there's no way to select an id with any assurance that it wont conflict with one chosen by the BIOS or another rom. If QEMU can simulate this (and someone knows the command-line to do such) it would be an interesting test to see what the rom does.

The lsi rom (8xx_64.rom) seems to prioritize cdroms. Maybe that is something configurable in the option rom setup. When a cdrom drive with a bootable cd inserted is present the boot looks like this:

=======================================================================
SeaBIOS (version 0.6.1.2-20120105_124702-rincewind.home.kraxel.org)

iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CB00 PCI2.10 PnP PMM+1FFD9190+1FF99190 CB00

LSI Logic Corp. Symbios SDMS (TM) V4.0 PCI SCSI BIOS, PCI Rev. 2.0, 2.1 Copyright 1995-2001 LSI Logic Corp.
PCI-4.19.00

HBA ID LUN VENDOR PRODUCT REV SYNC WIDE CYL/ HD/SEC
--- -- --- -------- ---------------- ---- ----- ---- ------------

 0   0  0  QEMU     QEMU HARDDISK    1.0.   NO    8  1024/255/63
 0   1  0  QEMU     QEMU HARDDISK    1.0.   NO    8  1008/ 33/63
 0   4  0  QEMU     QEMU CD-ROM      1.0.   NO    8
 0   7  0  LSILogic 53C895A          0000  10.0   8

LSI Logic Corp. PCI boot ROM successfully installed! Press F12 for boot menu.

Select boot device:

1. #28 ID04 LUN0 QEMU QEMU CD-ROM
2. USB Drive USB Flash Disk 2.00
3. iPXE (PCI 00:03.0)
=======================================================================

whereas without bootable cd (drive still present but no disk inserted) the boot menu looks like this:

=======================================================================
Select boot device:

1. #28 ID00 LUN0 QEMU QEMU HARDDISK
2. USB Drive USB Flash Disk 2.00
3. iPXE (PCI 00:03.0)
4. #28 ID01 LUN0 QEMU QEMU HARDDISK
=======================================================================

cheers,
Gerd

#32 lore raw
In reply to Kevin O'Connor
Quoted 11 lines · Kevin O'Connor
Quoted 9 lines · Gleb Natapov
Quoted 3 lines · Gerhard Wiesinger

But as far as I remember therefore the option ROM registers through BIOS for INT 19h booting. So Seabios should know it that this is a harddisk.

It registers BEV. Otherwise you wouldn't be able to boot at all. In fact it registers multiple BEVs (one for each attached scsi device). But BIOS knows nothing about the device behind the BEV. It just jumps to BEV address to boot from it when INT 19h is called. There may be scsi cdrom there or even tape.

Quoted 6 lines

Gerhard's option rom is actually registering a BCV, and SeaBIOS can know that is likely a hard drive. So, I think Gerhard has a point. SeaBIOS could probably fall back to the harddrive priority if it finds a BCV without an explicit bootindex priority.

Gerhard - does the patch below improve things for you?

Can confirm, that it works now as expected and boots from SCSI harddisk. (boot order=cad,menu=on). Also boot=dca,menu=on boots from CDROM as expected. Also when legacy option rom is selected boots from harddisk.

Boot menu looks like

1. #18 ID 00 LUN0 QEMU    QEMU HARDDSISK
2. #18 ID 00 LUN1 QEMU    QEMU HARDDSISK
3. #18 ID 00 LUN2 QEMU    QEMU HARDDSISK
4. #18 ID 00 LUN3 QEMU    QEMU HARDDSISK

5. Legacy option rom
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
7. iPXE (PCI 00:00.0)

But there is still the iPXE ROM there (I think I didn't see iPXE because it is last one displayed and boot screen is fast and will be cleared afterwards). So something must be wrong. @Gerd: any ideas?

command line:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64
-drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3 -cdrom KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=cad,menu=on -m 256 -k de -vga vmware -vnc :0 -bios /root/download/seabios/git/seabios/out/bios.bin -option-rom 8xx_64.rom -device rtl8139,mac=1a:46:0b:ca:bc:7c,vlan=0,romfile=
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device pcnet,mac=1a:46:0b:ca:bc:7e,vlan=1,romfile=
-net tap,ifname=tap1,script=no,downscript=no,vlan=1

Relevant logs below.

Ciao,
Gerhard

--
http://www.wiesinger.com/

|0ffdf000| Searching bootorder for: /pci@i0cf8/*@1,1/drive@1/disk@0
|0ffdf000| pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe15b0 (detail=0x0ffe15d0)
|0ffdf000| Registering bootable: DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD] (type:3 prio:103 data:fd940)

Searching bootorder for: /rom@genroms/8xx_64.rom
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1560 (detail=0x0ffe1580)
Registering bootable: #18 ID00 LUN0 QEMU QEMU HARDDISK (type:129 prio:101 data:ca003d4e)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom1
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1510 (detail=0x0ffe1530)
Registering bootable: #18 ID01 LUN0 QEMU QEMU HARDDISK (type:129 prio:101 data:ca003da2)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom2
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe14c0 (detail=0x0ffe14e0)
Registering bootable: #18 ID02 LUN0 QEMU QEMU HARDDISK (type:129 prio:101 data:ca003df6)
Searching bootorder for: /rom@genroms/8xx_64.rom:rom3
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1470 (detail=0x0ffe1490)
Registering bootable: #18 ID03 LUN0 QEMU QEMU HARDDISK (type:129 prio:101 data:ca003e4a)
Checking rom 0x000ce000 (sig aa55 size 17)
Searching bootorder for: /rom@genroms/vapic.bin
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1420 (detail=0x0ffe1440) Registering bootable: Legacy option rom (type:129 prio:101 data:ce000003) Checking rom 0x000d0800 (sig aa55 size 5)
Searching bootorder for: /rom@genroms/pxe-pcnet.rom
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe13d0 (detail=0x0ffe13f0) Registering bootable: iPXE (PCI 00:00.0) (type:128 prio:9999 data:d0800372) Press F12 for boot menu.

Checking for bootsplash

#33 lore raw

On Sat, Jan 07, 2012 at 09:35:55AM +0100, Gerhard Wiesinger wrote:
[...]

Quoted 7 lines

5. Legacy option rom
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
7. iPXE (PCI 00:00.0)

But there is still the iPXE ROM there (I think I didn't see iPXE because it is last one displayed and boot screen is fast and will be cleared afterwards). So something must be wrong. @Gerd: any ideas?

[...]

Quoted 8 lines

Checking rom 0x000ce000 (sig aa55 size 17)
Searching bootorder for: /rom@genroms/vapic.bin
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1420 (detail=0x0ffe1440) Registering bootable: Legacy option rom (type:129 prio:101 data:ce000003) Checking rom 0x000d0800 (sig aa55 size 5)
Searching bootorder for: /rom@genroms/pxe-pcnet.rom
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe13d0 (detail=0x0ffe13f0) Registering bootable: iPXE (PCI 00:00.0) (type:128 prio:9999 data:d0800372)

The iPXE rom is coming from the "genroms" fw_cfg interface instead of via the pci rom bar interface. Also, the "legacy option rom" is from the vapic.bin file (comfing from the same fw_cfg interface) - this rom is something KVM sets up.

-Kevin

#34 lore raw
Quoted 19 lines · Kevin O'Connor

On Sat, Jan 07, 2012 at 09:35:55AM +0100, Gerhard Wiesinger wrote:
[...]

Quoted 7 lines

5. Legacy option rom
6. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
7. iPXE (PCI 00:00.0)

But there is still the iPXE ROM there (I think I didn't see iPXE because it is last one displayed and boot screen is fast and will be cleared afterwards). So something must be wrong. @Gerd: any ideas?

[...]

Quoted 8 lines

Checking rom 0x000ce000 (sig aa55 size 17)
Searching bootorder for: /rom@genroms/vapic.bin
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe1420 (detail=0x0ffe1440) Registering bootable: Legacy option rom (type:129 prio:101 data:ce000003) Checking rom 0x000d0800 (sig aa55 size 5)
Searching bootorder for: /rom@genroms/pxe-pcnet.rom
pmm_malloc zone=0x0ffefe30 handle=ffffffff size=20 align=10 ret=0x0ffe13d0 (detail=0x0ffe13f0) Registering bootable: iPXE (PCI 00:00.0) (type:128 prio:9999 data:d0800372)

Quoted 4 lines

The iPXE rom is coming from the "genroms" fw_cfg interface instead of via the pci rom bar interface. Also, the "legacy option rom" is from the vapic.bin file (comfing from the same fw_cfg interface) - this rom is something KVM sets up.

No NIC:
-net none
=> No iPXE ROM (correct).

but with the previously listed config no iPXE ROM should be there. Saw this is done through paravirtualization from Seabios/QEMU or KVM. So there must be a bug with the empty romfile options with net or device (I guess) in QEMU/KVM.

The vapic.bin is ok.

BTW: Will you integrate the boot one liner?

Ciao,
Gerhard

--
http://www.wiesinger.com/

#35 lore raw
Quoted 6 lines · Gerhard Wiesinger

No NIC:
-net none
=> No iPXE ROM (correct).

but with the previously listed config no iPXE ROM should be there. Saw this is done through paravirtualization from Seabios/QEMU or KVM. So there must be a bug with the empty romfile options with net or device (I guess) in QEMU/KVM.

I think I found the bug:
pcnet-pci.c
static int pci_pcnet_init(PCIDevice *pci_dev)
{
...

    if (!pci_dev->qdev.hotplugged) {
        static int loaded = 0;
        if (!loaded) {
            rom_add_option("pxe-pcnet.rom", -1);
            loaded = 1;
        }
    }

Option rom is added unconditionally regardless of command line options due to hot plug feature ...

grep -ir rom_add_option .
./ne2000.c: rom_add_option("pxe-ne2k_pci.rom", -1);
NE2000 also has the same problem.

RTL8139 and all others are done through romfile which are working correct:
./rtl8139.c: .romfile = "pxe-rtl8139.rom",

Ciao,
Gerhard

--
http://www.wiesinger.com/

#36 lore raw
Quoted 21 lines · Gerhard Wiesinger
Quoted 6 lines · Gerhard Wiesinger

No NIC:
-net none
=> No iPXE ROM (correct).

but with the previously listed config no iPXE ROM should be there. Saw this is done through paravirtualization from Seabios/QEMU or KVM. So there must be a bug with the empty romfile options with net or device (I guess) in QEMU/KVM.

I think I found the bug:
pcnet-pci.c
static int pci_pcnet_init(PCIDevice *pci_dev)
{
...

   if (!pci_dev->qdev.hotplugged) {
       static int loaded = 0;
       if (!loaded) {
           rom_add_option("pxe-pcnet.rom", -1);
           loaded = 1;
       }

}

Quoted 8 lines

Option rom is added unconditionally regardless of command line options due to hot plug feature ...

grep -ir rom_add_option .
./ne2000.c: rom_add_option("pxe-ne2k_pci.rom", -1);
NE2000 also has the same problem.

RTL8139 and all others are done through romfile which are working correct:
./rtl8139.c: .romfile = "pxe-rtl8139.rom",

I finally submitted a patch for fixing the issue:
[PATCH] network: Added option to disable NIC option roms

Ciao,
Gerhard

--
http://www.wiesinger.com/

#37 lore raw
In reply to Gerhard Wiesinger

Hi,

Quoted 10 lines
Quoted 2 lines

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?

It shouldn't be there. I guess you've trapped into automagic device creation logic in qemu. When neither -net nor -netdev is specified on the command line qemu creates a default network setup for you, which includes a nic, and that probably is the rom of the automagically created nic.

Try "qemu -netdev user,id=mynet -device rtl8139,romfile=,netdev=mynet", then it should work as expected.

HTH,
Gerd

#38 lore raw
Quoted 13 lines · Gerd Hoffmann

Hi,

Quoted 10 lines
Quoted 2 lines

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?

Quoted 8 lines

It shouldn't be there. I guess you've trapped into automagic device creation logic in qemu. When neither -net nor -netdev is specified on the command line qemu creates a default network setup for you, which includes a nic, and that probably is the rom of the automagically created nic.

Try "qemu -netdev user,id=mynet -device rtl8139,romfile=,netdev=mynet", then it should work as expected.

Old command line (relevant parameters):
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device rtl8139,romfile= -net nic,model=pcnet,macaddr=1a:46:0b:ca:bc:7e,vlan=1 -net tap,ifname=tap1,script=no,downscript=no,vlan=1
-device pcnet,romfile=
So the net option is already there but it doesn't work.

Tried command line:
-netdev user,id=mynet
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device rtl8139,romfile=,netdev=mynet
-net nic,model=pcnet,macaddr=1a:46:0b:ca:bc:7e,vlan=1
-net tap,ifname=tap1,script=no,downscript=no,vlan=1
-device pcnet,romfile=,netdev=mynet
qemu-system-x86_64: -device pcnet,romfile=,netdev=mynet: Property 'pcnet.netdev' can't take value 'mynet', it's in use

I guess this might come from 2 NICs.

Any further ideas?

BTW: I had the problem with DUAL NICs that when vlan=x isn't specified whole network is dead. Is this the correct command line?
br0: received packet on tap0 with own address as source address
# http://lists.freebsd.org/pipermail/freebsd-emulation/2009-June/006222.html

config with tun devices:
brctl show

bridge name     bridge id               STP enabled     interfaces
br0             8000.001fcff4d4ea       no              eth0

tap0 tap1

Thnx.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#39 lore raw
Quoted 21 lines · Gerhard Wiesinger
Quoted 20 lines · Gerd Hoffmann

Hi,

Quoted 11 lines
Quoted 2 lines

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?

It shouldn't be there. I guess you've trapped into automagic device creation logic in qemu. When neither -net nor -netdev is specified on the command line qemu creates a default network setup for you, which includes a nic, and that probably is the rom of the automagically created nic.

Quoted 5 lines
Quoted 2 lines

Try "qemu -netdev user,id=mynet -device rtl8139,romfile=,netdev=mynet", then it should work as expected.

Old command line (relevant parameters):
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0

creates a nic (with rom).

Quoted 1 line

-net tap,ifname=tap0,script=no,downscript=no,vlan=0

creates a tap device

Quoted 1 line

-device rtl8139,romfile=

creates a nic too (without rom), so you have two rtl8139 devices now ...

You probably want this:

-net tap,ifname=tap0,script=no,downscript=no,vlan=0 -device rtl8139,romfile=,macaddr=1a:46:0b:ca:bc:7c,vlan=0

Or when using netdevs instead of vlans:

-netdev tap,ifname=tap0,script=no,downscript=no,id=net0 -device rtl8139,romfile=,macaddr=1a:46:0b:ca:bc:7c,netdev=net0

Likewise for the second nic, just with vlan=1 (or a different name for the netdev).

HTH,
Gerd

#40 lore raw
Quoted 48 lines · Gerd Hoffmann
Quoted 21 lines · Gerhard Wiesinger
Quoted 20 lines · Gerd Hoffmann

Hi,

Quoted 11 lines
Quoted 2 lines

Better use a empty string as romfile argument, that will make the ROM pci bar go away instead of creating one with an invalid rom.

Thnx. Works well by specifying no romfile, that's the trick. I had the problem than otherwise devices were created. But I'm still getting the following iPXE rom message:
iPXE v1.0.0-591-g7aee315
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0FFCA670+0FF8A670 CA00

How to disable it, too?

It shouldn't be there. I guess you've trapped into automagic device creation logic in qemu. When neither -net nor -netdev is specified on the command line qemu creates a default network setup for you, which includes a nic, and that probably is the rom of the automagically created nic.

Quoted 5 lines
Quoted 2 lines

Try "qemu -netdev user,id=mynet -device rtl8139,romfile=,netdev=mynet", then it should work as expected.

Old command line (relevant parameters):
-net nic,model=rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0

creates a nic (with rom).

Quoted 1 line

-net tap,ifname=tap0,script=no,downscript=no,vlan=0

creates a tap device

Quoted 1 line

-device rtl8139,romfile=

creates a nic too (without rom), so you have two rtl8139 devices now ...

You probably want this:

(quoted diff) +0 -2
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device rtl8139,romfile=,macaddr=1a:46:0b:ca:bc:7c,vlan=0

Or when using netdevs instead of vlans:

(quoted diff) +0 -2
-netdev tap,ifname=tap0,script=no,downscript=no,id=net0
-device rtl8139,romfile=,macaddr=1a:46:0b:ca:bc:7c,netdev=net0
Quoted 2 lines

Likewise for the second nic, just with vlan=1 (or a different name for the netdev).

Tried:
-device rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0,romfile=
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device pcnet,macaddr=1a:46:0b:ca:bc:7e,vlan=1,romfile=
-net tap,ifname=tap1,script=no,downscript=no,vlan=1
qemu-system-x86_64: -device rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0,romfile=: Property 'rtl8139.macaddr' not found

So therefore as I suggested in the first email the rom (or romfile) parameter in the "-net nic parameter"

Any other ideas?

Thnx for help.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#41 lore raw

Hi,

Quoted 3 lines

qemu-system-x86_64: -device rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0,romfile=: Property 'rtl8139.macaddr' not found

Oops. It is mac=..., not macaddr=...

cheers,
Gerd

#42 lore raw
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines

qemu-system-x86_64: -device rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0,romfile=: Property 'rtl8139.macaddr' not found

Oops. It is mac=..., not macaddr=...

Just for the records, working config looks like:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64
-drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3
-cdrom ISO/KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=c -m 256 -k de -vga vmware -vnc :0
-bios /root/download/seabios/git/seabios/out/bios.bin -option-rom BIOS/8xx_64.rom,bootindex=1 -device rtl8139,mac=1a:46:0b:ca:bc:7c,vlan=0,romfile=
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device pcnet,mac=1a:46:0b:ca:bc:7e,vlan=1,romfile=
-net tap,ifname=tap1,script=no,downscript=no,vlan=1

Boots from harddisk well.

Last question: how will enabling the boot menu be enabled with bootindex option?

Can someone add such a complex sample to documentation?

Thnx to all.

Ciao,
Gerhard

--
http://www.wiesinger.com/

#43 lore raw
Quoted 22 lines · Gerhard Wiesinger
Quoted 5 lines · Gerd Hoffmann
Quoted 3 lines

qemu-system-x86_64: -device rtl8139,macaddr=1a:46:0b:ca:bc:7c,vlan=0,romfile=: Property 'rtl8139.macaddr' not found

Oops. It is mac=..., not macaddr=...

Just for the records, working config looks like:
/root/download/qemu/git/qemu-kvm/x86_64-softmmu/qemu-system-x86_64

(quoted diff) +0 -7
-drive file=1.img,media=disk,if=scsi,bus=0,unit=0
-drive file=2.img,media=disk,if=scsi,bus=0,unit=1
-drive file=3.img,media=disk,if=scsi,bus=0,unit=2
-drive file=4.img,media=disk,if=scsi,bus=0,unit=3
-cdrom ISO/KNOPPIX_V6.2CD-2009-11-18-DE.iso
-boot order=c -m 256 -k de -vga vmware -vnc :0
-bios /root/download/seabios/git/seabios/out/bios.bin -option-rom

BIOS/8xx_64.rom,bootindex=1

(quoted diff) +0 -4
-device rtl8139,mac=1a:46:0b:ca:bc:7c,vlan=0,romfile=
-net tap,ifname=tap0,script=no,downscript=no,vlan=0
-device pcnet,mac=1a:46:0b:ca:bc:7e,vlan=1,romfile=
-net tap,ifname=tap1,script=no,downscript=no,vlan=1
Quoted 5 lines

Boots from harddisk well.

Last question: how will enabling the boot menu be enabled with bootindex option?

Well, you are doing it with good old -boot option :) Add "-boot menu=on" to your command line, but specify boot order using bootindex.

Quoted 9 lines

Can someone add such a complex sample to documentation?

Thnx to all.

Ciao,
Gerhard

--
http://www.wiesinger.com/

--
Gleb.