feat: added minegrub theme

This commit is contained in:
2026-08-03 21:23:38 +02:00
parent 242c4b7566
commit a6e8f4f727
37 changed files with 464 additions and 2 deletions
+316
View File
@@ -0,0 +1,316 @@
# MultiOS-USB main config file
# https://gitlab.com/MultiOS-USB
# https://github.com/Mexit/MultiOS-USB
# Load modules
insmod fat
insmod exfat
insmod ntfs
insmod udf
insmod part_msdos
insmod part_gpt
insmod regexp
insmod font
if [ "${grub_platform}" == "efi" ]; then
# Unload modules
rmmod tpm
wimboot_kernel=linux
wimboot_initrd=initrd
else
wimboot_kernel=linux16
wimboot_initrd=initrd16
fi
export wimboot_kernel wimboot_initrd
regexp -s dev '^(.*),' "$root"
probe --fs-uuid $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
set pager=1
set iso_dir="/ISOs"
# set theme_path="/MultiOS-USB/themes/MultiOS-USB/theme.txt"
export dev rootuuid imgdevpath iso_dir
# if [ -e "$theme_path" ]; then
# set theme="$theme_path"
# export theme
# fi
#
# if loadfont unicode; then
# if [ "${grub_platform}" == "efi" ]; then
# insmod efi_gop
# else
# insmod vbe
# insmod vga
# fi
#
# set gfxmode="1920x1080;1600x1200;1600x1050;1600x900;1440x900;1366x768;1280x1024;1280x800;1280x720;1024x768;auto"
# set gfxpayload=keep
#
# insmod all_video
# insmod gfxterm
# insmod gfxmenu
# insmod png
# export gfxmode gfxpayload
# terminal_output gfxterm
# fi
## MingeGrub Theme - Start
loadfont /MultiOS-USB/themes/minegrub/Minecraft24.pf2
loadfont /MultiOS-USB/themes/minegrub/Minecraft30.pf2
loadfont /MultiOS-USB/themes/minegrub/Monocraft22.pf2
set theme="/MultiOS-USB/themes/minegrub/theme.txt"
export theme
if [ "${grub_platform}" == "efi" ]; then
insmod efi_gop
else
insmod vbe
insmod vga
fi
set gfxmode="1920x1080;1600x1200;1600x1050;1600x900;1440x900;1366x768;1280x1024;1280x800;1280x720;1024x768;auto"
set gfxpayload=keep
insmod all_video
insmod gfxterm
insmod gfxmenu
insmod png
export gfxmode gfxpayload
terminal_output gfxterm
## MingeGrub Theme END
function find_grub_cfg {
submenu "Detect GRUB config file (grub.cfg) -->" {
grubcfg_found=false
insmod ext2
insmod xfs
insmod zfs
insmod btrfs
insmod jfs
insmod reiserfs
for grubcfg in (*,*)/boot/grub*/grub.cfg (lvm\/*)/boot/grub*/grub.cfg; do
regexp --set=1:grubcfg_device '^\((.*)\)/' "${grubcfg}"
if [ -f "${grubcfg}" ]; then
grubcfg_found=true
menuentry --class=linux "Boot Linux from: ${grubcfg}" "${grubcfg}" "${grubcfg_device}" {
root="(${3})"
configfile "${2}"
}
fi
done
if [ "${grubcfg_found}" != true ]; then
menuentry "GRUB configuration files (grub.cfg) not found..." { false }
fi
}
}
function LOOPBACK {
if [ -e (loop) ]; then
loopback --delete loop
fi
loopback loop "$1"
}
submenu "Auto-detect ISOs/WIMs (Directory: $iso_dir) -->" {
echo -n "Loading configuration files... "
for cfgfile in /MultiOS-USB/config/*/*.cfg /MultiOS-USB/config_priv/*/*.cfg; do
source "$cfgfile"
done
}
if [ "${grub_platform}" == "pc" ]; then
submenu "Tools -->" {
submenu "Detect Windows Boot Manager -->" {
bootmgr_found=false
for bootmgr in (*,*)/bootmgr; do
regexp --set=1:bootmgr_device '^\((.*)\)/' "${bootmgr}"
if [ -f "${bootmgr}" ]; then
bootmgr_found=true
insmod ntldr
menuentry --class=windows "Windows Boot Manager on (${bootmgr_device})" "${bootmgr_device}" {
root="(${2})"
ntldr "(${2})/bootmgr"
}
fi
done
if [ "${bootmgr_found}" != true ]; then
menuentry "Windows Boot Manager not found." { false }
fi
}
# Menu: boot from GRUB config file
find_grub_cfg
file="/MultiOS-USB/tools/mt86plus_*/mt86p_*_x86_64"
if [ -f ${file} ]; then
menuentry "Memtest86+" {
linux16 ${file}
}
fi
menuentry "Boot from 1st Hard Disk" {
set root=(hd1)
chainloader +1
}
menuentry "Boot from 2nd Hard Disk" {
set root=(hd2)
chainloader +1
}
menuentry "Boot from 3rd Hard Disk" {
set root=(hd3)
chainloader +1
}
}
fi
if [ "${grub_platform}" == "efi" ]; then
submenu "EFI Tools -->" {
menuentry "Reboot to UEFI Firmware Setup" {
fwsetup
}
if [ -f ($dev,1)/efi/boot/mmx64.efi ]; then
menuentry --class=efi "Add UEFI key or hash" {
chainloader ($dev,1)/efi/boot/mmx64.efi
}
fi
if [ -f /MultiOS-USB/tools/efitools-*/KeyTool.efi ]; then
menuentry --class=efi "Manage UEFI keys and hashes" {
chainloader /MultiOS-USB/tools/efitools-*/KeyTool.efi
}
fi
submenu "Detect EFI bootloaders -->" {
efi_found=false
for efi in (*,*)/efi/*/*/*.efi (*,*)/efi/*/*.efi (*,*)/efi/*.efi; do
regexp --set=1:efi_device '^\((.*)\)/' "${efi}"
if [ -f "${efi}" ]; then
efi_found=true
if [ ${efi} == (${efi_device})/efi/Microsoft/Boot/bootmgfw.efi ]; then
menuentry --class=efi "Windows Boot Manager on (${efi_device})" "${efi_device}" {
root="(${2})"
chainloader "(${2})/efi/Microsoft/Boot/bootmgfw.efi"
}
else
menuentry --class=efi "${efi}" "${efi_device}" {
root="(${2})"
chainloader "${1}"
}
fi
fi
done
if [ "${efi_found}" != true ]; then
menuentry "No EFI files detected." { false }
fi
}
# Menu: boot from GRUB config file
find_grub_cfg
file="/MultiOS-USB/tools/mt86plus_*/mt86p_*_x86_64"
if [ -f ${file} ]; then
menuentry --class=efi "Memtest86+ EFI" {
chainloader ${file}
}
fi
}
submenu "EFI User Tools -->" {
set found=0
for efifile in /MultiOS-USB/tools/*.efi; do
if [ -f "$efifile" ]; then
set found=1
regexp --set=efiname "/MultiOS-USB/tools/(.*)" "$efifile"
menuentry --class=efi "$efiname" "$efifile" {
chainloader "${2}"
}
fi
done
if [ "$found" = "0" ]; then
menuentry "(!) No .efi files found — place them in /MultiOS-USB/tools/" --class=warning {
echo "No EFI files found in /MultiOS-USB/tools/"
echo "Copy your .efi files to that folder and reboot."
sleep 5
}
fi
}
submenu "Network bootable OS installers (DHCP) -->" {
if net_bootp; then
source /MultiOS-USB/config/grub_netboot/main.cfgnet
else
echo -e "\n\nIf your network card is not detected,"
echo -e "check the BIOS/UEFI settings to see"
echo -e "if PXE/network card booting is enabled.\n"
fi
}
fi
submenu "GRUB2 options -->" {
menuentry "Set terminal output to console" {
terminal_output console
}
menuentry "Set terminal output to gfxterm" {
terminal_output gfxterm
}
menuentry "List devices/partitions" {
ls -l
sleep --interruptible 9999
}
menuentry "Enable GRUB2's LVM support" {
insmod lvm
}
menuentry "Enable GRUB2's RAID support" {
insmod dm_nv
insmod mdraid09_be
insmod mdraid09
insmod mdraid1x
insmod raid5rec
insmod raid6rec
}
menuentry "Enable GRUB2's PATA support (to work around BIOS bugs/limitations)" {
insmod ata
update_paths
}
menuentry "Enable GRUB2's USB support *experimental*" {
insmod ohci
insmod uhci
insmod usbms
update_paths
}
menuentry "Mount encrypted volumes (LUKS and geli)" {
insmod luks
insmod luks2
insmod geli
cryptomount -a
}
menuentry "Enable serial terminal" {
serial
terminal_input --append serial
terminal_output --append serial
}
}
menuentry "Reboot (r)" --hotkey=r --class reboot { reboot }
menuentry "Power Off (p)" --hotkey=p --class shutdown { halt }