1 |
On Sun, Apr 17, 2022 at 3:00 PM Martin Vaeth <martin@×××××.de> wrote: |
2 |
> |
3 |
> Yes, without a manually written grub.cfg you get none of these features - |
4 |
> the default grub.cfg is just horrible. |
5 |
> Well, the most powerful feature is probably still available: |
6 |
> The possibility to edit the kernel's command line, partition and path which |
7 |
> theoretically can cover everything else, though it is rather inconvenient. |
8 |
|
9 |
The GRUB bootloader just parses its config file, which can be manually |
10 |
edited as you point out. You also have grub-mkconfig which outputs a |
11 |
config file for the bootloader to use, and it is typically used to |
12 |
scan /boot and find all the kernels/initramfs present and create menu |
13 |
items. |
14 |
|
15 |
grub-mkconfig just runs a bunch of shell scripts to generate |
16 |
everything, so you can have it autogenerate anything you want. It |
17 |
seems like a rough way to do it would be to just copy the regular |
18 |
linux once for each runlevel so that you end up with each kernel show |
19 |
up more than once, and then the individual runlevels can be tweaked |
20 |
accordingly. Obviously it would be more elegant to add a loop over a |
21 |
configuration variable. |
22 |
|
23 |
I'm not aware of anybody having actually done this, however, so you'd |
24 |
have to DIY. |
25 |
|
26 |
-- |
27 |
Rich |