grub2 complains "error: unknown command `terminal'" if terminal_output gfxterm is false
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub |
Unknown
|
Unknown
|
|||
grub (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
grub2 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
terminal (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: grub-efi-amd64
grub2 on an EFI firmware based machine reports the error message: "error: uknown command `terminal'".
I believe this occurs because "terminal_output gfxterm" fails to initialise (because we cannot probe or set the graphics mode) and then grub2 falls back to trying to be backwardly compatible with terminal.mod that does not support terminal_output by executing the non-existent command "terminal gfxterm".
The offending code is:
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
A possible workaround that stops the error message is:
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
if terminal gfxterm ; then
true
fi
fi
This seems to fix the problem on an EFI firmware based PC. I hope this does not break the backward compatibility terminal.mod workaround too.
Related branches
tags: | added: grub2 |
tags: | added: amd64 |
Changed in terminal (Ubuntu): | |
status: | New → Invalid |
Changed in grub (Ubuntu): | |
status: | New → Invalid |
tags: | removed: amd64 grub2 |
Changed in grub2 (Ubuntu): | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in grub2 (Ubuntu): | |
status: | New → Triaged |
This is also occurring on a Sony Vaio PCG-SRX51 (and SRX41) that have regular PC BIOS and intel i815 video chipset. There is no kernel mode-setting with the chipset.