HAMMER2 updates in master - will be brought into the current release for Christmas

Pierre-Alain TORET pierre-alain.toret+dragonflybsd at protonmail.com
Sun Dec 16 11:40:12 PST 2018


Hello all,

I'm also using Hammer2 on top of an encrypted device on my laptop, no problem until now.
I just want to share the details that made me able to unencrypt my device using the appropriate keyboard layout (makes it much easier to type non-alphanumeric characters). Here are the steps I had to follow to modify the initrd.

Copy the keyboard layout into initrd sources
cp /usr/src/share/syscons/keymaps/fr.iso.kbd /usr/src/initrd/etc/


Create a little rc script /usr/src/initrd/etc/rc.kbdfr to apply the layout
#!/bin/sh
echo "Setting the keyboard to french layout"
/sbin/kbdcontrol -l /etc/fr.iso.kbd


In order to build the initrd with these additions, a few steps are needed.

First add new etc files to /usr/src/initrd/etc/Makefile.
-ETC_SCRIPTS=   rc rc.lvm2 rcmount_crypt rcmount_tcplay
+ETC_SCRIPTS=   rc rc.lvm2 rc.kbdfr fr.iso.kbd rcmount_crypt rcmount_tcplay

Then in usr.sbin section add kbdcontrol as a new binary that need to be compiled.
        fstyp           \
+       kbdcontrol      \
        pw              \

Finally add missing library required for kbdcontrol compilation
+CRUNCH_LIBS+= -ll # kbdcontrol

Then use initrd Makefile to build it and install it (backup /boot/kernel/initrd.img.gz just in case)

You can check it contains what you want with the following steps.
cp /boot/kernel/initrd.img.gz ~
gunzip initrd.img.gz
vnconfig vn0 initrd.img
mount /dev/vn0 /mnt
Then check that /mnt/etc/rc.kbdfr and /mnt/etc/fr.iso.kbd exist.
Also check that /mnt/sbin/kbdcontrol exists and that you can run it without errors.
Then
umount /mnt
vnconfig -u vn0

I'm wondering maybe I should add it to the website. It can be helpful for non-qwerty users.

Regards,


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday 12 December 2018 11:40, Aaron LI <aly at aaronly.me> wrote:

> On Wed, 12 Dec 2018 11:25:45 +0100
> Daniel Bilik ddb at neosystem.org wrote:
>
> > Is anyone using H2 on dm_target_crypt(4) device? Is initrd(7) ready for
> > this? Is it considered stable?
>
> Hi Daniel,
>
> dm_target_crypt(4) is independent of the filesystem on it. The initrd(7) already supports HAMMER2 for about a year. I'm running a small VPS with such a setup since March. I regard it as very stable.
>
> Cheers,
>
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Aaron





More information about the Users mailing list