Skip to content

games

๐Ÿ‘พ GRUB Invaders: Because Bootloaders Deserve to Have Fun Too

You know how you can make your bootloader sing a little tune?
Wellโ€ฆ what if instead of music, you could make it play Space Invaders?

Yes, thatโ€™s a real thing.
Itโ€™s called GRUB Invaders, and it runs before your operating system even wakes up.
Because who needs Linux when you can blast aliens straight from your BIOS screen? ๐Ÿš€


๐ŸŽถ From Tunes to Lasers

In a previous post โ€” โ€œResurrecting My Windows Partition After 4 Years ๐Ÿ–ฅ๏ธ๐ŸŽฎโ€ โ€”
I fell down a delightful rabbit hole while editing my GRUB configuration.
Thatโ€™s where I discovered GRUB_INIT_TUNE, spent hours turning my PC speaker into an 80s arcade machine, and learned far more about bootloader acoustics than anyone should. ๐Ÿ˜…

So naturally, the next logical step was obvious:
if GRUB can play music, surely it can play games too.
Enter: GRUB Invaders. ๐Ÿ‘พ๐Ÿ’ฅ


๐Ÿงฉ What the Heck Is GRUB Invaders?

grub-invaders is a multiboot-compliant kernel game โ€” basically, a program that GRUB can launch like itโ€™s an OS.
Except itโ€™s not Linux, not BSD, not anything remotely usefulโ€ฆ
itโ€™s a tiny Space Invaders clone that runs on bare metal.

To install it (on Ubuntu or Debian derivatives):

sudo apt install grub-invaders

Then, in GRUBโ€™s boot menu, itโ€™ll show up as GRUB Invaders.
Pick it, hit Enter, and bam! โ€” no kernel, no systemd, just pew-pew-pew.
Your CPU becomes a glorified arcade cabinet. ๐Ÿ•น๏ธ

Image: https://libregamewiki.org/GRUB_Invaders

๐Ÿ› ๏ธ How It Works

Under the hood, GRUB Invaders is a multiboot kernel image (yep, same format as Linux).
That means GRUB can load it into memory, set up registers, and jump straight into its entry point.

Thereโ€™s no OS, no drivers โ€” just BIOS interrupts, VGA mode, and a lot of clever 8-bit trickery.
Basically: the game runs in real mode, paints directly to video memory, and uses the keyboard interrupt for controls.
Itโ€™s a beautiful reminder that once upon a time, you could build a whole game in a few kilobytes.


๐Ÿงฎ Technical Nostalgia

Installed size?

Installed-Size: 30
Size: 8726 bytes

Yes, you read that right: under 9 KB.
Thatโ€™s less than one PNG icon on your desktop.
Yet itโ€™s fully playable โ€” proof that programmers in the โ€™80s had sorcery weโ€™ve since forgotten. ๐Ÿง™โ€โ™‚๏ธ

The package is ancient but still maintained enough to live in the Ubuntu repositories:

Homepage: http://www.erikyyy.de/invaders/
Maintainer: Debian Games Team
Enhances: grub2-common

So you can still apt install it in 2025, and it just works.


๐Ÿง  Why Bother?

Because you can.

Because sometimes itโ€™s nice to remember that your bootloader isnโ€™t just a boring chunk of C code parsing configs.
Itโ€™s a tiny virtual machine, capable of loading kernels, playing music, and โ€” if youโ€™re feeling chaotic โ€” defending the Earth from pixelated aliens before breakfast. โ˜•

Itโ€™s also a wonderful conversation starter at tech meetups:

โ€œOh, my GRUB doesnโ€™t just boot Linux. It plays Space Invaders. What does yours do?โ€


โš™๏ธ A Note on Shenanigans

Donโ€™t worry โ€” GRUB Invaders doesnโ€™t modify your boot process or mess with your partitions.
Itโ€™s launched manually, like any other GRUB entry.
When youโ€™re done, reboot, and youโ€™re back to your normal OS.
Totally safe. (Mostly. Unless you lose track of time blasting aliens.)


๐Ÿ TL;DR

  • grub-invaders lets you play Space Invaders in GRUB.
  • Itโ€™s under 9 KB, runs without an OS, and is somehow still in Ubuntu repos.
  • Totally useless. Totally delightful.
  • Perfect for when you want to flex your inner 8-bit gremlin.

Resurrecting My Windows Partition After 4 Years ๐Ÿ–ฅ๏ธ๐ŸŽฎ

Sometimes Linux life is bliss. I have my terminal, my editor, my tools, and Steam games that run natively. For nearly four years, I didnโ€™t touch Windows once โ€” and I didnโ€™t miss it.

And then Fortnite happened.

My girlfriend Enya and her wife Kyra got hooked, and naturally I wanted to join them. But Fortnite refuses to run on Linux โ€” apparently some copy-protection magic that digs into the Windows kernel, according to Reddit (so I don’t know if it’s true). Itโ€™s rare these days for a game to be Windows-only, but rare enough to shatter my Linux-only bubble. Suddenly, resurrecting Windows wasnโ€™t a chore anymore; it was a quest for polyamorous Battle Royale glory. ๐Ÿ•น๏ธ

My Windows 11 partition had been hibernating since November 2021, quietly gathering dust and updates in a forgotten corner of the disk. Why it stopped working back then? I honestly donโ€™t remember, but apparently I had blogged about it. I hadnโ€™t cared โ€” until now.


The Awakening โ€“ Peeking Into the UEFI Abyss ๐Ÿง

I started my journey with my usual tools: efibootmgr and update-grub on Ubuntu. I wanted to see what the firmware thought was bootable:

sudo efibootmgr

Output:

BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000
Boot0000* Windows Boot Manager ...
Boot0001* Ubuntu ...

At first glance, everything seemed fine. Ubuntu booted as usual. Windowsโ€ฆ did not. It didn’t even show up in the GRUB boot menu. A little disappointingโ€”but not unexpected, given that it hadnโ€™t been touched in years. ๐Ÿ˜ฌ

I knew the firmware knew about Windowsโ€”but the OS itself refused to wake up.


The Hidden Enemy โ€“ Why os-prober Was Disabled โš™๏ธ

I soon learned that recent Ubuntu versions disable os-prober by default. This is partly to speed up boot and partly to avoid probing unknown partitions automatically, which could theoretically be a security risk.

I re-enabled it in /etc/default/grub:

GRUB_DISABLE_OS_PROBER=false

Then ran:

sudo update-grub

Even after this tweak, Windows still didnโ€™t appear in the GRUB menu.


The Manual Attempt โ€“ GRUB to the Rescue โœ๏ธ

Determined, I added a manual GRUB entry in /etc/grub.d/40_custom:

menuentry "Windows" {
    insmod part_gpt
    insmod fat
    insmod chain
    search --no-floppy --fs-uuid --set=root 99C1-B96E
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

How I found the EFI partition UUID:

sudo blkid | grep EFI

Result: UUID="99C1-B96E"

Ran sudo update-grubโ€ฆ Windows showed up in GRUB! But clicking it? Nothing.

At this stage, Windows still wouldnโ€™t boot. The ghost remained untouchable.


The Missing File โ€“ Hunt for bootmgfw.efi ๐Ÿ—‚๏ธ

The culprit? bootmgfw.efi itself was gone. My chainloader had nothing to point to.

I mounted the NTFS Windows partition (at /home/amedee/windows) and searched for the missing EFI file:

sudo find /home/amedee/windows/ -type f -name "bootmgfw.efi"
/home/amedee/windows/Windows/Boot/EFI/bootmgfw.efi

The EFI file was hidden away, but thankfully intact. I copied it into the proper EFI directory:

sudo cp /home/amedee/windows/Windows/Boot/EFI/bootmgfw.efi /boot/efi/EFI/Microsoft/Boot/

After a final sudo update-grub, Windows appeared automatically in the GRUB menu. Finally, clicking the entry actually booted Windows. Victory! ๐Ÿฅณ


Four Years of Sleeping Giants ๐Ÿ•ฐ๏ธ

Booting Windows after four years was like opening a time capsule. I was greeted with thousands of updates, drivers, software installations, and of course, the installation of Fortnite itself. It took hours, but it was worth it. The old system came back to life.

Every โ€œupdate completeโ€ message was a heartbeat closer to joining Enya and Kyra in the Battle Royale.


The GRUB Disappearance โ€“ Enter Ventoy ๐Ÿ”ง

After celebrating Windows resurrection, I rebootedโ€ฆ and panic struck.

The GRUB menu had vanished. My system booted straight into Windows, leaving me without access to Linux. How could I escape?

I grabbed my trusty Ventoy USB stick (the same one I had used for performance tests months ago) and booted it in UEFI mode. Once in the live environment, I inspected the boot entries:

sudo efibootmgr -v

Output:

BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,0000,0001
Boot0000* Windows Boot Manager ...
Boot0001* Ubuntu ...
Boot0002* USB Ventoy ...

To restore Ubuntu to the top of the boot order:

sudo efibootmgr -o 0001,0000

Console output:

BootOrder changed from 0002,0000,0001 to 0001,0000

After rebooting, the GRUB menu reappeared, listing both Ubuntu and Windows. I could finally choose my OS again without further fiddling. ๐Ÿ’ช


A Word on Secure Boot and Signed Kernels ๐Ÿ”

Since weโ€™re talking bootloaders: Secure Boot only allows EFI binaries signed with a trusted key to execute. Ubuntu Desktop ships with signed kernels and a signed shim so it boots fine out of the box. If you build your own kernel or use unsigned modules, youโ€™ll either need to sign them yourself or disable Secure Boot in firmware.


Diagram of the Boot Flow ๐Ÿ–ผ๏ธ

Hereโ€™s a visual representation of the boot process after the fix:

flowchart TD
    UEFI["โš™๏ธ UEFI Firmware BootOrder:<br/>0001 (Ubuntu) โ†’<br/>0000 (Windows)<br/>(BootCurrent: 0001)"]

    subgraph UbuntuEFI["shimx64.efi"]
        GRUB["๐Ÿ“‚ GRUB menu"]
        LINUX["๐Ÿง Ubuntu Linux<br/>kernel + initrd"]
        CHAINLOAD["๐ŸชŸ Windows<br/>bootmgfw.efi"]
    end

    subgraph WindowsEFI["bootmgfw.efi"]
        WBM["๐ŸชŸย Windowsย Bootย Manager"]
        WINOS["๐Ÿ’ป Windows 11<br/>(C:)"]
    end

    UEFI --> UbuntuEFI
    GRUB -->|boots| LINUX
    GRUB -.->|chainloads| CHAINLOAD
    UEFI --> WindowsEFI
    WBM -->|boots| WINOS

From the GRUB menu, the Windows entry chainloads bootmgfw.efi, which then points to the Windows Boot Manager, finally booting Windows itself.


First Battle Royale ๐ŸŽฎโœจ

After all the technical drama and late-night troubleshooting, I finally joined Enya and Kyra in Fortnite.

I had never played Fortnite before, but my FPS experience (Borderlands hype, anyone?) and PUBG knowledge from Viva La Dirt League on YouTube gave me a fighting chance.

We won our first Battle Royale together! ๐Ÿ†๐Ÿ’ฅ The sense of triumph was surrealโ€”after resurrecting a four-year-old Windows partition, surviving driver hell, and finally joining the game, victory felt glorious.


TL;DR: Quick Repair Steps โšก

  1. Enable os-prober in /etc/default/grub.
  2. If Windows isnโ€™t detected, try a manual GRUB entry.
  3. If boot fails, copy bootmgfw.efi from the NTFS Windows partition to /boot/efi/EFI/Microsoft/Boot/.
  4. Run sudo update-grub.
  5. If GRUB disappears after booting Windows, boot a Live USB (UEFI mode) and adjust efibootmgr to set Ubuntu first.
  6. Reboot and enjoy both OSes. ๐ŸŽ‰

This little adventure taught me more about GRUB, UEFI, and EFI files than I ever wanted to know, but it was worth it. Most importantly, I got to join my polycule in a Fortnite victory and prove that even a four-year-old Windows partition can rise again! ๐Ÿ’–๐ŸŽฎ

LAN-party games

Artemis bridge simulator
Left 4 Dead
Payday
Guild Wars 2
Alien Swarm