Bug 498388 - [RHEL5.4 KVM/virtio][PATCH] add support for virtio_blk devices to grub-install
Summary: [RHEL5.4 KVM/virtio][PATCH] add support for virtio_blk devices to grub-install
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: grub
Version: 5.4
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: Alexander Todorov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-30 08:56 UTC by Mark McLoughlin
Modified: 2009-09-02 11:53 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 479760
Environment:
Last Closed: 2009-09-02 11:53:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1388 0 normal SHIPPED_LIVE grub bug fix and enhancement update 2009-09-01 11:57:15 UTC

Description Mark McLoughlin 2009-04-30 08:56:46 UTC
+++ This bug was initially created as a clone of Bug #479760 +++

Created an attachment (id=328792)
Patch to allow grub-install to work on virtio_blk devices.

Description of problem:
grub-install does not support installing on virtio_blk devices. When attempted it prints the error message "/dev/vda1 does not have any corresponding BIOS drive."

Version-Release number of selected component (if applicable):
grub-0.97-38.fc10.i386

How reproducible:
100%

Steps to Reproduce:
1. Install FC10 in vm that supports virtio_blk devices
2. Install /boot on a virtio_blk device
3. execute $ grub-install /dev/vda1
  
Actual results:
Error message displayed:
/dev/vda1 does not have any corresponding BIOS drive

Expected results:
Grub installs on virtio_blk device

Additional info:
Attached is a patch that worked for me to fix the issue.

--- Additional comment from floss.name on 2009-03-01 04:43:12 EDT ---

*** Bug 484986 has been marked as a duplicate of this bug. ***

--- Additional comment from markmc on 2009-03-20 12:29:11 EDT ---

pjones: does Nate's patch look reasonable?

--- Additional comment from pjones on 2009-04-29 17:28:22 EDT ---

This looks fine, it's in -50 .

--- Additional comment from markmc on 2009-04-30 03:21:49 EDT ---

* Wed Apr 29 2009 Peter Jones <pjones> - 0.97-50
- Handle virtio_blk disks and their crazy new device name in grub-install
  (rhbz#479760)

--- Additional comment from markmc on 2009-04-30 04:52:36 EDT ---

Just tested, -50 seems to work fine

Comment 2 Mark McLoughlin 2009-04-30 09:51:37 UTC
I've tested this using 5.3 grub-install with the changes to the regexps and it seems to work fine

Comment 3 RHEL Program Management 2009-05-18 15:10:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Peter Jones 2009-05-20 17:49:06 UTC
Fixed in grub-0.97-13.4

Comment 7 Alexander Todorov 2009-05-22 13:04:41 UTC
1) prepared a machine using virtio drivers, see:
https://bugzilla.redhat.com/show_bug.cgi?id=446232#c17

2)
[root@dhcp71-208 ~]# rpm -q grub
grub-0.97-13.2

[root@dhcp71-208 ~]# /sbin/grub-install /dev/vda1
/dev/vda1 does not have any corresponding BIOS drive.

[root@dhcp71-208 ~]# rpm -Uhv grub-0.97-13.4.i386.rpm 
Preparing...                ########################################### [100%]
   1:grub                   ########################################### [100%]

[root@dhcp71-208 ~]# rpm -q grub
grub-0.97-13.4

[root@dhcp71-208 ~]# /sbin/grub-install /dev/vda1 
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0)     /dev/vda

[root@dhcp71-208 ~]# echo $?
0


Shutting down and then powering up the virtual system shows a screen with "GRUB GRUB GRUB ..." on it. The virtual guest doesn't boot. 

Is this OK to verify this bug and why the guest doesn't start after executing grub-install ?

Comment 8 Peter Jones 2009-05-22 15:25:35 UTC
Can you try it with "grub-install /dev/vda" instead of "grub-install /dev/vda1" ?

Comment 9 Alexander Todorov 2009-05-25 10:54:35 UTC
`grub-install /dev/vda' works fine for me on i386/kvm. Moving to verified.

Comment 11 errata-xmlrpc 2009-09-02 11:53:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1388.html


Note You need to log in before you can comment on or make changes to this bug.