Re: Re: GRUB lost graphical terminal mode

2024-02-20 Thread Borden
>On 19 Feb 2024 22:44 +0100, from borde...@tutanota.com (Borden):
>>> Would you be willing to post your /boot/grub/grub.cfg for a setup
>>> where you get the blank screen GRUB?
>> 
>> Yeah, I probably should have opened with that. Sorry:
>> 
>> ```
>> # If you change this file, run 'update-grub' afterwards to update
>> # /boot/grub/grub.cfg.
>> # For full documentation of the options in this file, see:
>> #   info -f grub -n 'Simple configuration'
>> 
>> GRUB_DEFAULT=0
>[snipped remainder]
>
>If that's your /boot/grub/grub.cfg, it's a miracle that your GRUB
>installation is working at all and not dumping you to a grub> rescue
>prompt.

Right you are. I forget that there's a /boot/grub/grub.cfg file because I 
always edit /etc/default/grub . This is what you're looking for, I hope:

#
# 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 [ "${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 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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  #Redacted UUID#
else
  search --no-floppy --fs-uuid --set=root #Redacted UUID#
fi
    font="/@rootfs/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_CA
  insmod gettext
fi
terminal_input gfxterm
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  #Redacted UUID#
else
  search --no-floppy --fs-uuid --set=root #Redacted UUID#
fi
insmod png
if background_image 
/@rootfs/usr/share/desktop-base/emerald-theme/grub/grub-16x9.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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_dark_theme ###
set menu_color_normal=white/black
set menu_color_highlight=yellow/black
set color_normal=white/black
set color_highlight=yellow/black
background_image
### END /etc/grub.d/06_dark_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 'gnulinux-simple-#Redacted UUID#' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 
--hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  #Redacted UUID#
else
  search --no-floppy --fs-uuid --set=root #Redacted UUID#
fi
echo'Loading Linux 6.6.15-amd64 ...'
linux   /@rootfs/boot/vmlinuz-6.6.15-amd64 root=UUID=#Redacted UUID# ro 
rootflags=subvol=@rootfs  
echo'Loading initial ramdisk ...'
initrd  /@rootfs/boot/initrd.img-6.6.15-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-#Redacted UUID#' {
menuentry 'Debian GNU/Linux, with Linux 6.6.15-amd64' --class debian --class 
gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.6.15-amd64-advanced-#Redacted UUID#' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod btrfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
  search 

Re: GRUB lost graphical terminal mode

2024-02-20 Thread Charles Curley
On Tue, 20 Feb 2024 08:04:47 +
Michael Kjörling <2695bd53d...@ewoof.net> wrote:

> On 19 Feb 2024 22:44 +0100, from borde...@tutanota.com (Borden):
> >> Would you be willing to post your /boot/grub/grub.cfg for a setup
> >> where you get the blank screen GRUB?  
> > 
> > Yeah, I probably should have opened with that. Sorry:
> > 
> > ```
> > # If you change this file, run 'update-grub' afterwards to update
> > # /boot/grub/grub.cfg.
> > # For full documentation of the options in this file, see:
> > #   info -f grub -n 'Simple configuration'
> > 
> > GRUB_DEFAULT=0  
> [snipped remainder]
> 
> If that's your /boot/grub/grub.cfg, it's a miracle that your GRUB
> installation is working at all and not dumping you to a grub> rescue
> prompt.
> 

That clearly isn't the OP's /boot/grub/grub.cfg, but
/etc/default/grub.

As the former is often rather lengthy, and the list does reject large
attachments, perhaps Borden  will put it up at
https://paste.debian.net or some other pastebin facility and provide
the URL.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: GRUB lost graphical terminal mode

2024-02-20 Thread Michael Kjörling
On 19 Feb 2024 22:44 +0100, from borde...@tutanota.com (Borden):
>> Would you be willing to post your /boot/grub/grub.cfg for a setup
>> where you get the blank screen GRUB?
> 
> Yeah, I probably should have opened with that. Sorry:
> 
> ```
> # If you change this file, run 'update-grub' afterwards to update
> # /boot/grub/grub.cfg.
> # For full documentation of the options in this file, see:
> #   info -f grub -n 'Simple configuration'
> 
> GRUB_DEFAULT=0
[snipped remainder]

If that's your /boot/grub/grub.cfg, it's a miracle that your GRUB
installation is working at all and not dumping you to a grub> rescue
prompt.

-- 
Michael Kjörling  https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Re: GRUB lost graphical terminal mode

2024-02-19 Thread Borden
> On 18 Feb 2024 21:28 +0100, from borde...@tutanota.com (Borden):
> > what the default is when neither of those are set (which doesn't
> > work). Is this another "undocumented feature" of GRUB?
> 
> Would you be willing to post your /boot/grub/grub.cfg for a setup where you 
> get the blank screen GRUB?

Yeah, I probably should have opened with that. Sorry:

```
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
GRUB_DISABLE_OS_PROBER=false

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
```

For what it's worth, my graphics adapter is an ancient Intel HD 4000 series 
processor (Ivy Bridge era). It's possible that my card is dying or no longer 
supported. It's just a pain that it worked a few weeks ago and now it doesn't. 
It would be nice to know why.



Re: GRUB lost graphical terminal mode

2024-02-18 Thread Michael Kjörling
On 18 Feb 2024 21:28 +0100, from borde...@tutanota.com (Borden):
> what the default is when neither of those are set (which doesn't
> work). Is this another "undocumented feature" of GRUB?

Would you be willing to post your /boot/grub/grub.cfg for a setup
where you get the blank screen GRUB?

-- 
Michael Kjörling  https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Re: GRUB lost graphical terminal mode

2024-02-18 Thread Borden
> Or perhaps you have all colors set to blank.
> Try add something like
> GRUB_COLOR_NORMAL="light-blue/black"
> GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

Unfortunately, that didn't work. Still a blank screen. I'm curious that if 
GRUB_TERMINAL=gfxterm works and 
GRUB_TERMINAL=console works, what the default is when neither of those are set 
(which doesn't work). Is this another "undocumented feature" of GRUB?



Re: GRUB lost graphical terminal mode

2024-02-17 Thread Michel Verdier
On 2024-02-16, Borden wrote:

> For a couple weeks now, I can't use graphical terminal in my GRUB
> configuration. Setting `GRUB_TERMINAL=console` works fine. With that line
> commented out, (thus using default settings), I get a blank screen on boot, 5
> second timeout, then normal boot.
>
> Curiously, keyboard commands work normally. Specifically, I'm on multi-boot
> system, so I can boot into Windows by pressing the down arrow the correct
> number of times and pressing Enter. So I suspect that GRUB is either sending
> to the wrong video output or GRUB no longer supports my video card.
>
> Any way I can troubleshoot without setting set debug=all?

Or perhaps you have all colors set to blank.
Try add something like
GRUB_COLOR_NORMAL="light-blue/black"
GRUB_COLOR_HIGHLIGHT="light-cyan/blue"



Re: GRUB lost graphical terminal mode

2024-02-16 Thread Borden
Thank you for the tip!

So `GRUB_TERMINAL=gfxterm` works, `GRUB_TERMINAL=console` works, but whatever 
the default is supposed to be does not. Does this imply that "the platform's 
native terminal output" is broken?



Re: GRUB lost graphical terminal mode

2024-02-16 Thread Darac Marjal


On 16/02/2024 17:27, Borden wrote:

For a couple weeks now, I can't use graphical terminal in my GRUB 
configuration. Setting `GRUB_TERMINAL=console` works fine. With that line 
commented out, (thus using default settings), I get a blank screen on boot, 5 
second timeout, then normal boot.

Curiously, keyboard commands work normally. Specifically, I'm on multi-boot 
system, so I can boot into Windows by pressing the down arrow the correct 
number of times and pressing Enter. So I suspect that GRUB is either sending to 
the wrong video output or GRUB no longer supports my video card.

Any way I can troubleshoot without setting set debug=all?



According to the info pages, "console" means "native platform console". 
So, for UEFI, that would mean the UEFI console. For BIOS, I'm not sure 
if there is an equivalent.


Strangely, the info page says that default is "to use the platform's 
native terminal output" (Minor nit, I wish documentation would be 
consistent. Is "native terminal" the same as "native console"?).


Things you can try:

* Keep "GRUB_TERMINAL=console" uncommented. If it works, don't break it.

* Try "GRUB_TERMINAL=gfxterm" (uses graphics mode output).

* Try "GRUB_TERMINAL=morse" (uses the system speaker. Only for really 
desperate debugging :) )




OpenPGP_signature.asc
Description: OpenPGP digital signature