[Pkg-libvirt-maintainers] Bug#1111337: Found a Fix

Kenneth Pronovici pronovic at gmail.com
Sun Aug 17 23:22:20 BST 2025


I have a fix.  If I adjust /etc/default/grub to set one of these values
and then run update-grub, then the guest works:

   GRUB_TERMINAL="console"
   GRUB_TERMINAL="serial"
   GRUB_TERMINAL="console serial"

Initially, since I couldn't log into the guest, I prototyped this on the
hypervisor and then made changes manually in /boot/grub/grub.cfg for
each of the guests using virt-edit. I started with a bunch of other
changes (for instance to enable the console TTYs when booting the
kernel, etc.), but in the end this was the minimal necessary fix.

The GRUB_TERMINAL change has two effects in /boot/grub/grub.cfg: 
1) it removes the conditional logic that sets up for "terminal_output
gfxterm", and 2) it removes conditional logic in the Debian theme
section, leaving just two menu color lines.  

From manual testing, I'm pretty confident that the first change for
gfxterm is the important one, but I still don't understand why it's
necessary.  It's not clear whether the change in behavior is due to
libvirt, grub, or the kernel package.  But at least it works, which is
quite a relief. :)

There's an inline patch below showing the complete set of differences
when using GRUB_TERMINAL="console". Changes are similar when using the
other working values.

Ken

--- grub.orig.cfg 2025-08-17 21:36:02.347698273 +0000                                                                                                 +++ grub.works.cfg   2025-08-17 21:36:15.979841505 +0000                                                                                              @@ -55,30 +55,8 @@                                                                                                                                       fi                                                                                                                                                  }                                                                                                                                                                                                                                                                                                          -if [ x$feature_default_font_path = xy ] ; then                                                                                                       -   font=unicode                                                                                                                                      -else                                                                                                                                                 -insmod part_msdos                                                                                                                                    -insmod lvm                                                                                                                                           -insmod ext2                                                                                                                                          -set root='lvmid/fA9B2E-GJRf-H7XG-7HFA-1Wqq-3ZwA-kglN18/3KwGYi-I3t1-2jvP-ZsLj-fiDr-e21m-WMQ6dU'                                                       -if [ x$feature_platform_search_hint = xy ]; then                                                                                                     -  search --no-floppy --fs-uuid --set=root --hint='lvmid/fA9B2E-GJRf-H7XG-7HFA-1Wqq-3ZwA-kglN18/3KwGYi-I3t1-2jvP-ZsLj-fiDr-e21m-WMQ6dU'  537ffb3e-02da-4ed6-aa3b-8c84319f72a0
-else
-  search --no-floppy --fs-uuid --set=root 537ffb3e-02da-4ed6-aa3b-8c84319f72a0
-fi
-    font="/usr/share/grub/unicode.pf2"
-fi
-
-if loadfont $font ; then
-  set gfxmode=auto
-  load_video
-  insmod gfxterm
-  set locale_dir=$prefix/locale
-  set lang=en_US
-  insmod gettext
-fi
-terminal_output gfxterm
+terminal_input console
+terminal_output console
 if [ "${recordfail}" = 1 ] ; then
   set timeout=30
 else
@@ -94,23 +72,8 @@
 ### END /etc/grub.d/00_header ###

 ### BEGIN /etc/grub.d/05_debian_theme ###
-insmod part_msdos
-insmod lvm
-insmod ext2
-set root='lvmid/fA9B2E-GJRf-H7XG-7HFA-1Wqq-3ZwA-kglN18/3KwGYi-I3t1-2jvP-ZsLj-fiDr-e21m-WMQ6dU'
-if [ x$feature_platform_search_hint = xy ]; then
-  search --no-floppy --fs-uuid --set=root --hint='lvmid/fA9B2E-GJRf-H7XG-7HFA-1Wqq-3ZwA-kglN18/3KwGYi-I3t1-2jvP-ZsLj-fiDr-e21m-WMQ6dU'  537ffb3e-02da-4ed6-aa3b-8c84319f72a0
-else
-  search --no-floppy --fs-uuid --set=root 537ffb3e-02da-4ed6-aa3b-8c84319f72a0
-fi
-insmod png
-if background_image /usr/share/desktop-base/ceratopsian-theme/grub/grub-4x3.png; then
-  set color_normal=white/black
-  set color_highlight=black/white
-else
-  set menu_color_normal=cyan/blue
-  set menu_color_highlight=white/blue
-fi
+set menu_color_normal=cyan/blue
+set menu_color_highlight=white/blue
 ### END /etc/grub.d/05_debian_theme ###

 ### BEGIN /etc/grub.d/10_linux ###



More information about the Pkg-libvirt-maintainers mailing list