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