Bug#302359: debian-installer: linux26 can't boot with root=/dev/ida/c0d0p1 or root=/dev/rd/c0d0p1
Piotr Roszatycki
Piotr Roszatycki <Piotr_Roszatycki@netia.net.pl>, 302359@bugs.debian.org
Mon, 23 May 2005 12:22:51 +0200
--Boundary-00=_77akCvTxlgCMGRS
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
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:Piotr_Roszatycki@netia.net.pl
`. `' mailto:dexter@debian.org
`-
--Boundary-00=_77akCvTxlgCMGRS
Content-Type: text/x-diff;
charset="us-ascii";
name="update-grub.kernel26.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="update-grub.kernel26.diff"
--- 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
--Boundary-00=_77akCvTxlgCMGRS--