Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rEFInd Multi-Boot Configuration & Backup Sync

A clean, high-performance, and automated rEFInd boot menu setup on an HP laptop. Designed to seamlessly manage dual internal NVMe drives (Linux Mint via EFI kernel stub and internal Windows 11) along with a dynamic external Windows To Go (WTG) SSD with custom icon branding.


1. System Architecture & Drive Layout

Device / Disk Partition Filesystem Role / OS Boot Target
nvme1n1 (Primary NVMe) /dev/nvme1n1p1 FAT32 System ESP (/boot/efi) rEFInd, Linux Kernel, Windows EFI Copy
nvme1n1 (Primary NVMe) /dev/nvme1n1p2 ext4 Linux Mint Root (/) Direct Kernel Stub (vmlinuz)
nvme0n1 (Secondary NVMe) /dev/nvme0n1 NTFS Internal Windows 11 Booted via nvme1n1p1 BCD loader
sda (External SSD) /dev/sda1 FAT32 External ESP (WTG-EFI) Windows To Go Loader (bootmgfw.efi / bootx64.efi)
sda (External SSD) /dev/sda3 NTFS Windows To Go OS (Win11ToGo) Target Windows Operating System Volume

2. Key Features & Logic

  • Direct Kernel Stub Booting: Linux Mint boots directly via rEFInd’s ext4_x64.efi driver reading /boot/vmlinuz-* directly from the ext4 root partition, bypassing GRUB entirely for maximum speed.
  • Plug-and-Play Windows To Go: The external Windows To Go drive auto-discovers with a custom os_win11_togo.png icon only when plugged in. When unplugged, it disappears automatically without leaving ghost/phantom entries.
  • Filtered UI: Hardware diagnostic utilities (EFI/HP), fallback bootloaders (/EFI/BOOT), duplicate GRUB binaries (grubx64.efi), and MOK tools (shimx64.efi, mmx64.efi) are blacklisted.
  • Non-Volatile Settings: Configured with use_nvram false to store variable data directly on disk and protect motherboard NVRAM from excessive write wear.

3. Repository Structure

refind-config/
├── config/
│   └── refind.conf             # Primary rEFInd configuration file
├── themes/
│   └── ursamajor-rEFInd/       # Custom rEFInd theme and icon assets
│       └── icons/
│           └── os_win11_togo.png # Custom icon used for Windows To Go
├── update.sh                   # Backup automation script
├── .gitignore                  # Excludes binary drivers and system certs
└── README.md                   # System documentation


4. refind.conf Highlights

Key directives applied in config/refind.conf:

# Enable pure auto-discovery
scanfor internal,external

# UI & Interaction
enable_mouse
mouse_size 36
mouse_speed 6
big_icon_size 256
use_nvram false
extra_kernel_options mem_sleep_default=deep

# Blacklisted Directories (HP bloat, fallback boots)
dont_scan_dirs /EFI/BOOT,/EFI/old,EFI/HP

# Blacklisted Executables (Hides GRUB, MOK tools, and fallback EFI binaries)
# NOTE: bootmgfw.efi MUST NOT be blacklisted here!
dont_scan_files shimx64.efi, grubx64.efi, mmx64.efi, fbx64.efi, memtest.efi, SecureBootRecovery.efi

# Active Theme
include themes/ursamajor-rEFInd/theme.conf


5. Dynamic Icon Mapping for External SSD

To make rEFInd render the custom os_win11_togo.png icon on auto-discovery without using rigid menuentry blocks, the icon file is placed directly on the external drive's EFI partition (/dev/sda1). rEFInd matches same-directory .png images to .efi loaders automatically:

/mnt/usb-efi/EFI/BOOT/bootx64.png
/mnt/usb-efi/EFI/BOOT/boot.png
/mnt/usb-efi/EFI/Microsoft/Boot/bootmgfw.png

6. Maintenance & Automated Synchronization

This repository includes an update.sh script that automatically copies active configuration and theme files from /boot/efi, fixes permissions, and commits/pushes changes to GitHub.

Syncing Local EFI Changes to GitHub

Whenever you make changes to /boot/efi/EFI/refind/refind.conf, run:

./update.sh

Script Behavior (update.sh):

  1. Reads /boot/efi/EFI/refind/refind.conf using sudo.
  2. Syncs themes/ursamajor-rEFInd/ using rsync.
  3. Resets file ownership to your local user account (chown).
  4. Checks git status for changes and commits/pushes to main if updates are detected.

About

A clean, high-performance, and automated rEFInd boot menu setup on an HP laptop. Designed to seamlessly manage dual internal NVMe drives (Linux Mint via EFI kernel stub and internal Windows 11) along with a dynamic external Windows To Go (WTG) SSD with custom icon branding.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages