diff --git a/README.md b/README.md index dcd6640..8481077 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# GLIM +# MultiOS-USB-Configs -GLIM with minegrub theme and windows, truenas support \ No newline at end of file +Themes and other configs for https://github.com/Mexit/MultiOS-USB diff --git a/config/grub.config.minegrub b/config/grub.config.minegrub new file mode 100755 index 0000000..399fe83 --- /dev/null +++ b/config/grub.config.minegrub @@ -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 } diff --git a/themes/minegrub/LICENSE b/themes/minegrub/LICENSE new file mode 100755 index 0000000..2c730c3 --- /dev/null +++ b/themes/minegrub/LICENSE @@ -0,0 +1,23 @@ +MIT License + +Copyright (c) 2022 Lxtharia + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +https://github.com/Lxtharia/minegrub-theme diff --git a/themes/minegrub/Minecraft24.pf2 b/themes/minegrub/Minecraft24.pf2 new file mode 100755 index 0000000..869b4d3 Binary files /dev/null and b/themes/minegrub/Minecraft24.pf2 differ diff --git a/themes/minegrub/Minecraft30.pf2 b/themes/minegrub/Minecraft30.pf2 new file mode 100755 index 0000000..fe6e2bc Binary files /dev/null and b/themes/minegrub/Minecraft30.pf2 differ diff --git a/themes/minegrub/Monocraft22.pf2 b/themes/minegrub/Monocraft22.pf2 new file mode 100755 index 0000000..be68248 Binary files /dev/null and b/themes/minegrub/Monocraft22.pf2 differ diff --git a/themes/minegrub/background.png b/themes/minegrub/background.png new file mode 100755 index 0000000..8e0f0a3 Binary files /dev/null and b/themes/minegrub/background.png differ diff --git a/themes/minegrub/dirt.png b/themes/minegrub/dirt.png new file mode 100755 index 0000000..6e04f98 Binary files /dev/null and b/themes/minegrub/dirt.png differ diff --git a/themes/minegrub/item_c.png b/themes/minegrub/item_c.png new file mode 100755 index 0000000..b8a9993 Binary files /dev/null and b/themes/minegrub/item_c.png differ diff --git a/themes/minegrub/item_e.png b/themes/minegrub/item_e.png new file mode 100755 index 0000000..d9742eb Binary files /dev/null and b/themes/minegrub/item_e.png differ diff --git a/themes/minegrub/item_n.png b/themes/minegrub/item_n.png new file mode 100755 index 0000000..a50707d Binary files /dev/null and b/themes/minegrub/item_n.png differ diff --git a/themes/minegrub/item_ne.png b/themes/minegrub/item_ne.png new file mode 100755 index 0000000..b863a39 Binary files /dev/null and b/themes/minegrub/item_ne.png differ diff --git a/themes/minegrub/item_nw.png b/themes/minegrub/item_nw.png new file mode 100755 index 0000000..447efb7 Binary files /dev/null and b/themes/minegrub/item_nw.png differ diff --git a/themes/minegrub/item_s.png b/themes/minegrub/item_s.png new file mode 100755 index 0000000..32de032 Binary files /dev/null and b/themes/minegrub/item_s.png differ diff --git a/themes/minegrub/item_se.png b/themes/minegrub/item_se.png new file mode 100755 index 0000000..e00df24 Binary files /dev/null and b/themes/minegrub/item_se.png differ diff --git a/themes/minegrub/item_sw.png b/themes/minegrub/item_sw.png new file mode 100755 index 0000000..3b61033 Binary files /dev/null and b/themes/minegrub/item_sw.png differ diff --git a/themes/minegrub/item_w.png b/themes/minegrub/item_w.png new file mode 100755 index 0000000..5a447fd Binary files /dev/null and b/themes/minegrub/item_w.png differ diff --git a/themes/minegrub/logo.png b/themes/minegrub/logo.png new file mode 100755 index 0000000..b560300 Binary files /dev/null and b/themes/minegrub/logo.png differ diff --git a/themes/minegrub/selected_item_c.png b/themes/minegrub/selected_item_c.png new file mode 100755 index 0000000..612d8b1 Binary files /dev/null and b/themes/minegrub/selected_item_c.png differ diff --git a/themes/minegrub/selected_item_e.png b/themes/minegrub/selected_item_e.png new file mode 100755 index 0000000..ae202e4 Binary files /dev/null and b/themes/minegrub/selected_item_e.png differ diff --git a/themes/minegrub/selected_item_n.png b/themes/minegrub/selected_item_n.png new file mode 100755 index 0000000..6700703 Binary files /dev/null and b/themes/minegrub/selected_item_n.png differ diff --git a/themes/minegrub/selected_item_ne.png b/themes/minegrub/selected_item_ne.png new file mode 100755 index 0000000..18e0db3 Binary files /dev/null and b/themes/minegrub/selected_item_ne.png differ diff --git a/themes/minegrub/selected_item_nw.png b/themes/minegrub/selected_item_nw.png new file mode 100755 index 0000000..bbe69f8 Binary files /dev/null and b/themes/minegrub/selected_item_nw.png differ diff --git a/themes/minegrub/selected_item_s.png b/themes/minegrub/selected_item_s.png new file mode 100755 index 0000000..30c00df Binary files /dev/null and b/themes/minegrub/selected_item_s.png differ diff --git a/themes/minegrub/selected_item_se.png b/themes/minegrub/selected_item_se.png new file mode 100755 index 0000000..6a2a3c3 Binary files /dev/null and b/themes/minegrub/selected_item_se.png differ diff --git a/themes/minegrub/selected_item_sw.png b/themes/minegrub/selected_item_sw.png new file mode 100755 index 0000000..2fd4d11 Binary files /dev/null and b/themes/minegrub/selected_item_sw.png differ diff --git a/themes/minegrub/selected_item_w.png b/themes/minegrub/selected_item_w.png new file mode 100755 index 0000000..2973406 Binary files /dev/null and b/themes/minegrub/selected_item_w.png differ diff --git a/themes/minegrub/static_bar.png b/themes/minegrub/static_bar.png new file mode 100755 index 0000000..7baa25e Binary files /dev/null and b/themes/minegrub/static_bar.png differ diff --git a/themes/minegrub/term_e.png b/themes/minegrub/term_e.png new file mode 100755 index 0000000..e8f822b Binary files /dev/null and b/themes/minegrub/term_e.png differ diff --git a/themes/minegrub/term_n.png b/themes/minegrub/term_n.png new file mode 100755 index 0000000..2cf9905 Binary files /dev/null and b/themes/minegrub/term_n.png differ diff --git a/themes/minegrub/term_ne.png b/themes/minegrub/term_ne.png new file mode 100755 index 0000000..d31d210 Binary files /dev/null and b/themes/minegrub/term_ne.png differ diff --git a/themes/minegrub/term_nw.png b/themes/minegrub/term_nw.png new file mode 100755 index 0000000..0237a18 Binary files /dev/null and b/themes/minegrub/term_nw.png differ diff --git a/themes/minegrub/term_s.png b/themes/minegrub/term_s.png new file mode 100755 index 0000000..bc004e4 Binary files /dev/null and b/themes/minegrub/term_s.png differ diff --git a/themes/minegrub/term_se.png b/themes/minegrub/term_se.png new file mode 100755 index 0000000..4445547 Binary files /dev/null and b/themes/minegrub/term_se.png differ diff --git a/themes/minegrub/term_sw.png b/themes/minegrub/term_sw.png new file mode 100755 index 0000000..986f1ca Binary files /dev/null and b/themes/minegrub/term_sw.png differ diff --git a/themes/minegrub/term_w.png b/themes/minegrub/term_w.png new file mode 100755 index 0000000..9f48977 Binary files /dev/null and b/themes/minegrub/term_w.png differ diff --git a/themes/minegrub/theme.txt b/themes/minegrub/theme.txt new file mode 100755 index 0000000..44b8973 --- /dev/null +++ b/themes/minegrub/theme.txt @@ -0,0 +1,123 @@ +# Global + +title-text: "" +desktop-image: "background.png" + +# Terminal for Console and Options +terminal-border: "20" +terminal-left: "10%" +terminal-top: "10%+23" +terminal-width: "80%" +terminal-height: "80%" +terminal-box: "term_*.png" +terminal-font: "Monocraft Regular 22" + +# Text White ++ boot_menu { + # as we don't have any pixmaps here, it gets aligned strangely + # top pixmap is 17px in height + # left pixmap is 6px in width + # the text needs to be 3 pixels above and 3 pixels to the left + left = 50%-297 + top = 30%+14 + width = 600 + height = 70%-94 + + item_font = "Minecraft Regular 30" + item_color = "#ffffff" + selected_item_color = "#ffffa0" + item_height = 34 + item_padding = 0 + item_spacing = 38 + scrollbar = false +} + + ++ boot_menu { + left = 50%-300 + top = 30% + width = 600 + height = 70%-94 + + item_font = "Minecraft Regular 30" + item_color = "#383838" + selected_item_color = "#3f3f28" + item_height = 34 + item_padding = 0 + item_spacing = 38 + item_pixmap_style = "item_*.png" + selected_item_pixmap_style = "selected_item_*.png" + scrollbar = false +} + + + ++ image { + # width of the static bottom bar image is 744 + left = 50%-372 + top = 100%-70 + file = "static_bar.png" +} + ++ image { + # width of the logo image is 1200, but the center of the logo is at x=400 + left = 50%-400 + top = 0 + file = "logo.png" +} + +# TEXT ++ label { + left = 6 + top = 100%-31 + height = 54 + width = 200 + + text = "Minegrub 2.0.0" + font = "Minecraft Regular 30" + color = "white" +} + +# SHADOW ++ label { + left = 9 + top = 100%-28 + height = 54 + width = 200 + + text = "Minegrub 2.0.0" + font = "Minecraft Regular 30" + color = "#3f3f3f" +} + +# TEXT ++ label { + id = "__timeout__" + + left = 50% + top = 100%-31 + height = 24 + width = 50%-6 + + text = "Joining world in %d seconds" + align = "right" + font = "Minecraft Regular 30" + color = "white" +} + +# SHADOW ++ label { + id = "__timeout__" + + left = 50%+3 + top = 100%-28 + height = 24 + width = 50%-6 + + text = "Joining world in %d seconds" + align = "right" + font = "Minecraft Regular 30" + color = "#3f3f3f" +} + +