]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/grub-0.97_grub-install_virtio.patch
Set version to 2.9rc1.
[people/pmueller/ipfire-2.x.git] / src / patches / grub-0.97_grub-install_virtio.patch
index 7941ca741844a62da1a4e2e8a0abcfa52a43ae33..86afba9939b0775a59de2a66777c5ea0e647004a 100644 (file)
@@ -1,40 +1,51 @@
-diff -Naur grub-0.97.org/util/grub-install.in grub-0.97/util/grub-install.in
---- grub-0.97.org/util/grub-install.in 2004-07-24 20:57:31.000000000 +0200
-+++ grub-0.97/util/grub-install.in     2009-08-14 20:01:20.000000000 +0200
-@@ -96,12 +96,12 @@
-     # Break the device name into the disk part and the partition part.
-     case "$host_os" in
+--- grub-0.97/util/grub-install.in     2010-06-24 08:47:23.000000000 +0200
++++ grub-0.97/util/grub-install.in     2010-06-24 09:20:42.000000000 +0200
+@@ -102,7 +102,7 @@
      linux*)
--      tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
-+      tmp_disk=`echo "$1" | sed -e 's%\([vsh]d[a-z]\)[0-9]*$%\1%' \
-                                 -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \
-                                 -e 's%\(fd[0-9]*\)$%\1%' \
-                                 -e 's%/part[0-9]*$%/disc%' \
-                                 -e 's%\(c[0-7]d[0-9]*\).*$%\1%'`
--      tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
-+      tmp_part=`echo "$1" | sed -e 's%.*/[vsh]d[a-z]\([0-9]*\)$%\1%' \
-                                 -e 's%.*d[0-9]*p%%' \
-                                 -e 's%.*/fd[0-9]*$%%' \
-                                 -e 's%.*/floppy/[0-9]*$%%' \
-@@ -333,6 +333,10 @@
+       # formats that need to be handled (disk name -> partition name):
+       # floppies: /dev/fd0
+-      # normal sd/hd devices: /dev/hda -> /dev/hda3
++      # normal sd/hd/vd devices: /dev/hda -> /dev/hda3
+       # md: /dev/md0 -> /dev/md0p0
+       # ide raid devs: /dev/ide/host0/bus0/target0/lun0/disc
+       #             -> /dev/ide/host0/bus0/target0/lun0/part1
+@@ -134,7 +134,7 @@
+       # more? 
+       tmp_disk=`echo "$1" | grep -v '/mapper/control$' |
+               grep -v '/mapper/[[:alnum:]_]\+-[[:digit:]]\+$' | uniq |
+-              sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \
++              sed -e 's%\([shv]d[a-z]\)[0-9]*$%\1%' \
+                         -e 's%\(/c[0-9]\+d[0-9]\+\).*$%\1%' \
+                         -e 's%\(fd[0-9]*\)$%\1%' \
+                         -e 's%/part[0-9]*$%/disc%' \
+@@ -142,7 +142,7 @@
+   -e 's%\(/mapper/[[:alnum:]]\+\(_[[:alnum:]]\+\)\+\)\p[[:digit:]]\+$%\1%'`
+       tmp_part=`echo "$1" | grep -v '/mapper/control$' |
+               grep -v '/mapper/[[:alnum:]_]\+-[[:digit:]]\+$' | uniq |
+-              sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \
++              sed -e 's%.*/[shv]d[a-z]\([0-9]*\)$%\1%' \
+                         -e 's%.*/c[0-9]\+d[0-9]\+p\([[:digit:]]\+\)%\1%' \
+                         -e 's%.*/c[0-9]\+d[0-9]\+$%%' \
+                         -e 's%.*/fd[0-9]\+$%%' \
+@@ -509,6 +509,10 @@
  if test -f "$device_map"; then
      :
  else
 +
 +  tmp_disk=`echo "$install_device" | grep "/dev/vd"`
 +  if test "x$tmp_disk" = x; then
-+
++    
      # Create a safe temporary file.
      test -n "$mklog" && log_file=`$mklog`
  
-@@ -345,6 +349,11 @@
+@@ -525,6 +529,11 @@
      fi
  
      rm -f $log_file
 +
 +  else
-+      echo "Create fake device.map for vitio device $1" 1>&2
-+      echo "(hd0)    $install_device" > $device_map
++    echo "Create fake device.map for virtio device $1" 1>&2
++    echo "(hd0)    $install_device" > $device_map
 +  fi
  fi