Bug#418856: update-grub uses hard default for kopt_2_6 for fresh installs

Michael Clarke mike.clarke at lancaster.ac.uk
Thu Apr 12 11:20:54 UTC 2007

Package: grub
Version: 0.97-27

I am currently in the process of trying to make update-grub play
nicely with our configuration management system.  Ideally, I
would like to be able to specify xenkopt, xenhopt, kopt, etc. in
/etc/default/grub, and *not* have to mess with
/boot/grub/menu.lst (because it's far better for the
configuration management system to manage a whole file than fight
over menu.lst with other systems.)

The system I have now works fine for the Xen options, but falls
down on kopt, because of the fact that kopt_2_6 is (somewhat
inexplicably) hard-coded in with its own options for fresh
installs -- there seems to be no way of setting this in the
defaults file.

Is it possible to either not rely on kopt_2_6, or permit it to be
set from the defaults file in the same way that kopt can be?

I include a (probably naive) patch for the former case:

diff -u update-grub.orig update-grub
--- update-grub.orig    2007-04-12 11:46:52.000000000 +0100
+++ update-grub 2007-04-12 12:11:04.000000000 +0100
@@ -711,9 +711,6 @@
 # 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 ro"
 # Extract options for specific kernels
 opts="$(ExtractMenuOpts "\(kopt_[[:alnum:]_]\+\)")"
 test -z "$opts" || eval "$opts"


Mike Clarke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20070412/2d06d740/attachment.pgp

More information about the Pkg-grub-devel mailing list