Is there GRUB patched for booting from partition encrypted with LUKS2?

I’ve tried patching by myself, and worked!
I only needed to apply grub-install_luks2.patch from AUR (en) - grub-improved-luks2-git.
Tested on NixOS 21.11.

/etc/nixos/configuration.nix

  nixpkgs.overlays = [
    (import ./overlays/grub2)
  ];

/etc/nixos/overlays/grub2/default.nix

(self: super: {
  grub2 = super.grub2.overrideAttrs (oldAttrs: {
    patches = oldAttrs.patches ++ [
      ./grub-install_luks2.patch
    ];
  });
})

Download ./grub-install_luks2.patch from above AUR package page and place it in /etc/nixos/overlays/grub2/.

I didn’t apply argon2 patches. It might work, I just haven’t tried that.

1 Like