# Mender-convert grub add LUKS support

**URL:** https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124
**Category:** General Discussions
**Created:** [September 28, 2021, 1:36pm UTC](https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124 "2021-09-28T13:36:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [September 28, 2021, 1:36pm UTC](https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124/1 "2021-09-28T13:36:46Z")

</div>

Hi I’m working on adding LUKS support to mender-convert (can share wip branch). I have image generated by mkosi with LUKS encryption and then processed by updated mender-convert which create LUKS partitions again. When flashed to intel NUC boot fails because grub cannot load kernel from boot folder as partition is LUKS encrypted. According this: [GRUB - ArchWiki](https://wiki.archlinux.org/title/GRUB#Encrypted_/boot) grub should support LUKS. IIRC grub used in mender-convert is pre-compiled. Is there some project which is sued for compiling grub so I can extend and test? Ideas? Thanks.

---

<div class="post-metadata">

### Author: ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)
#### Post date: [September 29, 2021, 8:11am UTC](https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124/2 "2021-09-29T08:11:11Z")

</div>

Hey @MarekBelisko, the grub binaries are compiled in [this project](https://github.com/mendersoftware/grub-mender-grubenv/blob/master/.gitlab-ci.yml#L17-L29). Long term, we should probably move to upstream binaries, at least for x86, but there hasn’t been any work on that so far.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [September 30, 2021, 2:55pm UTC](https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124/3 "2021-09-30T14:55:42Z")

</div>

@kacf any ideas/comments on LUKS handling? Thanks.

---

<div class="post-metadata">

### Author: ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)
#### Post date: [October 1, 2021, 6:13am UTC](https://hub.mender.io/t/mender-convert-grub-add-luks-support/4124/4 "2021-10-01T06:13:47Z")

</div>

Tried yesterday to manually compile 2.06 grub it start but for LUKS partition it complain about unknown filesystem. According: [GRUB - ArchWiki](https://wiki.archlinux.org/title/GRUB#Encrypted_/boot) grub2 don’t support all luks2 PBKDF so I explicitely make build with: --pbkdf=pbkdf2 but still same. Even format partition as luks1 type which should be supported but still nothing. Funnily cryptomount asked for passphrase and it said invalid (even works same passphrase in linux). Keep posted here about progress.
