Re: [systemd-devel] bluetooth keyboard support at boot, before cryptsetup?

2025-12-06 Thread Alexis


Le 27/02/2025 à 13:56, Mantas Mikulėnas a écrit :
On Thu, Feb 27, 2025 at 12:29 PM Lennart Poettering 
 wrote:


On So, 16.02.25 18:30, Alexis Hallebarde ([email protected]) wrote:
>    I have the impression that everything for this support, is
integrated but
>    that it is not active by default.
>
>    I want to talk about the bluetooth keyboard support at the
very beginning
>    of the system boot, just before entering the cryptsetup
password of our
>    hardrive.

This would require support for bluez to run in the initrd. This is not
an easy ask though, since at that point there is no D-Bus, and there
is no persistency. BT pairing generally requires some kind of storage
though.

Bluez would have to learn special support for this, i.e. store such
pairings in an EFI variable or so.


Might as well just import /var/lib/bluetooth/*/linkkeys into the 
initramfs then.


I think many BT controllers support storing link keys on the 
controller itself though? Specifically for early boot (I kind of 
recall that being mentioned in BitLocker context).


Dear Lennart, dear Mantas, dear Ulrich, thank you for taking the time to 
reply.


FYI, as suggested,  I opened a feature request on the Bluez GitHub 
repository:


Support Bluetooth keyboards in initrd for entering LUKS passphrase 
https://github.com/bluez/bluez/issues/1712




Re: [systemd-devel] bluetooth keyboard support at boot, before cryptsetup?

2025-02-27 Thread Mantas Mikulėnas
On Thu, Feb 27, 2025 at 12:29 PM Lennart Poettering 
wrote:

> On So, 16.02.25 18:30, Alexis Hallebarde ([email protected]) wrote:
>
> >Hello,
> >
> >I have the impression that everything for this support, is integrated
> but
> >that it is not active by default.
> >
> >I want to talk about the bluetooth keyboard support at the very
> beginning
> >of the system boot, just before entering the cryptsetup password of
> our
> >hardrive.
>
> This would require support for bluez to run in the initrd. This is not
> an easy ask though, since at that point there is no D-Bus, and there
> is no persistency. BT pairing generally requires some kind of storage
> though.
>
> Bluez would have to learn special support for this, i.e. store such
> pairings in an EFI variable or so.
>

Might as well just import /var/lib/bluetooth/*/linkkeys into the initramfs
then.

I think many BT controllers support storing link keys on the controller
itself though? Specifically for early boot (I kind of recall that being
mentioned in BitLocker context).

-- 
Mantas Mikulėnas


Re: [systemd-devel] bluetooth keyboard support at boot, before cryptsetup?

2025-02-27 Thread Lennart Poettering
On So, 16.02.25 18:30, Alexis Hallebarde ([email protected]) wrote:

>Hello,
>
>I have the impression that everything for this support, is integrated but
>that it is not active by default.
>
>I want to talk about the bluetooth keyboard support at the very beginning
>of the system boot, just before entering the cryptsetup password of our
>hardrive.

This would require support for bluez to run in the initrd. This is not
an easy ask though, since at that point there is no D-Bus, and there
is no persistency. BT pairing generally requires some kind of storage
though.

Bluez would have to learn special support for this, i.e. store such
pairings in an EFI variable or so.

But this is really not something we can add for you in systemd, it's
inherently something bluez has to figure out first, and which you then
need to convince the initrd maintainers to make use of.

Lennart

--
Lennart Poettering, Berlin