I use LUKS over LVM setup with root and home volumes on one encrypted partition and I have a problem with usability. After selecting a GRUB option the black screen appears and there is no info about what’s happening whatsoever. I can type the password and the disk is decrypted and I get the system running, but there’s no visual feedback. If I start typing too early it will not work, if I misstype the password it will also fail (and it seems like I can’t enter again?).
I don’t think that’s a NixOS issue as I remember my brother having a similar problem on Manjaro some time ago, but I couldn’t find any relevant info anywhere, so I thought NixOS forum will be still my best bet.
Here is my config:
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelParams = [
# https://patchwork.kernel.org/patch/9285379/
"button.lid_init_state=open"
];
# Use the GRUB 2 boot loader.
boot.loader.grub = {
enable = true;
version = 2;
device = "nodev";
efiSupport = true;
gfxmodeEfi = "text";
gfxmodeBios = "text";
gfxpayloadEfi = "1920x1080";
gfxpayloadBios = "1920x1080";
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Grub menu is painted really slowly on HiDPI, so we lower the
# resolution. Unfortunately, scaling to 1280x720 (keeping aspect
# ratio) doesn't seem to work, so we just pick another low one.
#boot.loader.grub.gfxmodeEfi = "1920x1080";
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/disk/by-uuid/36f99f04-6525-49bf-b99f-49c62e59814d";
preLVM = true;
allowDiscards = true;
}
];
I tried different gfx settings and it doesn’t really change anything (other than GRUB appearance).
Cannot offer any help but I have the same problem. I have a setup similar to what’s described here Full Disk Encryption - NixOS Wiki under zimbatm’s recommendation.
Good question! I heard that I can use systemd, but honestly I wasn’t sure what’s the difference. Also, how do I uninstall GRUB? I tried just removing the entry, but it seems it didn’t remove GRUB. Is there any Nixos method or should I remove it like on other distros?
I know that I could just check it and use the live USB to fix it if it blows up, but I didn’t want to spend too much time on it as it’s not that pressing for me.
Ok, so I have some time to play with it and this is what I did:
Remove the boot.loader.grub entry from the configuration.nix file
Specify /boot/efi file system in the hardware-configuration.nix file (previously I didn’t have it properly configured). If you don’t know which is the EFI partition you can easily check with any partitioning tool (like fdisk)
Run sudo nixos-rebuild --install-bootloader switch
It worked and now I can actually see the password prompt properly.
Sure. When you configure a boot loader you can either let it create an efi directory on the boot partition or specify an EFI partition. If you decide to do the latter you basically set the following line:
boot.loader.efi.efiSysMountPoint = "/boot/efi";
But then /boot/efi needs to be a separate mounted filesystem, so you need to have a separate entry in the hardware configuration, for example: