summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-02-20 21:42:27 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-02-25 11:47:26 +0000
commit37a48c57d0c295e29049d23d1d37a800e1ee24af (patch)
treefe5e218b1741a8ea615ca175170b43f8b7f7f2ae /perl-install
parentc7480899a8825b0a0791526eca0d811260346ab4 (diff)
downloaddrakx-37a48c57d0c295e29049d23d1d37a800e1ee24af.tar
drakx-37a48c57d0c295e29049d23d1d37a800e1ee24af.tar.gz
drakx-37a48c57d0c295e29049d23d1d37a800e1ee24af.tar.bz2
drakx-37a48c57d0c295e29049d23d1d37a800e1ee24af.tar.xz
drakx-37a48c57d0c295e29049d23d1d37a800e1ee24af.zip
Always tell the kernel about partition table changes when running the classic installer (mga#20074).
The automatic rescan of the partition table is triggered by udevd. The udev rule that causes this is not present on the cut-down system that runs the classic installer.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table/dos.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm
index 4e8dbf1f2..135d02208 100644
--- a/perl-install/partition_table/dos.pm
+++ b/perl-install/partition_table/dos.pm
@@ -281,10 +281,14 @@ sub end_write {
sub need_to_tell_kernel {
my ($hd) = @_;
- # If none of the partitions are mounted, the kernel will automatically rescan
- # the partition table. If any partitions are mounted, this doesn't happen, so
- # we need to tell the kernel what has changed.
- return any { $_->{isMounted} } partition_table::get_normal_parts($hd);
+ # Whenever udevd receives a change event for a raw disk device it is watching, it asks the kernel to
+ # rescan the partition table on that device by calling the BLKRRPART ioctl. This is only successful
+ # if none of the partitions on that device are currently mounted. So if any partitions are mounted,
+ # we need to tell the kernel what has changed ourselves.
+ # The udev/rules.d/60-block.rules file causes the raw disk devices to be watched by udev. This file is
+ # not present in the cut-down system used to run the classic installer, so we always need to tell the
+ # kernel in that case.
+ return ! -e '/usr/lib/udev/rules.d/60-block.rules' || any { $_->{isMounted} } partition_table::get_normal_parts($hd);
}
sub empty_raw { { raw => [ ({}) x $nb_primary ] } }