Peter Humphrey <pe...@prh.myzen.co.uk> wrote: > > Now, my question is how to have grub2 offer me a choice of kernels from all > those that are present in /boot (a separate ext2 partition). Not only that, > but pass different softlevel selectors to them.
In my opinion you should decide for either manually writing a grub.cfg or for letting it produce automatically by the scripts: In the former case you have all the flexibility of legacy a grub (and much more) while in the latter case you probably have to hack around with the generating scripts - probably it is simpler to hack scripts for your particular purpose. However, there is also a further possibility: Instead of passing the kernel line directly you can use variables in the kernel line; you can then set these variables to some defaults and add menu entries to modify them. This way you need two (or more) clicks when you want a special kernel with a special command line, but the total number of entries needed is less (not all combinations for all kernels have their own entry), and it is probably also easier to patch the scripts to generate this: Essentially you just have to force the scripts to generate a kernel line which uses the variables (I have never looked to the scripts in much detail, but I guess that this is not so hard), and you need to add the additional code to set the variables. An example for a manual setup (i.e. not autogenerating grub.cfg) using this technique can be found here: http://forums.gentoo.org/viewtopic-p-7426932.html#7426932