hartwork / grub2-theme-preview

:city_sunrise: Preview a full GRUB 2.x theme (or just a background image) using KVM / QEMU
https://pypi.org/project/grub2-theme-preview/
323 stars 11 forks source link

[1.4.2] Stuck on "Booting from Hard Disk" on host with EFI #18

Closed mateosss closed 4 years ago

mateosss commented 4 years ago

Hi, I'm unable to run it on Lubuntu 18.04, I did as follows:

sudo su
pip install grub2_theme_preview
apt install xorriso

The script only seemed to complain about xorriso as I already seem to have qemu (or at least I have 60+ commands starting with qemu-)

And after running what the terminal in the image shows, I got stuck in this.

2020-06-27-203559_946x627_scrot

Do you have any ideas?

hartwork commented 4 years ago

Hi!

I have added an option --plain-rescue-image for situations like this. Please try:

# grub2-theme-preview --verbose --debug --plain-rescue-image --grub-cfg /dev/null /var/empty

If things go well, you should end up in a grub shell like this: grub_Screenshot_20200628_021041

Is it still hanging?

mateosss commented 4 years ago

That command gave a python error because /var/empty does not exist and then finished, so I tried it again with my theme path instead and got stuck again.

2020-06-28-122128_1920x1080_scrot

EDIT: Afterwards I tried with an empty directory as well, but same result as in the second case.

hartwork commented 4 years ago

I tried both with rescue images generated by Debian sid's GRUB 2.04 and Ubuntu bionic's GRUB 2.02 now — both worked. And then I noticed… "efi" in your output: It's because of EFI. Give me two hours and with some luck I have a fix until then.

hartwork commented 4 years ago

I believe I have a fix in Git master now. Here's one way to see if the fix works:

cd "$(mktemp -d)"
git clone https://github.com/hartwork/grub2-theme-preview
cd grub2-theme-preview
virtualenv --python=python3.7 py37
source py37/bin/activate
pip install -e .  # into the virtualenv
sudo apt install ovmf  # provides an EFI bios image
grub2-theme-preview --verbose --debug --plain-rescue-image --grub-cfg /dev/null /boot/grub/themes/Matter/

Does it work?

mateosss commented 4 years ago

There it is! It works almost perfect now, the only problem is the font not properly being shown, but maybe I should open another issue for that?

2020-06-28-143756_1920x1080_scrot

hartwork commented 4 years ago

Cool! For the font thing: Any ideas what might be wrong? The screenshot says that font file googlesans.pf2 is copied. I would need help with understanding what the correct behaviour would be. But it's probably a bug either way.

I'll close this one right here and push a new release in a minute.