tags 302359 patch
thanks

This is the patch which fixes this error only at installation time. The 
kopt_2_6 line is generated only for fresh menu.lst. It should allow to boot 
kernel 2.6 with Compaq or Mylex RAID controllers.

-- 
 .''`.    Piotr Roszatycki, Netia SA
: :' :    mailto:[EMAIL PROTECTED]
`. `'     mailto:[EMAIL PROTECTED]
  `-
--- update-grub	2005-04-19 01:38:00 +0200
+++ update-grub.kernel26	2005-05-23 11:54:45 +0200
@@ -96,6 +96,14 @@
 	echo $device
 }
 
+# Usage: convert_kernel26 os_device
+# Convert system path to the kernel26 notation
+# I.e. /dev/ida/c0d0p2 -> /dev/ida!c0d0p2
+convert_kernel26 ()
+{
+    echo "$1" | sed 's%^\(/dev/[^/]*\)/\(.*\)%\1!\2%'
+}
+
 # Usage: convert_raid1 os_device
 # Checks if os_device is a software raid1.
 # If so, converts to first physical device in array.
@@ -262,6 +270,7 @@
 
 # the device for the / filesystem
 root_device=$(find_root_device)
+root_device_2_6=$(convert_kernel26 "$root_device")
 
 # the device for the /boot filesystem
 boot_device=$(find_device "/boot")
@@ -597,6 +606,9 @@
 # Extract the kernel options to use
 kopt=$(GetMenuOpt "kopt" "$kopt")
 
+# Set the kernel 2.6 option only for fresh install
+test -z "$(GetMenuOpt "kopt" "")" && kopt_2_6="root=$root_device_2_6 ro"
+
 # Extract options for specific kernels
 eval $(ExtractMenuOpts "\(kopt_[a-zA-Z0-9_]\+\)")
 CustomKopts=$(GetMenuOpts "\(kopt_[a-zA-Z0-9_]\+\)")
@@ -637,6 +649,8 @@
 echo "# kopt=$kopt" >> $buffer
 if [ -n "$CustomKopts" ] ; then
     echo "$CustomKopts" >> $buffer
+elif [ -n "$kopt_2_6" ] && [ "$kopt" != "$kopt_2_6" ]; then
+    echo "# kopt_2_6=$kopt_2_6" >> $buffer
 fi
 echo >> $buffer
 

Reply via email to