Package Details: grub-luks-keyfile-git 2:2.11-1

Git Clone URL: https://aur.archlinux.org/grub-luks-keyfile-git.git (read-only, click to copy)
Package Base: grub-luks-keyfile-git
Description: GNU GRand Unified Bootloader (2)
Upstream URL: https://www.gnu.org/software/grub/
Licenses: GPL3
Conflicts: grub-bios, grub-common, grub-efi-x86_64, grub-emu, grub-legacy
Provides: grub-bios, grub-common, grub-efi-x86_64, grub-emu
Replaces: grub-bios, grub-common, grub-efi-x86_64, grub-emu
Submitter: mxfm
Maintainer: None
Last Packager: mxfm
Votes: 1
Popularity: 0.000000
First Submitted: 2021-01-16 16:36 (UTC)
Last Updated: 2022-09-17 18:05 (UTC)

Dependencies (23)

Required by (3)

Sources (7)

Latest Comments

mxfm commented on 2023-04-06 18:41 (UTC)

I disown this package because I moved to gentoo and because plain mode patch was accepted into GRUB.

mxfm commented on 2022-01-06 14:59 (UTC)

The package is updated to use github repo instead of local patches. Github repo includes detached header and keyfiles patches from mainstream (replace patches 1 and 2 from previous patch set). They are expected to be included in next grub release. The github repo also includes updated patch to support plain encryption mode which is not yet sent to grub-devel.

mxfm commented on 2022-01-02 07:35 (UTC) (edited on 2022-01-02 07:35 (UTC) by mxfm)

Update. Big news from grub-devel mailing list (https://lists.gnu.org/archive/html/grub-devel/2022-01/msg00001.html): mainstream will soon add support for detached headers and keyfiles, so patches 0001 and 0002 will not be needed anymore. This leaves only plain dm-crypt patch (0004) in question, because other patches are not functional (multiple passphrase attempts and UUID comparison).

This is big news because there were several unsuccessfull attempts to accept these patches in grub mainstream in recent years (original patches were timesptamped in 2015 year).

mxfm commented on 2021-12-24 06:19 (UTC) (edited on 2021-12-24 06:25 (UTC) by mxfm)

Today grub mainstream applied series of patches (https://lists.gnu.org/archive/html/grub-devel/2021-12/msg00064.html) which improves/refactores cryptodisk grub module. Unfortunately this means that detached luks/plain dm-crypt/other patches became obsolete, I need some time to fix them. The alternative package grub-luks-keyfile (not git) is based on 2.06 version and therefore should work.

gamezelda commented on 2021-03-09 22:49 (UTC)

@mxfm: Every time I got a conflict I took some time to understand what was the intention behind both the changes in the patch and what changed upstream to cause the conflict, so all changes from upstream should be included. (Though in case there was some "copy-pasted" code instead of refactored code in the original patches I can't tell it, since I'm not very familiar with the grub code base.)

I didn't try to build grub-extras, but you seem to have figured it out already though :). I agree that upstreaming those patches would be a blessing, since they are quite large and conflict-prone.

mxfm commented on 2021-03-06 06:26 (UTC) (edited on 2021-03-06 13:24 (UTC) by mxfm)

@gamezelda Thanks for the feedback. It is good to know, that someone is also interested in these patches.

Yes, I followed the easy way and discarded some changes because there was a mess. I will try your patch #4. Does it include all upstream changes?

Btw, did you tried to compile grub-extras in PKGBUILD? It is a separate repo which contains some tools moved outside the grub core repo. Grub developers told that they are against including patch #4 (plain dm-crypt) but are fine, if it is included into extras as a separate module.

In January, when I was updating these patches I also planned to rewrite the patch #4 into a module to submit it to grub-extras. Including in the repo will greatly simplify keeping the patches up to date, because the patch #4 is the most time consuming. Unfortunately, for some reason grub autoconf ignores "export GRUB_CONTRIB" command in PKGBUILD, and I didn't have more time to fix it.

EDIT: It seems the problem was in bootstrap script. Recently grub compilation steps changed. Now autogen.sh is called by bootstrap.sh and is run in _prepare, before exporting GRUB_CONTRIB variable in _build_grub-common_and_bios().

gamezelda commented on 2021-03-05 20:13 (UTC)

I just recently finished rebasing the patches myself for the grub 2:2.04.r340.g8fcfd1e0f-1 which recently landed on the testing repo, and which includes some quite tricky parts to merge, and after I finished, I realized someone may have already done most of the job - facepalm.

However I found something of note by comparing your patches to mine, which is that in the original 4th patch ( https://grub.johnlane.ie/assets/0004-Cryptomount-support-plain-dm-crypt.patch ), there's a chunk where a part of grub-core/disk/luks.c:configure_ciphers is refactored into a new function grub-core/disk/cryptodisk.c:grub_cryptodisk_create.

At some point there were some other upstream refactors to configure_ciphers, which causes a mess which is quite tricky to merge. It looks like you discarded the deletion from configure_ciphers and kept the old version of the code from grub_cryptodisk_create, which causes the patches to miss some upstream changes like those (however nothing looks too important):

https://github.com/olafhering/grub/commit/1066336dc88ef59556be91003388d8a1dfd0fd91 https://github.com/olafhering/grub/commit/cf3a3acff057f61e6562fe07f7370a01bc634240#diff-bfdb726f85c56e03da19e56e055718dd74c29b8e71ce4d8c66e329fe2fe52bedL127

FWIW this is my rebased version of the patches, where I tried to pull the changes from configure_ciphers into grub_cryptodisk_create as best as I could: https://zealcharm.soon.it/grub2-lukskeyfile-rebased-2.04.r340.g8fcfd1e0f.tar.gz