From 83e1910281f93d442af8f6aab3e95a2f4df2874c Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Sun, 8 Mar 2026 20:35:23 +0300 Subject: [PATCH] feat: custom grub bootloader - bee branding, 5s auto-boot, no splash --- .../config/bootloaders/grub-pc/config.cfg | 27 ++++++++++ .../config/bootloaders/grub-pc/grub.cfg | 17 +++++++ .../bootloaders/grub-pc/live-theme/theme.txt | 50 +++++++++++++++++++ .../config/bootloaders/grub-pc/theme.cfg | 9 ++++ 4 files changed, 103 insertions(+) create mode 100644 iso/builder/config/bootloaders/grub-pc/config.cfg create mode 100644 iso/builder/config/bootloaders/grub-pc/grub.cfg create mode 100644 iso/builder/config/bootloaders/grub-pc/live-theme/theme.txt create mode 100644 iso/builder/config/bootloaders/grub-pc/theme.cfg diff --git a/iso/builder/config/bootloaders/grub-pc/config.cfg b/iso/builder/config/bootloaders/grub-pc/config.cfg new file mode 100644 index 0000000..3a69075 --- /dev/null +++ b/iso/builder/config/bootloaders/grub-pc/config.cfg @@ -0,0 +1,27 @@ +set default=0 +set timeout=5 + +if [ x$feature_default_font_path = xy ] ; then + font=unicode +else + font=$prefix/unicode.pf2 +fi + +if loadfont $font ; then + set gfxmode=800x600 + set gfxpayload=keep + insmod efi_gop + insmod efi_uga + insmod video_bochs + insmod video_cirrus +else + set gfxmode=auto + insmod all_video +fi + +insmod gfxterm +insmod png + +source /boot/grub/theme.cfg + +terminal_output gfxterm diff --git a/iso/builder/config/bootloaders/grub-pc/grub.cfg b/iso/builder/config/bootloaders/grub-pc/grub.cfg new file mode 100644 index 0000000..d79580b --- /dev/null +++ b/iso/builder/config/bootloaders/grub-pc/grub.cfg @@ -0,0 +1,17 @@ +source /boot/grub/config.cfg + +menuentry "Bee Hardware Audit" { + linux @KERNEL_LIVE@ @APPEND_LIVE@ + initrd @INITRD_LIVE@ +} + +menuentry "Bee Hardware Audit (fail-safe)" { + linux @KERNEL_LIVE@ @APPEND_LIVE@ memtest noapic noapm nodma nomce nolapic nosmp vga=normal + initrd @INITRD_LIVE@ +} + +if [ "${grub_platform}" = "efi" ]; then + menuentry "UEFI Firmware Settings" { + fwsetup + } +fi diff --git a/iso/builder/config/bootloaders/grub-pc/live-theme/theme.txt b/iso/builder/config/bootloaders/grub-pc/live-theme/theme.txt new file mode 100644 index 0000000..fddd279 --- /dev/null +++ b/iso/builder/config/bootloaders/grub-pc/live-theme/theme.txt @@ -0,0 +1,50 @@ +title-color: "#ffffff" +title-font: "Unifont Regular 16" +title-text: "Bee Hardware Audit" +message-font: "Unifont Regular 16" +terminal-font: "Unifont Regular 16" + +#help bar at the bottom ++ label { + top = 100%-50 + left = 0 + width = 100% + height = 20 + text = "@KEYMAP_SHORT@" + align = "center" + color = "#ffffff" + font = "Unifont Regular 16" +} + +#boot menu ++ boot_menu { + left = 10% + width = 80% + top = 30% + height = 70%-80 + item_color = "#a8a8a8" + item_font = "Unifont Regular 16" + selected_item_color= "#ffffff" + selected_item_font = "Unifont Regular 16" + item_height = 16 + item_padding = 0 + item_spacing = 4 + icon_width = 0 + icon_heigh = 0 + item_icon_space = 0 +} + +#progress bar ++ progress_bar { + id = "__timeout__" + left = 15% + top = 100%-80 + height = 16 + width = 70% + font = "Unifont Regular 16" + text_color = "#000000" + fg_color = "#ffffff" + bg_color = "#a8a8a8" + border_color = "#ffffff" + text = "@TIMEOUT_NOTIFICATION_LONG@" +} diff --git a/iso/builder/config/bootloaders/grub-pc/theme.cfg b/iso/builder/config/bootloaders/grub-pc/theme.cfg new file mode 100644 index 0000000..02b8970 --- /dev/null +++ b/iso/builder/config/bootloaders/grub-pc/theme.cfg @@ -0,0 +1,9 @@ +set color_normal=light-gray/black +set color_highlight=white/dark-gray + +if [ -e /boot/grub/splash.png ]; then + set theme=/boot/grub/live-theme/theme.txt +else + set menu_color_normal=cyan/black + set menu_color_highlight=white/dark-gray +fi