Comments (27)
Hi @Lowrida , please try running…
grub2-theme-preview --plain-rescue-image --debug --verbose ./
…and share its output, for more context. Thank you!
from grub2-theme-preview.
INFO: Appending to fonts to load: unicode.pf2
>>> grub.cfg <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
loadfont $prefix/fonts/unicode.pf2
loadfont $prefix/themes/DEMO/unicode.pf2
insmod all_video
insmod gfxterm
insmod png
insmod tga
insmod jpeg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${initrdfail}" = 2 ]; then
set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
set next_entry="${prev_entry}"
set prev_entry=
save_env prev_entry
if [ "${next_entry}" ]; then
set initrdfail=2
fi
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function initrdfail {
if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
if [ -z "${initrdfail}" ]; then
set initrdfail=1
if [ -n "${boot_once}" ]; then
set prev_entry="${default}"
save_env prev_entry
fi
fi
save_env initrdfail
fi; fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
if loadfont /grub/fonts/terminus16.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=nl_NL
insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
insmod gfxmenu
loadfont ($root)/grub/themes/mint-msi/terminus14.pf2
loadfont ($root)/grub/themes/mint-msi/terminus16.pf2
loadfont ($root)/grub/themes/mint-msi/terminus18.pf2
insmod png
set theme=($root)/grub/themes/mint-msi/theme.txt
export theme
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
play 480 440 1
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if [ ${grub_platform} != pc ]; then
set linux_gfx_mode=keep
elif hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 20.3 Cinnamon' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5e739765-f8e9-478f-af0c-8321cef1ad7c' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
linux /vmlinuz-5.13.0-27-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro nosplash
initrd /initrd.img-5.13.0-27-generic
}
submenu 'Geavanceerde opties voor Linux Mint 20.3 Cinnamon' $menuentry_id_option 'gnulinux-advanced-5e739765-f8e9-478f-af0c-8321cef1ad7c' {
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-27-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-27-generic-advanced-5e739765-f8e9-478f-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-27-generic...'
linux /vmlinuz-5.13.0-27-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro nosplash
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-27-generic
}
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-27-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-27-generic-recovery-5e7
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-27-generic...'
linux /vmlinuz-5.13.0-27-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro recovery nomodeset dis_ucode_ldr
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-27-generic
}
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-25-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-25-generic-advanced-5e739765-f8e9-478f-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-25-generic...'
linux /vmlinuz-5.13.0-25-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro nosplash
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-25-generic
}
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-25-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-25-generic-recovery-5e7
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-25-generic...'
linux /vmlinuz-5.13.0-25-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro recovery nomodeset dis_ucode_ldr
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-25-generic
}
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-23-generic' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-23-generic-advanced-5e739765-f8e9-478f-
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-23-generic...'
linux /vmlinuz-5.13.0-23-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro nosplash
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-23-generic
}
menuentry 'Linux Mint 20.3 Cinnamon, met Linux 5.13.0-23-generic (recovery mode)' --class linuxmint --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.13.0-23-generic-recovery-5e7
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
else
search --no-floppy --fs-uuid --set=root 922a1a96-2aac-4f14-87f0-a967678fe0fd
fi
echo 'Laden van Linux 5.13.0-23-generic...'
linux /vmlinuz-5.13.0-23-generic root=UUID=5e739765-f8e9-478f-af0c-8321cef1ad7c ro recovery nomodeset dis_ucode_ldr
echo 'Laden van initiële RAM-schijf...'
initrd /initrd.img-5.13.0-23-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
submenu "Live ISO's" --class kaos {
menuentry "Mint 20.3 EDGE (5.13) PERSISTENT" --class linuxmint {
set gfxmode=auto
insmod gfxterm
insmod efi_gop
insmod efi_uga
insmod part_gpt
terminal_output gfxterm
set gfxpayload=keep
set isofile="/images/linuxmint-20.3-cinnamon-64bit-edge-513.iso"
loopback loop (hd4,gpt2)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject nosplash persistent
initrd (loop)/casper/initrd.lz
}
menuentry "Mint 20.3 EDGE (5.13)" --class linuxmint {
set gfxmode=auto
insmod gfxterm
insmod efi_gop
insmod efi_uga
insmod part_gpt
terminal_output gfxterm
set gfxpayload=keep
set isofile="/images/linuxmint-20.3-cinnamon-64bit-edge-513.iso"
loopback loop (hd4,gpt2)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject nosplash
initrd (loop)/casper/initrd.lz
}
menuentry "Gparted live" --class steamos {
set isofile="/images/gparted-live-1.1.0-8-amd64.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live config union=overlay username=user components noswap noeject vga=788 ip=192.168.1.101 net.ifnames=0 toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
}### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
### BEGIN /etc/grub.d/99_uefi-firmware ###
menuentry 'UEFI BIOS' $menuentry_id_option 'uefi-firmware' {
fwsetup
}
### END /etc/grub.d/99_uefi-firmware ###
submenu 'Reboot / Shutdown' {
menuentry Reboot { reboot }
menuentry Shutdown { halt }
}
set default=0
set timeout=30
terminal_output gfxterm
set theme=$prefix/themes/DEMO/theme.txt
>>> grub.cfg <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
INFO: Found OVMF image at '/usr/share/OVMF/OVMF_CODE.fd'.
# grub-mkrescue --directory=/usr/lib/grub/x86_64-efi --xorriso xorriso --output /tmp/tmp8qs57tyh/grub2_theme_demo.img boot/grub/themes/DEMO/=/boot/grub
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.
Drive current: -outdev 'stdio:/tmp/tmp8qs57tyh/grub2_theme_demo.img'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 8186m free
Added to ISO image: directory '/'='/tmp/grub.kG30Ee'
xorriso : UPDATE : 289 files added in 1 seconds
libisofs: FAILURE : Access to file is not allowed
xorriso : FAILURE : Grafting failed: '/boot/grub/themes/DEMO/fonts/Ubuntu-C-20.pf2' = '/boot/grub/fonts/Ubuntu-C-20.pf2'
xorriso : UPDATE : 777 files added in 1 seconds
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'
grub-mkrescue: fout: `xorriso` invocation failed
.
Traceback (most recent call last):
File "/home/admin/.local/lib/python3.8/site-packages/grub2_theme_preview/__main__.py", line 479, in main
_inner_main(options)
File "/home/admin/.local/lib/python3.8/site-packages/grub2_theme_preview/__main__.py", line 447, in _inner_main
raise OSError(errno.ENOENT, '%s failed to create the rescue image' % command)
FileNotFoundError: [Errno 2] grub-mkrescue failed to create the rescue image
ERROR: [Errno 2] grub-mkrescue failed to create the rescue image
from grub2-theme-preview.
My /tmp is 8gb and after a reboot it is clean and if i use sudo then it only works 1 time.. after that it exceeds the /tmp capacity. How big is that image???
But i get a window with the grub prompt.. see screenshot.
from grub2-theme-preview.
@Lowrida my grub2_theme_demo.img
over here is about 8MB in size over here. All files from the folder passed as an argument will be included in that image. I used ./
above in grub2-theme-preview --plain-rescue-image --debug --verbose ./
for convenience only. If you folder was beyond 4 GB, that would explain.
So booting a rescue shell in QEMU works, good. Can you try again with a real theme? E.g. I would do grub2-theme-preview --debug --verbose /usr/share/grub/themes/Axiom/
and then study its output for clues.
from grub2-theme-preview.
Yes, it works! But there are a few things..
-
I get this error at the end:
'qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]' -
The quality of the background image is very poor in comparison when i do a real boot.
-
The progressbar image is not at the correct place.
from grub2-theme-preview.
Yes, it works!
@Lowrida cool, thanks for reporting back!
But there are a few things..
1. I get this error at the end: 'qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]'
Nothing to worry about to much, other than maybe performance. Two ideas:
- Try passing
--no-kvm
togrub2-theme-preview
and see if it changes anything - Try adding
-cpu host
inside the Python code and see if it changes anything.
2. The quality of the background image is very poor in comparison when i do a real boot.
Please check if passing a custom resolution a la --resolution=1024x768
gets you better image quality. What's the resolution of the related background image?
3. The progressbar image is not at the correct place.
I would need more info for any real chance on a idea why that would be happening. Can we rule out a bug in the theme?
PS: What is the current understanding of why grub2-theme-preview
failed back when you first created this ticket? Was it because of theme folder size?
from grub2-theme-preview.
Passing --no-kvm did remove the error.
The resolution option did nothing. My resolution is 3440x1440 (ultra wide 34"), but i tried different resolutions.
Also i like qemu to start automatic in fullscreen, but i don't know how? What qemu program is started by your program?
I can send you the theme.txt or complete theme if you want? It is still in progress and i am working on the progressbar, but i got tired of rebooting every time, that's why i was searching for a preview tool.
But i had the top position and the left position already correct. I only needed to size the height and wide.. but i noticed in your preview tool it is at a complete different place!
Why i opened the ticket at first.. I don't know why that error appeared?
I don't think it was the theme folder size because i used the correct path before i opened the ticket. That size problem came after you paste your command to try and i 1 on 1 copy/paste it and therefor i was adding the complete root into the image instead of only the theme folder! My /tmp is a 8GB part of 32GB ram.. so i guess the complete root does not fit in /tmp! ;)
from grub2-theme-preview.
The theme as it is so far..
from grub2-theme-preview.
Passing --no-kvm did remove the error.
@Lowrida cool, thanks for reporting back.
The resolution option did nothing.
I tried with your theme with a custom resolution and it worked over here, so it may have to do with the grub config you're using: What the argument does it is inserts a line like set gfxmode=1000x1000
into the grub config put into the rescue image. Maybe it's the not in the right place for your case. If you want to debug and fix that part together, my vote for a dedicated ticket.
Also i like qemu to start automatic in fullscreen, but i don't know how?
That's probably possible with QEMU somehow.
What qemu program is started by your program?
That depends on your hardware archtecture, see
grub2-theme-preview/grub2_theme_preview/__main__.py
Lines 326 to 328 in 5194569
I can send you the theme.txt or complete theme if you want? It is still in progress and i am working on the progressbar, but i got tired of rebooting every time, that's why i was searching for a preview tool. But i had the top position and the left position already correct. I only needed to size the height and wide.. but i noticed in your preview tool it is at a complete different place!
I'm afraid I cannot help with debugging at that level. I have lots of other things to do.
Why i opened the ticket at first.. I don't know why that error appeared? I don't think it was the theme folder size because i used the correct path before i opened the ticket. That size problem came after you paste your command to try and i 1 on 1 copy/paste it and therefor i was adding the complete root into the image instead of only the theme folder! My /tmp is a 8GB part of 32GB ram.. so i guess the complete root does not fit in /tmp! ;)
Okay, let me ask a different way: What is needed more in your eyes to fix and close issue "grub-mkrescue failed to create the rescue image"?
from grub2-theme-preview.
I tried with your theme with a custom resolution and it worked over here, so it may have to do with the grub config you're using: What the argument does it is inserts a line like
set gfxmode=1000x1000
into the grub config put into the rescue image. Maybe it's the not in the right place for your case. If you want to debug and fix that part together, my vote for a dedicated ticket.
Ok, so i open a new ticket for this?
grub2-theme-preview/grub2_theme_preview/__main__.py
Lines 326 to 328 in 5194569
Ah ok, that's what i wanted to know, which program is used. I have multiple qemu-* files... and i know not enough about qemu to asume automatically what file is used. I see that --full-screen can be used with qemu. But how do you use your --qemu COMMAND ??
--qemu --full-screen
--qemu full-screen
--qemu=--full-screen
--qemu=full-screen
--qemu=-full-screen
--qemu -full-screen
They all don't work!
I can send you the theme.txt or complete theme if you want? It is still in progress and i am working on the progressbar, but i got tired of rebooting every time, that's why i was searching for a preview tool. But i had the top position and the left position already correct. I only needed to size the height and wide.. but i noticed in your preview tool it is at a complete different place!
I'm afraid I cannot help with debugging at that level. I have lots of other things to do.
Then your program is not useful for me, because i expected it to show all parts of a theme on the right place. What is the point then to continue?
Okay, let me ask a different way: What is needed more in your eyes to fix and close issue "grub-mkrescue failed to create the rescue image"?
Ah ok. In that case, this ticket can be closed, because the first problem is solved!
from grub2-theme-preview.
I tried with your theme with a custom resolution and it worked over here, so it may have to do with the grub config you're using: What the argument does it is inserts a line like
set gfxmode=1000x1000
into the grub config put into the rescue image. Maybe it's the not in the right place for your case. If you want to debug and fix that part together, my vote for a dedicated ticket.Ok, so i open a new ticket for this?
If you you like and can help with debugging it or can share --debug
output so we can see where the line goes for you, then yes.
grub2-theme-preview/grub2_theme_preview/__main__.py
Lines 326 to 328 in 5194569
Ah ok, that's what i wanted to know, which program is used. I have multiple qemu-* files... and i know not enough about qemu to asume automatically what file is used. I see that --full-screen can be used with qemu. But how do you use your --qemu COMMAND ?? --qemu --full-screen --qemu full-screen --qemu=--full-screen --qemu=full-screen --qemu=-full-screen --qemu -full-screen
They all don't work!
They don't, yes. From playing with full QEMU screen mode options over here now — e.g. display gtk,full-screen=on
, I can tell it won't be easy and fun to use, probably a waste of time.
I can send you the theme.txt or complete theme if you want? It is still in progress and i am working on the progressbar, but i got tired of rebooting every time, that's why i was searching for a preview tool. But i had the top position and the left position already correct. I only needed to size the height and wide.. but i noticed in your preview tool it is at a complete different place!
I'm afraid I cannot help with debugging at that level. I have lots of other things to do.
Then your program is not useful for me, because i expected it to show all parts of a theme on the right place. What is the point then to continue?
I can fix bugs, but I cannot help everyone with their very theme. That doesn't scale.
Okay, let me ask a different way: What is needed more in your eyes to fix and close issue "grub-mkrescue failed to create the rescue image"?
Ah ok. In that case, this ticket can be closed, because the first problem is solved!
Excellent, thanks for the update.
from grub2-theme-preview.
Ok, so i open a new ticket for this?
If you you like and can help with debugging it or can share
--debug
output so we can see where the line goes for you, then yes.
No problem, i can do that
They don't, yes. From playing with full QEMU screen mode options over here now — e.g. display
gtk,full-screen=on
, I can tell it won't be easy and fun to use, probably a waste of time.
I don't understand what you try to tell here?
At the moment it opens in a window and the resolution is out of ratio. Too small, probably because of my widescreen monitor. When i choose the fullscreen option from the menu the resolution is correct! So i would like to start automatically in fullscreen mode. But i do not understand how to use your '--qemu COMMAND' to activate that --full-screen option of qemu??
(see screenshot of the ratio)
I'm afraid I cannot help with debugging at that level. I have lots of other things to do.
Then your program is not useful for me, because i expected it to show all parts of a theme on the right place. What is the point then to continue?
I can fix bugs, but I cannot help everyone with their very theme. That doesn't scale.
I do not need help with my theme. I can make my own theme, no problem with that! The problem is that your program does not show the objects at the right place! Because when i do a real boot, the objects are in the correct place on the screen! In the image they are not. So my conclusion is that the problem is not my theme, but somewere in your program, or qemu or whatever program is used... seems like a bug to me.
(see screenshot of blue progressbar placement)
from grub2-theme-preview.
Ok, so i open a new ticket for this?
If you you like and can help with debugging it or can share
--debug
output so we can see where the line goes for you, then yes.No problem, i can do that
@Lowrida thanks!
For anyone else interested: This is ticket #64.
They don't, yes. From playing with full QEMU screen mode options over here now — e.g. display
gtk,full-screen=on
, I can tell it won't be easy and fun to use, probably a waste of time.I don't understand what you try to tell here? At the moment it opens in a window and the resolution is out of ratio. Too small, probably because of my widescreen monitor. When i choose the fullscreen option from the menu the resolution is correct! So i would like to start automatically in fullscreen mode. But i do not understand how to use your '--qemu COMMAND' to activate that --full-screen option of qemu?? (see screenshot of the ratio)
Okay, let me clarify. I was meaning to say that:
- The current option
--qemu
is not supposed to pass parameters through to QEMU, it's about command location. - There are multiple ways to activate fullscreen mode from the command line with QEMU, so it would need a closer look and a "UX decision".
- QEMU fullscreen mode did not seem to be fun in my own experience, and hence maybe not worth closer investigation.
If you wanted to force grub2-theme-preview
into passing -full-screen
to QEMU, one way would be a wrapper script and using that with --qemu
. The wrapper script would be:
#! /usr/bin/env bash
exec qemu-system-x86_64 -full-screen "$@"
I can elaborate on that approach if it's not clear but of interest.
I'm afraid I cannot help with debugging at that level. I have lots of other things to do.
Then your program is not useful for me, because i expected it to show all parts of a theme on the right place. What is the point then to continue?
I can fix bugs, but I cannot help everyone with their very theme. That doesn't scale.
I do not need help with my theme. I can make my own theme, no problem with that! The problem is that your program does not show the objects at the right place! Because when i do a real boot, the objects are in the correct place on the screen! In the image they are not. So my conclusion is that the problem is not my theme, but somewere in your program, or qemu or whatever program is used... seems like a bug to me. (see screenshot of blue progressbar placement)
My guess (without having had a closer look) is that the coordinates used to put the objects on the screen are depending on screen size or aspect ratio. If that's true, either (a) the fix to #64 should make this work for free or (b) the theme needs to use relative coordinates rather than absolute ones.
from grub2-theme-preview.
Okay, let me clarify. I was meaning to say that:
* The current option `--qemu` is not supposed to pass parameters through to QEMU, it's about command location. * There are multiple ways to activate fullscreen mode from the command line with QEMU, so it would need a closer look and a "UX decision". * QEMU fullscreen mode did not seem to be fun in my own experience, and hence maybe not worth closer investigation.
Not being rude, but that did not clarify things at all for me! ;)
What do you mean with "it's about command location" ?? Maybe you should expand the help section to clarify what the "--qemu COMMAND" exactly does. Because for me it looked like i could pass extra parameters to qemu. But command location doesn't ring a bell at what that means?
If you ask me, you could make a --fullscreen option in your program that passes the "-full-screen" to qemu. Seems to me that's a pretty simple solution.. in comparison to working with wrappers and aliases.
I don't know what system you use, but qemu in fullscreen mode gave me no troubles more then the windows mode gave me. It was just as laggy as in windows mode. (yes it is slow, but in both modes) But i don't care if it is slow or not! I don't need it to be snappy, i need it to preview my grubmenu, nothing more, nothing less!
My guess (without having had a closer look) is that the coordinates used to put the objects on the screen are depending on screen size or aspect ratio. If that's true, either (a) the fix to #64 should make this work for free or (b) the theme needs to use relative coordinates rather than absolute ones.
That is probably the problem. I use for most of the objects hard values for placement because percentage is way less accurate if it comes to the pixel! So with hard values and a corrupt aspect ratio of the screen size, the objects are placed wrong. But fullscreen mode would solve this problem i guess! ;)
from grub2-theme-preview.
Okay, let me clarify. I was meaning to say that:
* The current option `--qemu` is not supposed to pass parameters through to QEMU, it's about command location. * There are multiple ways to activate fullscreen mode from the command line with QEMU, so it would need a closer look and a "UX decision". * QEMU fullscreen mode did not seem to be fun in my own experience, and hence maybe not worth closer investigation.
Not being rude, but that did not clarify things at all for me! ;) What do you mean with "it's about command location" ?? Maybe you should expand the help section to clarify what the "--qemu COMMAND" exactly does. Because for me it looked like i could pass extra parameters to qemu. But command location doesn't ring a bell at what that means?
qemu-system-x86_64
is a command. Variable $PATH
is used to find that command as a file in the file system. In my case, /usr/bin/qemu-system-x86_64
is the location of the file that running command qemu-system-x86_64
will execute:
# which qemu-system-x86_64
/usr/bin/qemu-system-x86_64
The help output is this:
# grub2-theme-preview --help | fgrep qemu | fgrep default
--qemu COMMAND KVM/QEMU command (default: qemu-system-<machine>)
If that's not clear, what else could we put the to be more clear?
If you ask me, you could make a --fullscreen option in your program that passes the "-full-screen" to qemu. Seems to me that's a pretty simple solution.. in comparison to working with wrappers and aliases.
It would be possible, but (1) so far I have not yet seen that work well locally and (2) it is not clear to me yet which of the displays support that mode.
from grub2-theme-preview.
qemu-system-x86_64
is a command. Variable$PATH
is used to find that command as a file in the file system. In my case,/usr/bin/qemu-system-x86_64
is the location of the file that running commandqemu-system-x86_64
will execute:
Ok, let me be clear.. i'm not a noob with linux or programming. I think the miss understandings here is that english is for both of us not our native language. That said.. "qemu-system-x86_64" is not a command, it is an executable! When you execute it, THAT is a command! You give the system the command to execute it.
I think there lies the miss understanding of what "--qemu COMMAND" means. That's why i thought it was a way to give qemu a command to go fullscreen or whatever option.
If your help would have said something like this:
--qemu <path/to/qemu> KVM/QEMU executable (default: qemu-system-)
It would have been way more clear to me that i could manipulate which program to start AND that i could use a script/wrapper to execute it with any parameter possible!
If you ask me, you could make a --fullscreen option in your program that passes the "-full-screen" to qemu. Seems to me that's a pretty simple solution.. in comparison to working with wrappers and aliases.
It would be possible, but (1) so far I have not yet seen that work well locally and (2) it is not clear to me yet which of the displays support that mode.
It works on my system.. why wouldn't it support any display? The option is IN qemu itself. I think fullscreen mode is nothing more then a maximized window without the frame/titlebar. I still can switch desktops, ALT-Tab lets me get other windows on top of it and my quake style terminal does also show on top of it!
from grub2-theme-preview.
I made a wrapper and started qemu with full screen.. well.. that brought some other problems with it!
I work with 2 monitors. The second one expands my desktop and if i start full screen from the prompt, the output expands the primary screen. So it uses the resolution of the 2 displays combined, but only shows the part of the primary screen... hope that explains it? Changing resolutions in the custom grub has no influence.
When i start in window mode and then go to fullscreen, it acts normal and uses only the complete size of the primary monitor.
So fullscreen from the window or the command prompt are two different things i guess...........
That whole fullscreen thing wouldn't even be necessary if resizing the window would also resize the grub menu. Because then i would double-click the titlebar to maximize the window and i get my aspect ratio of the screen, but that does not work!
I made a custom grub and changed the gfxmode=auto to a resolution, but that also does not change the size of the window.
Seems it is not going to work on a wide screen... :/
from grub2-theme-preview.
qemu-system-x86_64
is a command. Variable$PATH
is used to find that command as a file in the file system. In my case,/usr/bin/qemu-system-x86_64
is the location of the file that running commandqemu-system-x86_64
will execute:Ok, let me be clear.. i'm not a noob with linux or programming. I think the miss understandings here is that english is for both of us not our native language. That said.. "qemu-system-x86_64" is not a command, it is an executable! When you execute it, THAT is a command! You give the system the command to execute it. I think there lies the miss understanding of what "--qemu COMMAND" means. That's why i thought it was a way to give qemu a command to go fullscreen or whatever option. If your help would have said something like this:
--qemu <path/to/qemu> KVM/QEMU executable (default: qemu-system-)
It would have been way more clear to me that i could manipulate which program to start AND that i could use a script/wrapper to execute it with any parameter possible!
I understand that term "command" does not communicate that it cannot be more than "a single word", i.e. that it cannot have arguments. However, the value from --qemo
will be resolved using $PATH
so the term "executable" — which I assume is short for "executable file" — does not seem to tell the whole story. My use of term "command" is in line with man bash
and man which
from what I can see.
If you ask me, you could make a --fullscreen option in your program that passes the "-full-screen" to qemu. Seems to me that's a pretty simple solution.. in comparison to working with wrappers and aliases.
It would be possible, but (1) so far I have not yet seen that work well locally and (2) it is not clear to me yet which of the displays support that mode.
It works on my system.. why wouldn't it support any display? The option is IN qemu itself. I think fullscreen mode is nothing more then a maximized window without the frame/titlebar. I still can switch desktops, ALT-Tab lets me get other windows on top of it and my quake style terminal does also show on top of it!
There are QEMU displays other than sdl
and gtk
, e.g. on my system:
# qemu-system-x86_64 -display help
Available display backend types:
none
gtk
sdl
egl-headless
curses
Maybe we can expect the user to not combine non-window displays with fullscreen mode.
I tried -full-screen
with QEMU with both the SDL display and the GTK display now, and it does show a fullscreen QEMU (that is hard to get out of). When using it from inside grub2-theme-preview
though, the graphics do not seem to fit the actual resolution, they are much bigger, not sure why. So if it happens to look good on your machine, it doesn't on mine. That's why I'm reluctant to add it for everyone. And for the hard-to-get out of part.
from grub2-theme-preview.
So fullscreen from the window or the command prompt are two different things i guess...........
@Lowrida that's good to know.
That whole fullscreen thing wouldn't even be necessary if resizing the window would also resize the grub menu. Because then i would double-click the titlebar to maximize the window and i get my aspect ratio of the screen, but that does not work!
I think it's because there's a screen in there. I'm not surprised that resize works this way.
I made a custom grub and changed the gfxmode=auto to a resolution, but that also does not change the size of the window.
Are you sure that there is not a single set gfxmode=auto
left in the result? Could you try with PR #65 please? If it doesn't fix the problem, I can close the PR. That's all I made it for.
Seems it is not going to work on a wide screen... :/
Maybe it's got to do with the size of your resolution. I only have 1920x1080 here. Maybe QEMU needs to be convinced to use a emulate a non-default graphics card. E.g. there is a -vga <card>
argument.
from grub2-theme-preview.
I just tried different display options, but that didn't work.. no support for sdl. Only gtk works. It tried it with gl=on but then i get fullscreen but with the wrong (small) aspect ratio again. Like in window mode.
So display is not the problem.
That whole fullscreen thing wouldn't even be necessary if resizing the window would also resize the grub menu. Because then i would double-click the titlebar to maximize the window and i get my aspect ratio of the screen, but that does not work!
I think it's because there's a screen in there. I'm not surprised that resize works this way.
Mmh.. could be indeed. But i noticed something else. When the first message pops up "Guest has not initialized display (yet)." All is nicely centered an correct resolution. Then the next screen comes in with some errors about disk something and the resolution jumps out of proportion!
I tried to make screenshots, but on the screenshots all is ok! wtf?
I made a custom grub and changed the gfxmode=auto to a resolution, but that also does not change the size of the window.
Are you sure that there is not a single
set gfxmode=auto
left in the result? Could you try with PR #65 please? If it doesn't fix the problem, I can close the PR. That's all I made it for.
I could try, but from what i understand it fixes the extra "set gfxmode=auto" bug. I manually fixed that with the custom grub config. I removed ALL the "set gfxmode=" and placed only one at the top of the config. So i don't think it will do anything helpful at this moment. But overall it should fix that bug in your program, so it is not bad to implement it.
Seems it is not going to work on a wide screen... :/
Maybe it's got to do with the size of your resolution. I only have 1920x1080 here. Maybe QEMU needs to be convinced to use a emulate a non-default graphics card. E.g. there is a
-vga <card>
argument.
Whoop-dee-hooo, "-vga virtio" did the trick! :)
from grub2-theme-preview.
Debug says it copies the standard grub.cfg to the IMG.. but i point your program to a custom grub config...??
Added to ISO image: file '/boot/grub/grub.cfg'='/tmp/tmpi_nijp0l/grub.cfg'
But i use this cmd to start:
grub2-theme-preview --debug --verbose --resolution=800x600 --qemu /usr/bin/qemu-fullscreen.sh --timeout=10 --grub-cfg /boot/grub/themes/mint-msi/customgrub.cfg --no-kvm "$PWD"
($PWD = i start it from within the theme directory)
But when i open the IMG it does contain my custom grub! So maybe there is a bug in the debug output of that line?
(btw, that resolution was just for testing purpose, but it does nothing)
from grub2-theme-preview.
Debug says it copies the standard grub.cfg to the IMG.. but i point your program to a custom grub config...??
Added to ISO image: file '/boot/grub/grub.cfg'='/tmp/tmpi_nijp0l/grub.cfg'
But i use this cmd to start:
grub2-theme-preview --debug --verbose --resolution=800x600 --qemu /usr/bin/qemu-fullscreen.sh --timeout=10 --grub-cfg /boot/grub/themes/mint-msi/customgrub.cfg --no-kvm "$PWD"
($PWD = i start it from within the theme directory)But when i open the IMG it does contain my custom grub! So maybe there is a bug in the debug output of that line?
In the output line the left side is the target in the image (/boot/grub/grub.cfg
) and the right side is the source on the host system (/tmp/tmpi_nijp0l/grub.cfg
). So it seems correct.
Whoop-dee-hooo, "-vga virtio" did the trick! :)
Could elaborate? What is now working that previously didn't work?
from grub2-theme-preview.
Fullscreen mode with everything working and correct aspect ratio of screen size!
The only strange thing is the progressbar.. even with all values in percentages it still does not show 100% on the correct place in comparison with a real boot, but now it's only a few pixels off. I did some real reboots to place it correct.. But all the rest is working great!
So i finally have fabricated a working ultra widescreen grub theme with normal font size and correct aspect ratio! ;)
-
I made a customgrub.cfg with some "set gfxmode=" corrections.
-
I made a /usr/bin/qemu-fullscreen.sh that contains the following lines:
#!/bin/bash exec qemu-system-x86_64 -display gtk -vga virtio -full-screen "$@"
-
And i made a preview-theme.sh with the following lines:
#!/bin/bash db="--debug --verbose" grub2-theme-preview $db --qemu /usr/bin/qemu-fullscreen.sh --timeout=10 --grub-cfg $PWD/customgrub.cfg --no-kvm "$PWD"
If i copy the 'customgrub.cfg' and 'preview-theme.sh' to a theme folder i can't test it from there.
from grub2-theme-preview.
...and btw, this page sucks with their code tags!
from grub2-theme-preview.
@Lowrida code blocks need…
three backticks
content
...
three backticks
You're using single ticks above, which is for single-line inline code. That's rather strong language for a feature as useful as those tags 😃
If grub2-theme-preview
had two more options --vga-driver <value>
and --full-screen
you would not need /usr/bin/qemu-fullscreen.sh
but you would need to pass those parameters, either directly or throuh a shell alias a la alias grub2-theme-preview='grub2-theme-preview --vga-driver virtio --full-screen'
. If that makes a difference to you, I can add those two options. If not, we can also not add them and keep the script.
from grub2-theme-preview.
About the backticks, i click on the "add code" button in the edit window, so i asume that would be enough to add code. Nowere does it say that single backticks are for one liners and tripple for big text!? But nice to know that it works with tripple...
Just testing:
#!/bin/bash
exec /home/foo/bar/script.sh
clear
Well.. waddayaknow, it works! ;)
I prefer these options in your program rather than having to deal with wrappers or aliases!
from grub2-theme-preview.
I prefer these options in your program rather than having to deal with wrappers or aliases!
@Lowrida done in PR #67, released to PyPI as 2.7.0 just now.
from grub2-theme-preview.
Related Issues (20)
- Doesn't work on Ubuntu 16.04/xenial HOT 21
- License Information HOT 2
- grub2-theme-preview missing in 1.4x HOT 3
- [1.4.2] Stuck on "Booting from Hard Disk" on host with EFI HOT 6
- [1.4.3] Custom font not showing up HOT 9
- Out of memory error HOT 1
- Seems to work, but no boot menu shown HOT 8
- ERROR: Command "grub-mkrescue" of Grub 2.x not found HOT 16
- How to use it correctly? HOT 7
- [unrelated question] error in qemu no bootable devices HOT 4
- [EndeavourOS] ERROR: [Errno 2] OVMF image file "/usr/share/OVMF/OVMF_CODE.fd" (provided by package "ovmf") missing, please install HOT 15
- Error `mcopy` invocation failed: `mcopy: No directory slots` HOT 3
- Feature Request: Please add support for custom configs HOT 12
- grub2-theme-preview AUR package HOT 1
- [2.4.0, 2.4.1] "ERROR: 'NoneType' object is not iterable" when not specifying --add argument HOT 4
- Support of Red Hat Linux HOT 14
- Use Custom Config HOT 2
- Option "--resolution=" does not work HOT 13
- Custom Fonts Not Loading HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grub2-theme-preview.