You are not logged in.

#1 2026-04-21 17:27:23

5hridhyan
Member
Registered: 2025-12-25
Posts: 824
Website

[upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

If typed wrong character while entering username; pressing backspace enters space, I have to press escape and try again, but if I type wrong password and use backspace, it works normally.
so is it a design choice, or my skill issue?

Edit:

└─$ cat /etc/grub.d/01_users
#!/bin/sh
cat << 'EOF'
set superusers="5hridhyan"
password_pbkdf2 5hridhyan grub.pbkdf2.sha512.10000.D320C04BCBFF785A02F87E88C0B7D9A174941BA0F5EB0486D8EB2DC3534241D76FBFA110B3A256825E213522EE5C83E91E708316135184484151296D0B28ECFF.ED81882F1A25378AB428283BCBC132C5C9A3243478C17837491089E4EF83EBE7F4681422EA319B2EF3AFD25D7D0B94E228AD2ED800A56B09BF38E9CC31F2E534
EOF
└─$ cat /etc/default/grub   
# GRUB boot loader configuration

#GRUB_DEFAULT=0
#GRUB_DEFAULT=gnulinux-linux-advanced-c0ae4a73-5088-4f7e-b497-ca1a4baa4dbe
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="ATRNXA"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash lsm=landlock,lockdown,yama,apparmor,bpf apparmor=1 security=apparmor resume=UUID=c0ae4a73-5088-4f7e-b497-ca1a4baa4dbe resume_offset=12937712"
GRUB_CMDLINE_LINUX="cryptdevice=UUID=63984f23-816d-48d8-9493-119bf15c9a26:root zswap.enabled=1 rootfstype=btrfs"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
#GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=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 `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

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

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

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

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
GRUB_SAVEDEFAULT=true
GRUB_DEFAULT=saved

# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

Edit2:
tried w/ or w/o `GRUB_TERMINAL_INPUT=console`; same behavior

Edit3:
Marking as upstream bug + solved; as backspace is working normally, but not visually; not affecting workflow after knowing the logic/behavior

Last edited by 5hridhyan (2026-04-23 15:36:57)

Offline

#2 2026-04-21 19:38:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,855

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

Offline

#3 2026-04-22 12:28:22

5hridhyan
Member
Registered: 2025-12-25
Posts: 824
Website

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

yikes

so, in /etc/grub.d/40_custom I added

insmod terminfo
terminfo vt100

and no behavior change, neither delete characters (Backspace still inserts a space)

Offline

#4 2026-04-22 12:35:03

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,855

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

This did make it early enough into your grub.cfg?
Does "dumb" work?

Offline

#5 2026-04-22 13:27:05

5hridhyan
Member
Registered: 2025-12-25
Posts: 824
Website

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

I tried putting in /etc/grub.d/00_header , with both `vt100` `dumb`, noticeably texts were weird, but same behavior

Offline

#6 2026-04-23 09:05:29

5hridhyan
Member
Registered: 2025-12-25
Posts: 824
Website

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

I found this https://lists.gnu.org/archive/html/bug- … 00004.html
the backspace was doing it's job the whole time, but not visible; I intentionally typed wrong username, then pressed backspace(I hold it  till at some point it stopped inserting space) and I retyped my username, and then password, and the boot process started as expected, so the thing is, the characters do get deleted; just not visible...

Edit:
so, any way to "fix" the rendering w/ workarounds (if any?) or shall I mark this as SOLVED?
also a question for @everyone, do you use grub auth prompt? does visually/actually backspace works as expected?

Edit2:
edited Edit

Last edited by 5hridhyan (2026-04-23 09:23:13)

Offline

#7 2026-04-23 15:59:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,855

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

According to https://savannah.gnu.org/bugs/?60114 this isn't merely visual, the terminal doesn't get to see the backspace

printf 'abcd\b' # this should happen
printf 'abcd' # this happens

So there's no workaround possible - the grub_printf => grub_gfxterm_putchar code needs to be fixed.

Offline

#8 2026-04-23 16:53:30

5hridhyan
Member
Registered: 2025-12-25
Posts: 824
Website

Re: [upstream bug][solved]Incorrect Backspace behavior in GRUB prompt

hmm, also one thing to clarify, I don't necessarily need to hold the backspace long, for example, if I type "5hrdh" then I press backspace two times so it becomes "5hrdh  " then I type normally, so it becomes "5hrdh  idhyan" and after I enter password, boot process continues as expected...

since now got know it's logic/behavior it shouldn't be a deal breaker, I'll consider this 2021 bug as a security feature no one asked for wink
anyways Thanks smile

Offline

Board footer

Powered by FluxBB