From d128632c137c19334a278ff105abe25dab993b44 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 14 Apr 2019 18:26:51 +0100 Subject: Fix resizing of encrypted partitions (mga#22032) When performing a lossy resize, we must make sure luksOpen is called *after* the partition table has been written and the kernel has been informed of the new size. The simplest fix is to write the partition table at the time the user requests the resize, as we already do for a lossless resize. --- perl-install/NEWS | 2 ++ perl-install/diskdrake/interactive.pm | 2 +- perl-install/install/NEWS | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index 0d5935000..fff4b3d3d 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- diskdrake: fix resize of encrypted partitions (mga#22032) + Version 18.11 - 16 March 2019 - recognize new kernel 5.0 drivers diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 7521e8685..0b1ed6b44 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -860,7 +860,7 @@ sub Resize { partition_table::will_tell_kernel($hd, resize => $low_part); partition_table::adjust_local_extended($hd, $low_part); partition_table::adjust_main_extended($hd); - write_partitions($in, $hd) or return if $write_partitions && %nice_resize; + write_partitions($in, $hd) or return if $write_partitions && (%nice_resize || isLUKS($part)); if ($write_partitions && isLUKS($part)) { require fs::dmcrypt; fs::dmcrypt::open_part([], $low_part); diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 36f81f341..01fe86fa0 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- partitioning: fix resize of encrypted partitions (mga#22032) + Version 18.12 - 16 March 2019 - don't preselect Nonfree 32bit media (mga#23927) -- cgit v1.2.1