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

Bug#769559: debian-edu-config: Incomplete grub-installer workaround (fail with virtio, xen and old style disk devices)



Package: debian-edu-config
Version: 1.813
Severity: important
Tags: patch pending

The workaround for grub-installer bug #712907 in version 1.813 only
handled device names like /dev/sdX.  Disks can have other devices too,
and the following patch add support for these devices.  The fix is
already commited to git and tested on several different machines.

diff --git a/share/debian-edu-config/d-i/pre-pkgsel b/share/debian-edu-config/d-i/pre-pkgsel
index 23511c2..1a810c4 100644
--- a/share/debian-edu-config/d-i/pre-pkgsel
+++ b/share/debian-edu-config/d-i/pre-pkgsel
@@ -314,7 +314,7 @@ create_initial_localadmin_user() {
 workaround_grub_issue() {
     log "checking if grub workaround for bug #712907 should be activated."
     bootdev=$(grep /target/boot /proc/mounts | cut -d" " -f1)
-    grubdev=$(echo $bootdev | sed -rn 's/(\/sd.).*$/\1/p')
+    grubdev=$(echo $bootdev | sed -rn 's/^(\/dev\/.*d.)[0-9].*$/\1/p')
 
     # Only override if it is set to manual or do not have a value,
     # otherwise we assume someone is preseeding it to the value they
@@ -326,7 +326,7 @@ workaround_grub_issue() {
     fi
 
     case "$bootdev" in
-       /dev/sd*)
+       /dev/sd*|/dev/vd*|/dev/hd*|/dev/xvd*)
            log "overriding grub-installer/choose_bootdev, setting it to $grubdev"
            db_set grub-installer/choose_bootdev "$grubdev" || true
            ;;

-- 
Happy hacking
Petter Reinholdtsen


Reply to: