• Bug#859458: Because of displays with very high dpi, not only the keyboa

    From Jmkr@21:1/5 to All on Sun Mar 24 19:40:01 2024
    XPost: linux.debian.maint.boot

    Hello,

    I also hit this bug when switching from BIOS to UEFI boot process. Details for context are in the next paragraph, but feel free to skip to the QUESTION part:).

    After disabling the legacy BIOS support on my machines I noticed UEFI boot process uses the native LCD resolution. This causes smaller looking console fonts. It also makes GRUB use its GFXTERM font that in addition to being small has completely different
    style compared to "Uni2-VGA16.psf.gz". I previously used that ugly default looking font just to avoid even uglier noticeable font switching (during both booting and installing Debian). Thanks to Jörg Sommer's scripts I was finally able to set a much
    nicer and more adequately sized font ("Uni2-TerminusBold24x12.psf.gz") without noticeable font switching during booting. I did not finish integrating this into my customized Debian installer yet, but it is still a nice improvement for my machines.

    QUESTION:
    I have one question about INITRAMFS-TOOLS PREREQ mechanism. My other scripts use this redundant-looking "PREREQ" variable + "prereqs" function:
    ...
    PREREQ='...'

    prereqs () {
    echo "$PREREQ"
    }

    case "$1" in
    prereqs)
    prereqs
    exit 0;;
    esac
    ...
    I tested that all my INITRAMFS-TOOLS scripts work with this code or without it (= echo '...' directly in "case" statement like in Jörg's scripts) - at least the system boots fine. But I noticed that the INITRAMFS-TOOLS(7) manpage also recommends such
    code. So does anyone know if and why the "PREREQ" variable + "prereqs" function is really necessary?

    Regards,
    Jmkr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jmkr@21:1/5 to All on Tue Mar 26 23:40:01 2024
    XPost: linux.debian.maint.boot

    I checked the INITRAMFS-TOOLS source code and the "PREREQ" variable + "prereqs" function seems redundant - details are in a new bug I submitted:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067804

    I also found an alternative to Jörg's scripts that could be useful for Plymouth boot splash users:
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857132#207

    Although Plymouth is not installed on my systems I adapted some safety check bits from those scripts for my systems. So thanks again Jörg Sommer and Pedro Dias:).

    Regards,
    Jmkr

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jmkr@21:1/5 to All on Fri Mar 29 20:50:01 2024
    XPost: linux.debian.maint.boot

    Here you go. Both scripts are in the attached "SCRIPTS.txt". Note that on my systems I keep only the one PSF font that I actually use, so my hook script does not need to update cached fonts + my systems are without PLYMOUTH. Check Pedro's scripts if you
    need to handle those more complex usages.

    Regards,
    Jmkr
    --=_7a81d912719e12b31baa7574 283bd0-d55f-5fbb-98e0-3ec059c218d8_Content-Type: text/plain;
    name=SCRIPTS.txt
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: attachment;
    size99;
    filename=SCRIPTS.txt

    SCRIPT 1 "/etc/initramfs-tools/hooks/console-setup":#!/bin/shcase "$1" in prereqs) echo 'keymap' exit 0;;esac. /usr/share/initramfs-tools/hook-functionsif [ -x /bin/plymouth ]; then echo 'W: Graphical boot splash prevents
    setting console fonts.'fifontfile=$(ls -1 -t /etc/console-setup/cached_*.psf.gz 2>/dev/null | head -n 1)if [ -n "$fontfile" ] && [ -r "$fontfile" ]; then copy_exec /bin/setfont copy_file font "$fontfile"fiif [ ! -x "$DESTDIR"/bin/setfont ]
    ; then echo 'E: Failed to copy the "/bin/setfont" executable.' exit 1fiif [ ! -r "$DESTDIR$fontfile" ]; then echo "E: Failed to copy the \"$fontfile\" file." exit 1fi--------------------------------------------------------------------
    --SCRIPT 2 "/etc/initramfs-tools/scripts/init-top/console-setup":#!/bin/shcase "$1" in prereqs) echo 'udev keymap' exit 0;;esacfontfile=$(ls -1 -t /etc/console-setup/cached_*.psf.gz 2>/dev/null | head -n 1)if [ -x /bin/
    setfont ] && [ -n "$fontfile" ] && [ -r "$fontfile" ]; then setfont "$fontfile"fi

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)