Generate a fake grub.cfg
with minimal content to be picked up by a real GRUB's
osprober
. Useful for passing kernel arguments to the OS in a multiboot
environment when the real system GRUB is managed by other OS, and installing
GRUB just to manage the configs is undesirable.
- bash
- cat
- xargs
- perl
Currently only source installation method is available.
More install options are planned in the future.
-
Clone the repo.
-
Set system-wide fakegrub settings.
$ bin/fakegrub-default-settings | sudo tee /etc/fakegrub $ sudo edit /etc/fakegrub
To update grub.cfg
using the system-wide fakegrub settings, use this:
Warning: this command will try to write to
/boot/grub/grub.cfg
by default. Although it has a built-in safety-check to prevent overwriting the configuration when it's not generated by fakegrub, be careful when using it on a live system. It's a good idea to backup/boot/grub/grub.cfg
before running the command below if you're not yet comfortable with fakegrub.
$ sudo bin/update-fakegrub
To just print the GRUB config generated with system fakegrub settings use
fakegrub-mkconfig
(similar to grub-mkconfig
, but doesn't require root):
$ bin/fakegrub-mkconfig
You can also invoke config generator directly passing custom settings:
$ bin/fakegrub-generate "My menuentry" "root=/dev/vg/lvroot"