Skip to content

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.

Notifications You must be signed in to change notification settings

MOZGIII/fakegrub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

fakegrub

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.

Requirements

  • bash
  • cat
  • xargs
  • perl

Installation

Currently only source installation method is available.

More install options are planned in the future.

From source

  1. Clone the repo.

  2. Set system-wide fakegrub settings.

    $ bin/fakegrub-default-settings | sudo tee /etc/fakegrub
    $ sudo edit /etc/fakegrub

Usage

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"

About

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.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages