double-minegrub-menu and the trick of chaining two GRUB menus
Why one minegrub when you can TWO
At a glance
- What is it?
- double-minegrub-menu is a small set of GRUB configuration files that makes a Linux bootloader show one themed menu and then, on selection, hand off to a second themed menu, which is how you get a Minecraft-style main menu followed by a Minecraft-style world selection screen. The interesting mechanism is a GRUB environment variable and a config file redirect, and the interesting constraint is that it only works on GRUB with the config_file variable, not on other bootloaders.
- Who is it for?
- double-minegrub-menu is a good fit for a Linux user who already uses a themed GRUB setup and wants the boot flow to look like the game rather than to add new boot capability, because the whole project is two configuration files and a grub.d script, and the enable and disable steps are a single grub-editenv call.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 3 days ago.
- What is it written in?
- Mainly Nix, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the project is trying to achieve
The description is a joke that is also the feature list: why one minegrub when you can TWO.
The idea is a boot sequence that mimics Minecraft. The first GRUB menu looks like the Minecraft main menu, and selecting a world from it leads to a second GRUB menu styled as the Minecraft world selection screen, and only then do you get to an actual operating system entry. The README describes it as a guide on how you can have two grub menus after one another, each in a different theme, and says it was made so the author could use a minegrub theme that looks like the Minecraft main menu to enter a second minegrub theme that looks like the Minecraft world selection menu, just like in the real game.
It is a cosmetic project, and the README does not pretend otherwise. The framing is that this is the real Minecraft experience when booting your system, followed by the flat admission that it is possible and it is fun.
What it depends on are two separate sibling projects by the same author, a Minecraft main menu theme and a Minecraft world selection menu theme, both linked in the header table alongside a note about using both together. The readme also points at other projects in the same family from other authors, a Minecraft SDDM theme, a Minecraft Plymouth theme and a Minecraft world loading KDE splash.
So the audience is a Linux desktop user with a themed bootloader who is doing this for the look, and who is comfortable editing /etc/default/grub and running grub-mkconfig. The project is MIT licensed, the primary language in the repository metadata is Nix, and the last push was on 2026-10-16. There is one tagged release, v1.0.0 from 2024-11-18, and the default branch is dev.
The two files that do the work
The repository is tiny, and the README says as much: clone this repo or download the files, it is only two.
They are mainmenu.cfg and 05_twomenus, and they play different roles in the handoff.
mainmenu.cfg is the configuration file for the first menu, the one that looks like the Minecraft main menu. It is copied into /boot/grub/ and it is the file that the config_file environment variable will eventually point at.
05_twomenus is the script that performs the handoff. It is a GRUB script, named with the numeric prefix that tells GRUB the order in which to execute the files in /etc/grub.d/, and it is copied into that directory and made executable.
The naming is conventional rather than arbitrary. Files in /etc/grub.d/ are processed in lexical order by the 30_x or 40_x scripts that grub-mkconfig generates, so a name beginning with 05_ is deliberately early in the sequence, and a name beginning with 05_ that contains a menu entry is deliberately late relative to a plain script. The prefix 05_ also makes the entry sort before the default 10_linux style scripts, which is what lets it take over the menu rather than sit below it.
The repository also holds a flake.nix with a flake.lock, a module_tester.nix, an install.sh, and a ventoy/ directory. The Nix files are not decoration: they are the basis of the NixOS installation path and of the virtual machine test setup described further on.
So the mechanism is: a GRUB script named 05_twomenus runs early, presents the main menu theme, and when you pick an entry it chains into the world selection configuration. The enabling is handled separately, by setting an environment variable rather than by editing the script, which is what makes the feature reversible without a rebuild.
The enable and disable mechanism
The switching is done with GRUB's own environment block, using the grub-editenv tool, and the variable is called config_file.
To enable it:
sudo grub-editenv - set config_file=mainmenu.cfgTo switch it back off:
sudo grub-editenv - unset config_fileThat is the whole toggle, and the choice of mechanism is what makes the project safe to try. grub-editenv writes into the grubenv block, the small area of the disk that GRUB reads before it loads its configuration. Setting config_file tells GRUB to load mainmenu.cfg instead of its normal grub.cfg, and unsetting it restores the default behaviour without touching any file on disk.
Because the toggle is a variable rather than a config file edit, you can flip it back from a rescue shell or a live USB if the first menu turns out to be unbootable. That is a meaningful property when the thing you are changing is the bootloader, and it is the reason the readme frames the disable step as a single command rather than a set of instructions to undo.
One wrinkle is that the value is the bare filename mainmenu.cfg, so GRUB resolves it relative to the directory it reads configuration from. That is why the file is copied into /boot/grub/ rather than into /etc/default/grub/ alongside the theme settings, and it is why the copy step is a separate instruction in the manual installation rather than being folded into the theme configuration.
After setting the variable, the bootloader still has to be told to regenerate its menu, which is the grub-mkconfig step described next. The order matters: the files are copied, grub.cfg is regenerated so that the new script is included, and only then is the variable set to point at the new configuration.
Manual installation, step by step
The readme gives a full manual route, and it is worth following in order because several of the steps depend on the previous ones.
First you install the two themes. The example clones the world selection theme and copies it into /boot/grub/themes/, then clones the main menu theme and does the same:
git clone https://github.com/Lxtharia/minegrub-world-sel-theme.git && cd minegrub-world-sel-theme
sudo cp -ruv minegrub-world-selection /boot/grub/themes/The readme then points at the two theme repositories for their own instructions, so the theme installation itself is documented in those projects rather than here.
Next you set the world-selection theme in /etc/default/grub, along with the other settings GRUB expects:
GRUB_TIMEOUT_STYLE=menu
...
GRUB_THEME=/boot/grub/themes/minegrub-world-selection/theme.txt
...
GRUB_GFXMODE=...Note what this does and does not do. It makes the world selection screen the normal menu, because the configuration file generated by grub-mkconfig will contain it. The double-menu behaviour is layered on top of that, not instead of it.
Then you copy this project's two files into place and make the script executable:
sudo cp ./mainmenu.cfg /boot/grub/
sudo cp ./05_twomenus /etc/grub.d/
chmod +x /etc/grub.d/05_twomenusAnd then you regenerate the configuration so that the new script is included:
sudo grub-mkconfig -o /boot/grub/grub.cfgAnd finally you set the environment variable to enable it, as described above. The readme closes the manual section with a Done, and the disable command for when you have had enough.
The whole manual route touches three places: /boot/grub/themes/, /etc/default/grub and /etc/grub.d/, plus the grubenv block. All of the first three are under /boot or /etc, so this is root-level surgery on the boot path, and there is no uninstall script in the manual route.
The automatic installer and the Gentoo and NixOS paths
The readme offers two methods, automatic and manual, plus distribution-specific sections for Gentoo and NixOS.
The automatic method is described in one line: clone this project and run the bash script, and everything is done, because the installation script will prepare everything well for you.
sudo ./install.shNote the sudo. The script writes to /boot and /etc, so it needs root, and the manual route shows exactly what those writes are. Reading install.sh before running it is the sensible move, since the script's own permissions are the point.
The Gentoo route is a portage overlay rather than a script. You add the overlay with eselect repository enable tomoshibi-overlay and emaint sync -r tomoshibi-overlay, then choose a theme for minegrub-theme, where there are 13 themes available via theme0 through theme12 USE flags, exactly one of which must be enabled. The flag list is written to /etc/portage/package.use/50-minegrub-theme, and the package is then emerged with sys-boot/double-minegrub-menu::tomoshibi-overlay.
The removal path for Gentoo is emerge -c, which cleans the package, followed by unsetting the config_file variable, and the readme finishes by asking you to edit /etc/default/grub properly.
The NixOS route is the most declarative of the three and the one that fits the repository's primary language. The flake is added as an input pointing at github:Lxtharia/double-minegrub-menu/main, with the nixpkgs follow flag, and the module is included in the module list of a nixosSystem alongside your own configuration.nix. The options block then sets double-minegrub-menu.enable, the main menu background image, a splash_text string, the world selection background resolution and a list of custom world icons, each with a name, two lines of text and an icon that can come from a remote repository or a local file.
The NixOS path differs in one important way from the manual one: the environment variable is set through a nix-shell invocation rather than directly.
nix-shell -p grub2 --command "sudo grub-editenv - set config_file=mainmenu.cfg"Because the grub2 package has to be in scope for grub-editenv to exist, the command is wrapped in nix-shell with grub2 as the package.
There is also a testing route, which is the part that makes the NixOS path practical. You can build a virtual machine with the bootloader using nixos-rebuild build-vm-with-bootloader against a test module and then run the result, so you can see the double menu without touching the machine you actually use. The module_tester.nix file in the repository root is what makes that possible.
Editorial conclusion
double-minegrub-menu is a good fit for a Linux user who already uses a themed GRUB setup and wants the boot flow to look like the game rather than to add new boot capability, because the whole project is two configuration files and a grub.d script, and the enable and disable steps are a single grub-editenv call. It is a poor fit if you are on a distribution that no longer uses GRUB, since the mechanism depends on the GRUB environment block and the config_file variable, and a poor fit if you are on a filesystem that GRUB cannot read, since the second menu has to be loaded from disk after the first. Before installing, check that /boot/grub/themes/ is where your GRUB themes live and that grub-mkconfig exists on your system, and note that the automatic installer script needs root and writes to /boot, so the manual route is the better one to read first.
Frequently asked questions
What does double-minegrub-menu do?
It makes GRUB show two menus in a row, each in a different theme, so a Minecraft-style main menu hands off to a Minecraft-style world selection screen. The project is by the author of the minegrub-theme and minegrub-world-sel-theme projects and depends on both being installed.
How do I enable and disable the double GRUB menu?
Enable it with `sudo grub-editenv - set config_file=mainmenu.cfg` and disable it with `sudo grub-editenv - unset config_file`. The setting lives in the GRUB environment block, so switching back does not require rebuilding the configuration or restoring files.
Which files does double-minegrub-menu install?
Two: mainmenu.cfg, copied into /boot/grub/, and the 05_twomenus GRUB script, copied into /etc/grub.d/ and made executable. The 05_ prefix puts it early in the order GRUB processes those scripts.
How do I install double-minegrub-menu on NixOS?
Add the flake as an input, include inputs.double-minegrub-menu.nixosModules.default in your module list, set the double-minegrub-menu options in your configuration.nix, rebuild the system, and then set the environment variable with `nix-shell -p grub2 --command "sudo grub-editenv - set config_file=mainmenu.cfg"`.
Can I test the double GRUB menu before applying it?
On NixOS, yes. The readme describes building a virtual machine with the bootloader using nixos-rebuild build-vm-with-bootloader against a test module and running the result, using the module_tester.nix file in the repository.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/lxtharia-double-minegrub-menu)Was this useful?