Bug 21767

Summary: Several drak tools crash on locked encrypted partitions
Product: Mageia Reporter: Foss Fan <fossfan+3>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED OLD QA Contact:
Severity: major    
Priority: Normal CC: 25u, fri, marja11, pterjan, yvesbrungard
Version: 6   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: drakxtools-17.88 CVE:
Status comment:

Description Foss Fan 2017-09-24 23:12:00 CEST
Problem:
several drak tools crash on a system with encrypted root

drakboot 
Too late to run INIT block at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.22.3/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_sda2 failed: Nie ma takiego urządzenia ani adresu
Command failed
INTERNAL ERROR: unknown device mapper/crypt_sda2
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/drakboot:35

drakdisk 
Too late to run INIT block at /usr/lib/perl5/vendor_perl/5.22.2/x86_64-linux-thread-multi/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.22.3/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_sda2 failed: Nie ma takiego urządzenia ani adresu
Command failed
INTERNAL ERROR: unknown device mapper/crypt_sda2
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/diskdrake:74


Reproducible: always

The system is freshly installed as Mageia 6 from netinstall iso in UEFI mode.
The disk has two partitions: EFI and encrypted /. Everything else seems to run fine.
Comment 1 Foss Fan 2017-09-24 23:12:43 CEST
Similar messages were in https://bugs.mageia.org/show_bug.cgi?id=19917
and https://bugs.mageia.org/show_bug.cgi?id=16492
Comment 2 Foss Fan 2017-09-24 23:19:52 CEST
Drakxtools version 17.88
Marja Van Waes 2017-09-25 22:19:01 CEST

Assignee: bugsquad => mageiatools
CC: (none) => marja11, pterjan
Source RPM: (none) => drakxtools-17.88.1-1.mga6
Summary: Drak tools crash on encrypted computer => Several drak tools crash on encrypted computer (INTERNAL ERROR: unknown device mapper/crypt_sda2)

Marja Van Waes 2017-09-25 22:22:56 CEST

Source RPM: drakxtools-17.88.1-1.mga6 => drakxtools-17.88

Comment 3 Foss Fan 2017-10-03 19:19:07 CEST
Also found in drakhardware 
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.22.3/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_sda2 failed: Nie ma takiego urządzenia ani adresu
Command failed
INTERNAL ERROR: unknown device mapper/crypt_sda2
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/drakhardware:389
Comment 4 Foss Fan 2017-10-03 19:20:04 CEST
Also prevents from using draktools to connect to NFS share.
Comment 5 papoteur 2017-10-04 10:46:09 CEST
Our documentation says that you need to have a boot directory on non encrypted partition.
I'm interesting to know if this assertion is false, as your system doesn't seem to respect this.
https://doc.mageia.org/installer/6/en/content/diskdrake.html
This is not explaining why mapper/crypt_sda2 is unknown.
I don't have the problem your report:
blkid
/dev/sda1: LABEL="SYSTEM" UUID="487B-F697" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="ebaa3867-a7b6-47d1-8fcc-b75160fa9169"
/dev/sda2: UUID="2670ef45-81b2-438f-9abf-1839f72ac553" TYPE="crypto_LUKS" PARTUUID="45994e59-defa-4f68-a858-d9952d4c4d4c"
/dev/sda3: UUID="772855c2-140b-4cb4-ada3-77754c2ee0a3" TYPE="swap" PARTUUID="c82cae4b-0f85-4ca6-8579-74674274da32"
/dev/sda4: UUID="ab106d36-dd70-4f01-b130-79d2b95e9840" TYPE="crypto_LUKS" PARTUUID="6b353bba-a934-4e06-80da-9f8434f42b09"
/dev/sda5: UUID="8e80fa4f-485b-4eeb-a042-a156209dfa9a" TYPE="ext4" PARTUUID="e0a4de16-acc4-417d-a762-f4d86dd4a8f1"
/dev/mapper/crypt_sda2: UUID="b51dfde9-aea6-4c65-b6f9-3c575ce8b87d" TYPE="ext4"
/dev/mapper/crypt_sda4: UUID="9b28b799-7232-4c5a-858b-b4b9d2f08405" TYPE="ext4"

CC: (none) => yves.brungard_mageia

Comment 6 Foss Fan 2017-11-12 16:26:12 CET
It may be connected to systemd error about cryptography setup for partition:

# systemctl status systemd-cryptsetup@crypt_sda2.service 
systemd-cryptsetup@crypt_sda2.service - Cryptography Setup for crypt_sda2
   Loaded: loaded (/etc/crypttab; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since nie 2017-11-12 16:11:36 CET; 5min ago
     Docs: man:crypttab(5)
           man:systemd-cryptsetup-generator(8)
           man:systemd-cryptsetup@.service(8)
  Process: 5537 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach crypt_sda2 /dev/disk/by-uui
 Main PID: 5537 (code=exited, status=1/FAILURE)

lis 12 16:11:34 localhost.localdomain systemd[1]: Starting Cryptography Setup for crypt_sda2...
lis 12 16:11:34 localhost.localdomain systemd-cryptsetup[5537]: Set cipher aes, mode xts-benbi, 
lis 12 16:11:36 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Main process exit
lis 12 16:11:36 LAP-AS-CH-B systemd[1]: Failed to start Cryptography Setup for crypt_sda2.
lis 12 16:11:36 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Unit entered fail
lis 12 16:11:36 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Failed with resul

The possibility of encrypting boot is very useful and possibly could protect against changing bootloader.
Please, help me solve couple of issues, and we can add to the feature list of Mageia system.
Comment 7 Foss Fan 2017-11-12 16:44:13 CET
systemctl start systemd-cryptsetup@crypt_sda2.service        
Please enter passphrase for disk SanDisk_SDSSDHII240G (crypt_sda2) on /! **               
Job for systemd-cryptsetup@crypt_sda2.service failed because the control process exited with error code.
See "systemctl status systemd-cryptsetup@crypt_sda2.service" and "journalctl -xe" for details.         
[root@LAP-AS-CH-B ~]# journalctl -xe                                                                            
lis 12 16:28:50 LAP-AS-CH-B systemd[1]: Starting Cryptography Setup for crypt_sda2...
-- Subject: Rozpoczęto uruchamianie jednostki systemd-cryptsetup@crypt_sda2.service                                       
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka systemd-cryptsetup@crypt_sda2.service rozpoczęła uruchamianie.
lis 12 16:28:53 LAP-AS-CH-B systemd-cryptsetup[26370]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/d
lis 12 16:28:56 LAP-AS-CH-B systemd-cryptsetup[26370]: Failed to activate: Device or resource busy
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Main process exited, code=exited, status=1/
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: Failed to start Cryptography Setup for crypt_sda2.
-- Subject: Jednostka systemd-cryptsetup@crypt_sda2.service się nie powiodła
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka systemd-cryptsetup@crypt_sda2.service się nie powiodła.
-- 
-- Wynik: failed.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: Dependency failed for dev-mapper-crypt_sda2.device.
-- Subject: Jednostka dev-mapper-crypt_sda2.device się nie powiodła
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka dev-mapper-crypt_sda2.device się nie powiodła.
-- 
-- Wynik: dependency.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: dev-mapper-crypt_sda2.device: Job dev-mapper-crypt_sda2.device/start failed with r
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Unit entered failed state.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Failed with result 'exit-code'.
...skipping...
lis 12 16:28:50 LAP-AS-CH-B systemd[1]: Starting Cryptography Setup for crypt_sda2...
-- Subject: Rozpoczęto uruchamianie jednostki systemd-cryptsetup@crypt_sda2.service
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka systemd-cryptsetup@crypt_sda2.service rozpoczęła uruchamianie.
lis 12 16:28:53 LAP-AS-CH-B systemd-cryptsetup[26370]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/d
lis 12 16:28:56 LAP-AS-CH-B systemd-cryptsetup[26370]: Failed to activate: Device or resource busy
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Main process exited, code=exited, status=1/
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: Failed to start Cryptography Setup for crypt_sda2.
-- Subject: Jednostka systemd-cryptsetup@crypt_sda2.service się nie powiodła
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka systemd-cryptsetup@crypt_sda2.service się nie powiodła.
-- 
-- Wynik: failed.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: Dependency failed for dev-mapper-crypt_sda2.device.
-- Subject: Jednostka dev-mapper-crypt_sda2.device się nie powiodła
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Jednostka dev-mapper-crypt_sda2.device się nie powiodła.
-- 
-- Wynik: dependency.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: dev-mapper-crypt_sda2.device: Job dev-mapper-crypt_sda2.device/start failed with r
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Unit entered failed state.
lis 12 16:28:56 LAP-AS-CH-B systemd[1]: systemd-cryptsetup@crypt_sda2.service: Failed with result 'exit-code'.
lines 1066-1093/1093 (END)
Comment 8 U 2019-11-24 22:40:53 CET
Hi!

I wanted to fill new bug report but found this one.

My hardware: Dell Inspiron 7786
My setup: dualboot Windows-Mageia. Mageia has encrypted partitions. \boot is not encrypted. Partitions were managed during initial GUI setup. System is up to date.

After some testing I've found:
-   When trying to boot without opening system partition system won't boot (fine, expected).
-   When trying to boot with system, user and other used (main directories mounted) partitions opened AND with empty partition opened system boots well and everything works fine.
BUT
- ! When trying to boot with system, user and other used (main directories mounted) partitions opened AND NOT with empty partition - it's closed - system boots well but several Mageia tools don't work.
I've checked and it crashed:
* diskdrake
* drakboot
* drakhardware
* draksnapshot-config 
* also cannot configure access to NFS shares (same crash).

Other tools like gparted works well.

Funny thing that if you open gparted, open last closed (empty) partition by entering correct password Mageia tools STILL CRASH! It was little surprising!



All partitions opened:
[root@localhost ~]# diskdrake 
Too late to run INIT block at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 525.

(diskdrake:8406): Gtk-WARNING **: 22:06:27.550: Theme parsing error: diskdrake.css:86:25: The style property GtkPaned:handle-size is deprecated and shouldn't be used anymore. It will be removed in a future version

(diskdrake:8406): Gtk-WARNING **: 22:06:27.554: Theme parsing error: diskdrake.css:86:25: The style property GtkPaned:handle-size is deprecated and shouldn't be used anymore. It will be removed in a future version
 WORKS!


1 partition closed (but it's empty):
[root@localhost ~]# diskdrake 
Too late to run INIT block at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_nvme0n1p8  failed: No such device or address
Command failed.
INTERNAL ERROR: unknown device mapper/crypt_nvme0n1p8
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/diskdrake:74


[root@localhost ~]# drakboot 
Too late to run INIT block at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_nvme0n1p8  failed: No such device or address
Command failed.
INTERNAL ERROR: unknown device mapper/crypt_nvme0n1p8
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/drakboot:35


[root@localhost ~]# drakhardware 
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 525.
device-mapper: table ioctl on crypt_nvme0n1p8  failed: No such device or address
Command failed.
INTERNAL ERROR: unknown device mapper/crypt_nvme0n1p8
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
devices::entry() called from /usr/lib/libDrakX/devices.pm:146
devices::make() called from /usr/lib/libDrakX/fs/type.pm:257
fs::type::call_blkid() called from /usr/lib/libDrakX/fs/type.pm:264
fs::type::type_subpart_from_magic() called from /usr/lib/libDrakX/fs/dmcrypt.pm:172
fs::dmcrypt::_get_existing_one() called from /usr/lib/libDrakX/fs/dmcrypt.pm:131
fs::dmcrypt::_get_existing_one_with_state() called from /usr/lib/libDrakX/fs/dmcrypt.pm:59
fs::dmcrypt::read_crypttab_() called from /usr/lib/libDrakX/fs/dmcrypt.pm:71
fs::dmcrypt::read_crypttab() called from /usr/lib/libDrakX/fsedit.pm:104
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:317
fsedit::get_hds() called from /usr/libexec/drakhardware:389


[root@localhost ~]# draksnapshot-config 
Subroutine Pango::Layout::set_text redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 2248.
Subroutine Pango::Layout::set_markup redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 2254.
GLib-GObject-WARNING **: cannot register existing type 'GtkWidget' at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-WARNING **: cannot add class private field to invalid type '<invalid>' at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-WARNING **: cannot add private field to invalid (non-instantiatable) type '<invalid>' at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-WARNING **: cannot register existing type 'GtkBuildable' at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-CRITICAL **: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.
GLib-GObject-WARNING **: cannot add private field to invalid (non-instantiatable) type '<invalid>' at /usr/lib64/perl5/vendor_perl/Glib/Object/Introspection.pm line 110.

And also cannot confogire access to NFS shares (same crash).

CC: (none) => 25u

Comment 9 U 2019-11-24 23:48:26 CET
Can someone update the summary of this bug, or should I start new one?

Oh, and my services:
[root@localhost ~]# systemctl list-units --state=failed
  UNIT                                       LOAD   ACTIVE SUB    DESCRIPTION                                   
● network.service                            loaded failed failed LSB: Bring up/down networking                 
● partmon.service                            loaded failed failed LSB: Checks if a partition is close to full up
● systemd-cryptsetup@crypt_nvme0n1p8.service loaded failed failed Cryptography Setup for crypt_nvme0n1p8        

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

3 loaded units listed.


[root@localhost ~]# systemctl status systemd-cryptsetup@crypt_nvme0n1p8.servicesystemd-cryptsetup@crypt_nvme0n1p8.service - Cryptography Setup for crypt_nvme0n1p8
   Loaded: loaded (/etc/crypttab; generated)
   Active: failed (Result: exit-code) since Sun 2019-11-24 22:08:35 CET; 1h 30min ago
     Docs: man:crypttab(5)
           man:systemd-cryptsetup-generator(8)
           man:systemd-cryptsetup@.service(8)
 Main PID: 1119 (code=exited, status=1/FAILURE)

Nov 24 22:08:22 localhost systemd-cryptsetup[1119]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/nvme0n1p8.
Nov 24 22:08:26 localhost systemd-cryptsetup[1119]: Failed to activate with specified passphrase. (Passphrase incorrect?)
Nov 24 22:08:30 localhost systemd-cryptsetup[1119]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/nvme0n1p8.
Nov 24 22:08:32 localhost systemd-cryptsetup[1119]: Failed to activate with specified passphrase. (Passphrase incorrect?)
Nov 24 22:08:33 localhost systemd-cryptsetup[1119]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/nvme0n1p8.
Nov 24 22:08:35 localhost systemd-cryptsetup[1119]: Failed to activate with specified passphrase. (Passphrase incorrect?)
Nov 24 22:08:35 localhost systemd-cryptsetup[1119]: Too many attempts to activate; giving up.
Nov 24 22:08:35 localhost systemd[1]: systemd-cryptsetup@crypt_nvme0n1p8.service: Main process exited, code=exited, status=1/FAILURE
Nov 24 22:08:35 localhost systemd[1]: systemd-cryptsetup@crypt_nvme0n1p8.service: Failed with result 'exit-code'.
Nov 24 22:08:35 localhost systemd[1]: Failed to start Cryptography Setup for crypt_nvme0n1p8.



After [root@localhost ~]# systemctl start systemd-cryptsetup@crypt_nvme0n1p8.service    and entering correct password I get:

[root@localhost ~]# systemctl status systemd-cryptsetup@crypt_nvme0n1p8.servicesystemd-cryptsetup@crypt_nvme0n1p8.service - Cryptography Setup for crypt_nvme0n1p8
   Loaded: loaded (/etc/crypttab; generated)
   Active: active (exited) since Sun 2019-11-24 23:40:04 CET; 5s ago
     Docs: man:crypttab(5)
           man:systemd-cryptsetup-generator(8)
           man:systemd-cryptsetup@.service(8)
  Process: 4969 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach crypt_nvme0n1p8 /dev/nvme0n1p8   (code=exited, status=0/SUCCESS)
 Main PID: 4969 (code=exited, status=0/SUCCESS)

Nov 24 23:40:01 localhost systemd[1]: Starting Cryptography Setup for crypt_nvme0n1p8...
Nov 24 23:40:01 localhost systemd-cryptsetup[4969]: Set cipher aes, mode xts-benbi, key size 512 bits for device /dev/nvme0n1p8.
Nov 24 23:40:04 localhost systemd[1]: Started Cryptography Setup for crypt_nvme0n1p8.

...and Mageia tools work. However, it's important that they work even if not all partitions are opened.

I can expect, in example, to use diskdrake and open encrypted partition in there.
Comment 10 Morgan Leijström 2020-05-10 16:50:25 CEST
Please,   

1) I this bug need a short clear summary in a comment and better header.  I try here, please correct if i am wrong.

2) Please can someone say if it still is a problem in Mageia 7 and/or cauldron, and update Version, Whiteboard and Source RPM fields above.



If i understand correctly, here is a summary:

========

§ Some drak tools crash if there exist an encrypted partition that is not unlocked.

§ As also diskdrake crash, there is no working GUI for unlocking.

========



FWIW, a tip:  I always use LVM, and often encrypt it and then it is only one key to give to unlock everything, so i have never had any problem like this.  Inside the LWM i have all partitions including swap, but excluding /boot and EFI, if needed.

CC: (none) => fri
Summary: Several drak tools crash on encrypted computer (INTERNAL ERROR: unknown device mapper/crypt_sda2) => Several drak tools crash on locked encrypted partitions

Comment 11 Marja Van Waes 2020-07-31 12:53:59 CEST
Thanks, Morgan.
There was no reply, so closing as OLD.

@ Foss

If your issue is still valid in  Mageia 7 or 8-cauldron, and you do indeed manage to boot while having /boot on an encrypted partition, then please file a bug report about our documentation saying "If you wish to use encryption on your / partition you must ensure that you have a separate /boot partition. The encryption option for the /boot partition must NOT be set, otherwise your system will be unbootable." https://doc.mageia.org/installer/7/en/content/diskPartitioning.html#diskdrake


@ U

Please file a separate bug report instead if your issue is still valid.

Status: NEW => RESOLVED
Resolution: (none) => OLD