An open API service indexing awesome lists of open source software.

https://github.com/mozgiii/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.
https://github.com/mozgiii/fakegrub

grub multiboot

Last synced: over 1 year ago
JSON representation

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.

Awesome Lists containing this project

README

          

# 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.

```shell
$ 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.

```shell
$ 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):

```shell
$ bin/fakegrub-mkconfig
```

You can also invoke config generator directly passing custom settings:

```shell
$ bin/fakegrub-generate "My menuentry" "root=/dev/vg/lvroot"
```