[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#492862: grub-installer: Fails on virtio disks



Package: grub-installer
Severity: normal

grub-installer currently fails on virtio disks (/dev/vd[a-z]) as grub
does not list virtio disks in device.map.

One quick test showed that GRUB 2 was able to cope with these devices
nicely.  The attached patch makes grub-installer default to GRUB 2 when
boot is on virtio disks.  This is pretty hacky, but worked fine in my
tests.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
commit 30b8e4591943a2e2a3b9d73687ea40281575241e
Author: Jérémy Bobbio <lunar@debian.org>
Date:   Tue Jul 29 11:49:34 2008 +0200

    Use GRUB 2 by default on virtio disks

diff --git a/packages/arch/i386/grub-installer/debian/changelog b/packages/arch/i386/grub-installer/debian/changelog
index b1456f3..537001e 100644
--- a/packages/arch/i386/grub-installer/debian/changelog
+++ b/packages/arch/i386/grub-installer/debian/changelog
@@ -1,3 +1,10 @@
+grub-installer (1.33) UNRELEASED; urgency=low
+
+  [ Jérémy Bobbio ]
+  * Use GRUB 2 by default on virtio disks.
+
+ -- Jérémy Bobbio <lunar@debian.org>  Tue, 29 Jul 2008 11:46:30 +0200
+
 grub-installer (1.32) unstable; urgency=low
 
   [ Updated translations ]
diff --git a/packages/arch/i386/grub-installer/grub-installer b/packages/arch/i386/grub-installer/grub-installer
index 2b16484..d5eaafd 100755
--- a/packages/arch/i386/grub-installer/grub-installer
+++ b/packages/arch/i386/grub-installer/grub-installer
@@ -258,9 +258,14 @@ case $prefix in
     /dev/mapper)
 	disc_offered_devfs="$bootfs"
 	;;
-    /dev/[hsv]d[a-z]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9])
+    /dev/[hs]d[a-z]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]|/dev/ida/c[0-9]d[0-9])
 	disc_offered_devfs="$prefix"
 	;;
+    /dev/vd[a-z])
+	disc_offered_devfs="$prefix"
+	# Use GRUB 2 by default on virtio disks
+	db_set grub-installer/grub2_instead_of_grub_legacy true
+	;;
     *)
 	disc_offered_devfs=$(echo "$bootfs_devfs" | sed "s:\(.*\)/.*:\1/disc:")
 	;;

Attachment: signature.asc
Description: Digital signature


Reply to: