Bug 19917 - drakboot fails/exits when a crypto-device listed in /etc/crypttab is not yet mapped/luksOpened
Summary: drakboot fails/exits when a crypto-device listed in /etc/crypttab is not yet ...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-09 08:28 CET by Xavier Matz
Modified: 2016-12-11 11:15 CET (History)
1 user (show)

See Also:
Source RPM: drakxtools-17.60-1.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Xavier Matz 2016-12-09 08:28:02 CET
Description of problem:
drakboot fails/exits with an exception immediately upon execution (before any gui appears) when it encounters an entry in /etc/crypttab for which the mapper device does not yet exist (i.e. device not yet luksOpened).
A common luks/crypttab use case where this problem happens is when a line in /etc/crypttab contains the "noauto" option so as to not prompt for the luks password at boot time but only later when explicitely required by a user (e.g. by clicking on the device in the file manager).
Relevant lines of error message - quote:
-----
device-mapper: table ioctl on myluks failed: No such device or address
Command failed
INTERNAL ERROR: unknown device mapper/myluks
MDK::Common::Various::internal_error() called from /usr/lib/libDrakX/devices.pm:131
-----

Version-Release number of selected component (if applicable):
17.60 (tested here), but this probably also affects earlier versions as well

How reproducible:
always

Steps to Reproduce:
1. define a crypto-device in /etc/crypttab with the "noauto" option, e.g.
myluks /dev/mapper/vg--mga-lv_myluks none luks,noauto
2. reboot (probably unnecessary, but in my case the crypttab was defined long ago, so i mention it just in case it would unexpectedly not be reproducible without that)
3. start drakboot. observe how it fails/exits
Comment 1 Xavier Matz 2016-12-09 08:35:53 CET
full error output (quote):
---------------------
# drakboot
Ignore the following Glib::Object::Introspection & Gtk3 warnings
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.
Subroutine Gtk3::main redefined at /usr/lib/perl5/vendor_perl/5.22.2/Gtk3.pm line 525.
device-mapper: table ioctl on myluks failed: No such device or address
Command failed
INTERNAL ERROR: unknown device mapper/myluks
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:106
fsedit::dmcrypts() called from /usr/lib/libDrakX/fsedit.pm:319
fsedit::get_hds() called from /usr/libexec/drakboot:35
Comment 2 Xavier Matz 2016-12-09 08:41:28 CET
note: drakboot shouldn't expect all mapper devices listed in crypttab to actually exist (i.e. be mapped/luksOpened)
Comment 3 Xavier Matz 2016-12-09 08:43:04 CET
possibly related to:
https://bugs.mageia.org/show_bug.cgi?id=16492
Marja Van Waes 2016-12-11 11:15:41 CET

CC: (none) => marja11
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=16492
Assignee: bugsquad => mageiatools


Note You need to log in before you can comment on or make changes to this bug.