Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 757999

Summary: usb-storage's boot priority is not set correctly by seabios
Product: Red Hat Enterprise Linux 6 Reporter: Chao Yang <chayang>
Component: seabiosAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bsarathy, ehabkost, flang, juzhang, michen, mkenneth, pbonzini, qzhou, shuang, virt-maint, xigao
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: seabios-0.6.1.2-12.el6 Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:54:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 782028    
Bug Blocks:    

Description Chao Yang 2011-11-29 07:34:31 UTC
Description of problem:
boot a pre-installed virtio-blk vm and attach a usb storage, set usb-storage's bootindex to 1, virtio-blk's to 2, seabios always try to boot from virtio-blk instead of usb-storage.

Version-Release number of selected component (if applicable):
# rpm -q qemu-kvm seabios
qemu-kvm-0.12.1.2-2.210.el6.x86_64
seabios-0.6.1.2-8.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:
SeaBIOS (version 0.6.1.2-20111101_081028-x86-007.build.bos.redhat.com)



gPXE (http://etherboot.org) - 00:04.0 CA00 PCI2.10 PnP BBS PMM7FE0@10 CA00
                                                                               

Press F12 for boot menu.

Select boot device:

1. Virtio disk PCI:0:3
2. gPXE (PCI 00:04.0)
3. USB Drive QEMU     QEMU HARDDISK    0.12
4. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
5. Legacy option rom



Expected results:


Additional info:
can not reproduce if attach a virtrio-blk or a virtio-nic instead of usb-storage.
CLI:
/usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 2048 -smp 2 -uuid b5d1b5f3-6372-4c30-a080-ebb96fb23c49 -rtc base=utc,clock=host,driftfix=slew -boot menu=on -drive file=/mnt/RHEL-Server-6.2-64-virtio.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none -device virtio-blk-pci,drive=drive-virtio-0-0,id=virt0-0-0,bootindex=2 -netdev tap,id=hostnet1 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=64:31:50:41:e1:44,bootindex=3 -balloon none -device usb-ehci,id=ehci -drive file=/home/storage.qcow2,if=none,id=drive-virtio-0-1,media=disk,format=qcow2,cache=none -device usb-storage,drive=drive-virtio-0-1,id=virt0-0-1,bootindex=1,bus=ehci.0 -nographic

Comment 1 Eduardo Habkost 2011-12-02 14:34:25 UTC
Assigning to Gleb, that worked on boot priority of USB drives for bug 643688.

Comment 2 Paolo Bonzini 2012-02-07 13:50:10 UTC
Hi chayang, please test with the seabios package at http://people.redhat.com/pbonzini/virtio-scsi -- there is a patch there that might be related to this bug.

Comment 3 Chao Yang 2012-02-09 12:53:27 UTC
(In reply to comment #2)
> Hi chayang, please test with the seabios package at
> http://people.redhat.com/pbonzini/virtio-scsi -- there is a patch there that
> might be related to this bug.

Retested this issue in:
# uname -r;rpm -q qemu-kvm;rpm -q seabios
2.6.32-229.el6.x86_64
qemu-kvm-0.12.1.2-2.225.el6.x86_64
seabios-0.6.1.2-8.el6.scsitest.x86_64

Actual Result:
The priority for usb-storage device has been set correctly based on the bootindex provided by CLI and could boot from this usb storage. This issue disappeared on seabios-0.6.1.2-8.el6.scsitest.x86_64

Output of boot sequence listed by seabios:
SeaBIOS (version 0.6.1.2-20120112_093651-x86-009.build.bos.redhat.com)



gPXE (http://etherboot.org) - 00:03.0 C100 PCI2.10 PnP BBS PMM7FE0@10 C100
                                                                               

Press F12 for boot menu.

Select boot device:

1. USB MSC Drive QEMU QEMU HARDDISK 0.12
2. Virtio disk PCI:0:2
3. gPXE (PCI 00:03.0)
4. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
5. Legacy option rom

CLI:
/usr/libexec/qemu-kvm -M rhel6.2.0 ... -boot menu=on -drive file=/home/rhel6.2.qcow2,if=none,id=drive-virtio-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-0-0,id=virt0-0-0,bootindex=2 -netdev tap,id=net -device virtio-net-pci,netdev=net,id=net0,mac=64:31:50:23:e9:19,bootindex=3 -usb -device usb-tablet,id=input1 -spice port=9000,disable-ticketing -vga none -nographic -balloon none -device usb-ehci,id=ehci -drive file=/home/RHEL-3.9-32-virtio.qcow2,id=drive-usb,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,if=none -device usb-storage,drive=drive-usb,id=usbstorage,bootindex=1,bus=ehci.0

Comment 4 Paolo Bonzini 2012-02-09 13:10:10 UTC
Fixed by my series, taking it.

Comment 7 langfang 2012-04-01 08:47:21 UTC
Reproduced this issue with steps and  environment as follows: 

host:
#uname -r
2.6.32-220.el6.x86_64
#rpm -qa |grep qemu-kvm
qemu-kvm-0.12.1.2-2.209.el6.x86_64
# rpm -qa |grep seabios
seabios-0.6.1.2-8.el6.x86_64

1)boot a pre-installed virtio-blk vm and attach a usb storage, set usb-storage's
bootindex to 1, virtio-blk's to 2
CLI:/usr/libexec/qemu-kvm -m 2G -smp 1 -cpu Penryn,+x2apic, -usbdevice tablet -drive file=/home/RHEL-Server-6.3-64-virtio.qcow2-newinstall5,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,scsi=off,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x4,id=net0,bootindex=3  -boot menu=on -uuid 5cc4d2e4-4960-4370-a856-038f63be7c96 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection  -monitor stdio -name rhel6.1 -spice port=1000,disable-ticketing -vga qxl -device virtio-balloon-pci,bus=pci.0,id=balloon0 -device usb-ehci,id=ehci -drive file=/home/win2008r2-64bit.raw,if=none,id=drive-virtio-0-1,media=disk,format=raw,cache=none -device usb-storage,drive=drive-virtio-0-1,id=virt0-0-1,bootindex=1,bus=ehci.0 

2)press F12
Select boot device:

1. Virtio disk PCI:0:3
2. gPXE (PCI 00:04.0)
3. USB Drive QEMU     QEMU HARDDISK    0.12
4. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
5. Legacy option rom


Verified this issue with steps and environment as follows:
host:
# uname -r
2.6.32-252.el6.x86_64
# rpm -qa |grep qemu-kvm
qemu-kvm-0.12.1.2-2.265.el6.x86_64
seabios-0.6.1.2-13.el6.x86_64
verify this issue use the steps as  same as reproduce.
actual results:
1)..
2)press F12
Select boot device:

1. USB MSC Drive QEMU QEMU HARDDISK 0.12
2. Virtio disk PCI:0:2
3. gPXE (PCI 00:03.0)
4. DVD/CD [ata1-0: QEMU DVD-ROM ATAPI-4 DVD/CD]
5. Legacy option rom
3)boot from usb

Above all could boot from this usb storage,and the boot priority is correct,so issue has been fixed.

Comment 9 Eduardo Habkost 2012-04-23 18:51:02 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 11 errata-xmlrpc 2012-06-20 12:54:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0802.html