diff options
author | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2023-08-14 17:00:34 -0400 |
---|---|---|
committer | Samuel Dionne-Riel <samuel@dionne-riel.com> | 2023-09-06 14:09:02 -0400 |
commit | 080bff8159de296aada63205a64d5b08d309b345 (patch) | |
tree | 2f75926ce1b7acd80f57a5fe1f70d0ecff675da6 /nixos/modules/installer/cd-dvd | |
parent | fad94acaa895bc702e6920579b86c8d9bd9bb42f (diff) |
nixos/iso-image: Use intrinsic UEFI console for serial output in GRUB
The `serial` console hangs on some systems. Unknown why.
Anyway, the way this worked right now relied on it telling the user on
the UEFI console how to enable it. So if I understand it correctly, it
will not cause any regression there.
Diffstat (limited to 'nixos/modules/installer/cd-dvd')
-rw-r--r-- | nixos/modules/installer/cd-dvd/iso-image.nix | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 7f56421ba139..99c3779119f4 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -201,11 +201,11 @@ let if [ "\$textmode" != "true" -a "\$with_fonts" == "true" ]; then # Use graphical term, it can be either with background image or a theme. # input is "console", while output is "gfxterm". - # This enables "serial" input and output only when possible. # Otherwise the failure mode is to not even enable gfxterm. + # Note that "with_serial" relies on the EFI console. if test "\$with_serial" == "yes"; then - terminal_output gfxterm serial - terminal_input console serial + terminal_output console + terminal_input console else terminal_output gfxterm terminal_input console @@ -336,12 +336,11 @@ let # → serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 # This uses the defaults, and makes the serial terminal available. set with_serial=no - if serial; then set with_serial=yes ;fi export with_serial clear set timeout=${toString grubEfiTimeout} - # This message will only be viewable when "gfxterm" is not used. + # This message will only be viewable on the default (UEFI) console. echo "" echo "Loading graphical boot menu..." echo "" @@ -352,12 +351,14 @@ let hiddenentry 'Text mode' --hotkey 't' { loadfont (\$root)/EFI/boot/unicode.pf2 + set with_serial=yes set textmode=true - terminal_output gfxterm console + terminal_output console } hiddenentry 'GUI mode' --hotkey 'g' { $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n") set textmode=false + set with_serial=no terminal_output gfxterm } |