diff options
-rw-r--r-- | rescue/NEWS | 1 | ||||
-rwxr-xr-x | rescue/bin/guessmounts | 16 | ||||
-rw-r--r-- | rescue/list.xml | 14 |
3 files changed, 31 insertions, 0 deletions
diff --git a/rescue/NEWS b/rescue/NEWS index 27349137b..5e4910f9c 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -2,6 +2,7 @@ o preset keyboard if DEBUG_INSTALL_LANG is set during build - do not preload all fs modules uselessly - guessmount: + o enable to repair encrypted LVMs/LUKS (mga#22795) o fix displaying the version of the distro o just use the fs reported by blkid instead of doing brute force guessing diff --git a/rescue/bin/guessmounts b/rescue/bin/guessmounts index 55d18ef58..c5dc5996b 100755 --- a/rescue/bin/guessmounts +++ b/rescue/bin/guessmounts @@ -58,6 +58,22 @@ if (@$raid_parts) { push @$normal_parts, @$raids; } +# Basically doing fsedit::dmcrypts(): +(my $luks_parts, $normal_parts) = partition { isRawLUKS($_) } @$normal_parts; +if (@$luks_parts) { + use interactive; + use interactive::curses; + require diskdrake::interactive; + my $in = interactive->vnew('su'); + my $all_hds = fsedit::get_hds({}, $in); + # Unlocking them in order to look at their fs (do they hold a Mageia installation): + foreach my $part (@$luks_parts) { + diskdrake::interactive::dmcrypt_open($in, undef, $part, $all_hds) + } + my @dmcrypts = fs::dmcrypt::get_existing(@$luks_parts); + push @$normal_parts, @dmcrypts; +} + my @roots; my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); diff --git a/rescue/list.xml b/rescue/list.xml index 63d045624..a5746d192 100644 --- a/rescue/list.xml +++ b/rescue/list.xml @@ -215,6 +215,7 @@ Exporter.pm File/Path.pm File/Basename.pm + File/Temp.pm <!-- required by diskdrake::interactive --> XSLoader.pm Symbol.pm SelectSaver.pm @@ -235,11 +236,16 @@ Encode/Unicode.pm auto/Encode/Unicode/Unicode.so DynaLoader.pm + File/Spec.pm <!-- required by File::Temp --> + File/Spec/Unix.pm <!-- required by File::Spec --> auto/IO/IO.so auto/Socket/Socket.so Errno.pm IO/Socket/INET.pm IO/Socket/UNIX.pm + List/Util.pm <!-- required by Scalar::Util --> + auto/List/Util/Util.so + Scalar/Util.pm <!-- required by File::Temp --> </from> <from expand="perl"> @@ -248,6 +254,11 @@ </from> </filter> +<from expand="rpm" matching="m!^/usr/(share|LIB)/perl5! and !/\.pod$/"> + perl-Curses <!-- required by Curses::UI --> + perl-Curses-UI <!-- required by interactive::curses --> +</from> + <from dir="/etc"> mke2fs.conf netconfig @@ -430,6 +441,9 @@ </from> <!-- Those are listed b/c collect-perl-files failed to detect them: --> <from dir="/usr/lib/libDrakX" expand="glob"> + interactive.pm <!-- required by diskdrake::interactive --> + interactive/curses.pm <!-- required by interactive --> + diskdrake/interactive.pm <!-- required by guessmount --> fs/dmraid.pm <!-- required by fsedit --> fs/remote.pm <!-- required by fs::remote::* --> fs/remote/davfs.pm <!-- required by fs --> |