Bug 54282 - grub не расшифровывает luks раздел после изменения его пароля
Summary: grub не расшифровывает luks раздел после изменения его пароля
Status: CLOSED NOTABUG
Alias: None
Product: Альт Рабочая станция K
Classification: Distributions
Component: Ошибки работы (show other bugs)
Version: 11.0
Hardware: x86_64 Linux
: P5 normal
Assignee: Sergey V Turchin
QA Contact: qa-p8@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-15 12:06 MSK by Sergey Ivanov
Modified: 2025-05-23 12:08 MSK (History)
1 user (show)

See Also:


Attachments
luks log (2.77 KB, text/plain)
2025-05-15 12:06 MSK, Sergey Ivanov
no flags Details
grub luks error screenshot (44.29 KB, image/png)
2025-05-15 12:07 MSK, Sergey Ivanov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Ivanov 2025-05-15 12:06:46 MSK
Created attachment 18454 [details]
luks log

Образ:
alt-kworkstation-11.0-install-x86_64.iso
Установлен в режиме UEFI со следующей разбивкой диска:
NAME                                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                                      259:0    0 476,9G  0 disk  
├─sda1                                   259:1    0   511M  0 part  /boot/efi
├─sda2                                   259:2    0  14,1G  0 part  [SWAP]
└─sda3                                   259:3    0 462,3G  0 part  
  └─luks-XXXXXXXX-XXXX-XXXX-XXXX         253:0    0 462,3G  0 crypt /

После установки системы и обновления до p11 был поменян пароль на шифрованный раздел https://www.altlinux.org/Управление_шифрованными_разделами_LUKS
# cryptsetup luksChangeKey /dev/sda3  (полный лог приложил файлом)

После перезагрузки системы при попытке ввести пароль к шифрованному разделу grub пишет 'Invalid passphrase' (скриншот grub_luks_error.png), хотя в загруженной live системе данный раздел корректно расшифровывается через cryptsetup luksOpen
Comment 1 Sergey Ivanov 2025-05-15 12:07:18 MSK
Created attachment 18455 [details]
grub luks error screenshot
Comment 2 Egor Ignatov 2025-05-15 12:13:13 MSK
Grub не поддерживает argon2 pbkdf:
https://www.gnu.org/software/grub/manual/grub/grub.html#cryptomount

Для поддержки в grub, у cryptsetup нужно указывать `--pbkdf pbkdf2`
Comment 3 Sergey V Turchin 2025-05-23 11:09:46 MSK
(Ответ для Egor Ignatov на комментарий #2)
> Для поддержки в grub, у cryptsetup нужно указывать `--pbkdf pbkdf2`
Почему на live работает без этого? В самом grub автоматики не хватает?
Comment 4 Egor Ignatov 2025-05-23 12:08:38 MSK
(In reply to Sergey V Turchin from comment #3)
> (Ответ для Egor Ignatov на комментарий #2)
> > Для поддержки в grub, у cryptsetup нужно указывать `--pbkdf pbkdf2`
> Почему на live работает без этого? В самом grub автоматики не хватает?

Не понял что именно работает на live.

В grub на данный момент нет поддержки argon2 совсем: https://savannah.gnu.org/bugs/index.php?55093

А также:
https://git.savannah.gnu.org/cgit/grub.git/commit/?id=365e0cc3e7e44151c14dd29514c2f870b49f9755
>Note though that in the current version, only the PBKDF2 key derival function is
>supported. This can mostly attributed to the fact that the libgcrypt library
>currently has no support for either Argon2i or Argon2id, which are the remaining
>KDFs supported by LUKS2. It wouldn't have been much of a problem to bundle those
>algorithms with GRUB itself, but it was decided against that in order to keep
>down the number of patches required for initial LUKS2 support. Adding it in the
>future would be trivial, given that the code structure is already in place.