You are not logged in.

#1 2023-02-02 21:18:12

espritlibre
Member
Registered: 2022-12-15
Posts: 126

tiny luks encryption password prompt HiDPi

i have a HiDPi screen on my notebook and the "Enter passphrase for hd0.gpt2 (.......) prompt is tiny. when setting up this system i followed the archwiki and was able to fix the tiny font for grub and after. the password prompt was low priority and so far i haven't made any progress.
can anyone help me to get this fixed?

 $ cat /etc/mkinitcpio.conf
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(intel_agp i915)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=(/root/cryptlvm.keyfile)

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"
$ cat /etc/vconsole.conf                                                     
KEYMAP=de

Offline

#2 2023-02-02 21:50:06

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: tiny luks encryption password prompt HiDPi

Offline

#3 2023-02-03 00:10:51

espritlibre
Member
Registered: 2022-12-15
Posts: 126

Re: tiny luks encryption password prompt HiDPi

yes, i tried kernel parameter

fbcon=font:TER16x32

and in /etc/vconsole.conf

FONT=ter-132n

to no avail

Last edited by espritlibre (2023-02-03 00:11:40)

Offline

#4 2023-02-03 04:10:38

topcat01
Member
Registered: 2019-09-17
Posts: 123

Re: tiny luks encryption password prompt HiDPi

Assuming that the vconsole.conf setting took and the font after booting is fine, did you regenerate the initramfs? Otherwise the consolefont hook would not run and copy the setting to the initramfs, which is where the password prompt comes from.

Offline

#5 2023-02-05 17:03:48

espritlibre
Member
Registered: 2022-12-15
Posts: 126

Re: tiny luks encryption password prompt HiDPi

yes, i did run:

sudo mkinitcpio -P

after the change in vconsole.conf
i'm not sure but i think i noticed a small change in the font after the grub screen, but there's definitely no change in size in the password prompt before grub.

Offline

#6 2023-02-05 21:01:20

topcat01
Member
Registered: 2019-09-17
Posts: 123

Re: tiny luks encryption password prompt HiDPi

The LUKS prompt is after the bootloader though so I'm not sure what the prompt before GRUB is.

Offline

#7 2023-02-05 22:57:20

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: tiny luks encryption password prompt HiDPi

For grub's early cryptomount prompt (encrypted /boot), you'd have to embed font and font configuration into grub's core.img (or whatever drives grub before /boot is decrypted).

Unfortunately it's more complicated than it should be. grub-install randomly puts stuff together (including a cryptomount command if GRUB_ENABLE_CRYPTODISK is set), instead of just letting you work with these files directly. And then half the options aren't described and other half don't work (`grub-install --core-compress=none` → "grub-install: --core-compress: (PROGRAM ERROR) Option should have been recognized!?"). Well, grub-install does have a --font option, but…

So while Grub would be capable of it (in theory) — you have to finagle it on your own somehow (possibly with grub-mkimage) and it's not well documented how to do so. Grub on one hand is extremely powerful with tons of modules and customizable with its own config file syntax and everything, and on the other hand wants to be this automatic, auto-installed, auto-generated configuration, auto-detect raid/crypto/lvm … thing that "just works" where no one understands the internal working mechanism anymore and doesn't let you set things up yourself.

https://www.gnu.org/software/grub/manua … ation.html

----

If you're really determined with encrypting kernel+initramfs (but fine with unencrypted bootloader) you could split your boot partition in two, one partition for grub (grub modules, grub.cfg) and another partition for your kernel+initramfs.

This way, Grub would reach its modules and configs without GRUB_ENABLE:CRYPTODISK shenanigans) and you could handle cryptomount yourself in the full grub.cfg (and load another grub.cfg with your menuentries from the encrypted part).

That would give you more control and you could easily load the font before cryptomount.

Or just ditch encrypting /boot altogether. It's not worth the hassle.

Last edited by frostschutz (2023-02-05 23:15:04)

Offline

#8 2023-02-05 23:12:03

topcat01
Member
Registered: 2019-09-17
Posts: 123

Re: tiny luks encryption password prompt HiDPi

topcat01 wrote:

The LUKS prompt is after the bootloader though so I'm not sure what the prompt before GRUB is.

My bad. Missed the fact that /boot is encrypted, sorry.

Offline

Board footer

Powered by FluxBB