Bug 498388 - [RHEL5.4 KVM/virtio][PATCH] add support for virtio_blk devices to grub-install
[RHEL5.4 KVM/virtio][PATCH] add support for virtio_blk devices to grub-install
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: grub (Show other bugs)
5.4
All Linux
high Severity medium
: rc
: ---
Assigned To: Peter Jones
Alexander Todorov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-30 04:56 EDT by Mark McLoughlin
Modified: 2009-09-02 07:53 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 479760
Environment:
Last Closed: 2009-09-02 07:53:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark McLoughlin 2009-04-30 04:56:46 EDT
+++ 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@lex.hider.name on 2009-03-01 04:43:12 EDT ---

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

--- Additional comment from markmc@redhat.com on 2009-03-20 12:29:11 EDT ---

pjones: does Nate's patch look reasonable?

--- Additional comment from pjones@redhat.com on 2009-04-29 17:28:22 EDT ---

This looks fine, it's in -50 .

--- Additional comment from markmc@redhat.com on 2009-04-30 03:21:49 EDT ---

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

--- Additional comment from markmc@redhat.com on 2009-04-30 04:52:36 EDT ---

Just tested, -50 seems to work fine
Comment 2 Mark McLoughlin 2009-04-30 05:51:37 EDT
I've tested this using 5.3 grub-install with the changes to the regexps and it seems to work fine
Comment 3 RHEL Product and Program Management 2009-05-18 11:10:06 EDT
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 13:49:06 EDT
Fixed in grub-0.97-13.4
Comment 7 Alexander Todorov 2009-05-22 09:04:41 EDT
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 11:25:35 EDT
Can you try it with "grub-install /dev/vda" instead of "grub-install /dev/vda1" ?
Comment 9 Alexander Todorov 2009-05-25 06:54:35 EDT
`grub-install /dev/vda' works fine for me on i386/kvm. Moving to verified.
Comment 11 errata-xmlrpc 2009-09-02 07:53:41 EDT
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.