You are not logged in.
Pages: 1
Hey there...
I am a Distro Maintainer, and latest archiso added Grub as boot, I was wondering if I want to use a theme on that UEFI Grub how to do so.. I already set one for future system just want to set the same for booting my ISO... I saw the grub.cfg in grub folder in releng.. I want to make it use my theme for my Distro...
Thanks...
Offline
Add a line to grub.cfg using the background_image command.
Jin, Jîyan, Azadî
Offline
Thing is theme is made of Fonts and wallpaper and colors etc full theme
Offline
The font can also be specified with loadfont. The official profile already does this for unicode.pf2: https://gitlab.archlinux.org/archlinux/ … ub.cfg#L10
See https://www.gnu.org/software/grub/manua … ile-format for the relevant upstream documentation on theming.
Jin, Jîyan, Azadî
Offline
This is my theme
https://github.com/xerolinux/default-gr … in/XeroKDE
I want to load it on ISO boot.. It's installed on my system. Installed grub.cfg
insmod gfxmenu
loadfont ($root)/boot/grub/themes/XeroKDE/terminus-12.pf2
loadfont ($root)/boot/grub/themes/XeroKDE/terminus-14.pf2
loadfont ($root)/boot/grub/themes/XeroKDE/terminus-16.pf2
loadfont ($root)/boot/grub/themes/XeroKDE/terminus-18.pf2
loadfont ($root)/boot/grub/themes/XeroKDE/ubuntu_regular_17.pf2
loadfont ($root)/boot/grub/themes/XeroKDE/ubuntu_regular_20.pf2
insmod png
set theme=($root)/boot/grub/themes/XeroKDE/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5Offline
Your configuration relies on grub-mkconfig but for the ISO you will have to edit grub.cfg directly. Use your current grub.cfg as a reference, it shouldn't be too hard.
Jin, Jîyan, Azadî
Offline
I dunno where to put the files on the ISO for grub.cfg to pick the theme.txt up.. I tried copy pasting that part into ISO grub.cfg and put files on boot/.... did not work, put them elsewhere changes location in cfg still did not work
Offline
Put them under archiso/configs/releng/grub/fonts/ then add the lines to archiso/configs/releng/grub/grub.cfg with this format:
loadfont "${prefix}/fonts/whatever.pf2"Replace whatever with the actual font name.
Disclaimer: untested.
Jin, Jîyan, Azadî
Offline
${prefix} is (memdisk)/boot/grub, you want ${cmdpath}, which is (cd0)/EFI/BOOT, instead.
Not that that would work anyway, since only grub.cfg is copied to /EFI/BOOT/. See archiso#185.
Someone should probably fix that.
Last edited by nl6720 (2022-07-17 15:19:12)
Offline
^ Interesting :-)
@OP: something like this might work:
--- /usr/local/bin/mkarchiso
+++ /usr/local/bin/mkarchiso
@@ -605,6 +605,16 @@ _make_bootmode_uefi-ia32.grub.eltorito()
# Copy GRUB configuration files
install -m 0644 -- "${work_dir}/grub.cfg" "${isofs_dir}/EFI/BOOT/grub.cfg"
+ # Copy GRUB theme
+ if [[ -d "${work_dir}/fonts" ]]; then
+ install -d -m 0755 -- "${isofs_dir}/EFI/BOOT/fonts"
+ install -D -m 0644 -- "${work_dir}/fonts/*.pf2" "${isofs_dir}/EFI/BOOT/fonts"
+ fi
+ if [[ -d "${work_dir}/background" ]]; then
+ install -d -m 0755 -- "${isofs_dir}/EFI/BOOT/background"
+ install -D -m 0644 -- "${work_dir}/background/*" "${isofs_dir}/EFI/BOOT/background"
+ fi
+
# edk2-shell based UEFI shell
if [[ -e "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" ]]; then
install -m 0644 -- "${pacstrap_dir}/usr/share/edk2-shell/ia32/Shell_Full.efi" \So save that as hack.patch, place the fonts (which should have the .pf2 suffix) in archiso/configs/releng/grub/fonts/ and the background image in archiso/confgs/releng/grub/background/ then copy mkarchiso to /usr/local/bin/ and apply the patch:
# cp /usr{,/local}/bin/mkarchiso
# patch -p1 /usr/local/bin/mkarchiso -i hack.patchDisclaimer: also untested.
Jin, Jîyan, Azadî
Offline
Pages: 1