nixos/iso-image: Remove leftover false dichotomy between console/serial
Relying on the built-in UEFI console here was already necessary, so we are losing nothing by removing the needless `serial` call, which hung some systems. This also makes the implementation much easier to understand. Also, no ugly-font menu anymore!
This commit is contained in:
parent
7fa7158c60
commit
2de1bd778c
1 changed files with 10 additions and 28 deletions
|
@ -200,25 +200,13 @@ let
|
||||||
"auto"
|
"auto"
|
||||||
]}
|
]}
|
||||||
|
|
||||||
# Fonts can be loaded?
|
if [ "\$textmode" == "false" ]; then
|
||||||
# (This font is assumed to always be provided as a fallback by NixOS)
|
terminal_output gfxterm
|
||||||
if loadfont (\$root)/EFI/boot/unicode.pf2; then
|
terminal_input console
|
||||||
set with_fonts=true
|
|
||||||
fi
|
|
||||||
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".
|
|
||||||
# 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 console
|
|
||||||
terminal_input console
|
|
||||||
else
|
|
||||||
terminal_output gfxterm
|
|
||||||
terminal_input console
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
# Sets colors for the non-graphical term.
|
terminal_output console
|
||||||
|
terminal_input console
|
||||||
|
# Sets colors for console term.
|
||||||
set menu_color_normal=cyan/blue
|
set menu_color_normal=cyan/blue
|
||||||
set menu_color_highlight=white/blue
|
set menu_color_highlight=white/blue
|
||||||
fi
|
fi
|
||||||
|
@ -288,6 +276,9 @@ let
|
||||||
"search_fs_uuid"
|
"search_fs_uuid"
|
||||||
"search_fs_file"
|
"search_fs_file"
|
||||||
"echo"
|
"echo"
|
||||||
|
|
||||||
|
# We're not using it anymore, but we'll leave it in so it can be used
|
||||||
|
# by user, with the console using "C"
|
||||||
"serial"
|
"serial"
|
||||||
|
|
||||||
# Graphical mode stuff
|
# Graphical mode stuff
|
||||||
|
@ -330,17 +321,10 @@ let
|
||||||
|
|
||||||
cat <<EOF > $out/EFI/boot/grub.cfg
|
cat <<EOF > $out/EFI/boot/grub.cfg
|
||||||
|
|
||||||
set with_fonts=false
|
|
||||||
set textmode=${boolToString (config.isoImage.forceTextMode)}
|
set textmode=${boolToString (config.isoImage.forceTextMode)}
|
||||||
# If you want to use serial for "terminal_*" commands, you need to set one up:
|
|
||||||
# Example manual configuration:
|
|
||||||
# → 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
|
|
||||||
export with_serial
|
|
||||||
clear
|
|
||||||
set timeout=${toString grubEfiTimeout}
|
set timeout=${toString grubEfiTimeout}
|
||||||
|
|
||||||
|
clear
|
||||||
# This message will only be viewable on the default (UEFI) console.
|
# This message will only be viewable on the default (UEFI) console.
|
||||||
echo ""
|
echo ""
|
||||||
echo "Loading graphical boot menu..."
|
echo "Loading graphical boot menu..."
|
||||||
|
@ -352,14 +336,12 @@ let
|
||||||
|
|
||||||
hiddenentry 'Text mode' --hotkey 't' {
|
hiddenentry 'Text mode' --hotkey 't' {
|
||||||
loadfont (\$root)/EFI/boot/unicode.pf2
|
loadfont (\$root)/EFI/boot/unicode.pf2
|
||||||
set with_serial=yes
|
|
||||||
set textmode=true
|
set textmode=true
|
||||||
terminal_output console
|
terminal_output console
|
||||||
}
|
}
|
||||||
hiddenentry 'GUI mode' --hotkey 'g' {
|
hiddenentry 'GUI mode' --hotkey 'g' {
|
||||||
$(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n")
|
$(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n")
|
||||||
set textmode=false
|
set textmode=false
|
||||||
set with_serial=no
|
|
||||||
terminal_output gfxterm
|
terminal_output gfxterm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue