From b2d14de103846496a28592d14b8be13eec6e2abe Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 24 Nov 2018 18:58:10 +0000 Subject: Patch os-prober to prevent hang when running from Live system on USB stick. --- config/build.cfg | 10 +++++++++- patches/os-prober-hang-fix.patch | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 patches/os-prober-hang-fix.patch diff --git a/config/build.cfg b/config/build.cfg index d4943a1..b4ef58f 100644 --- a/config/build.cfg +++ b/config/build.cfg @@ -83,6 +83,9 @@ my $config = { # Provide a nicer UI for lxcontrol. 'Xdialog', + # Need to patch this to prevent hang when probing ISO partition. + 'os-prober', + if_($has_gnome, 'task-gnome', 'adwaita-gtk2-theme', # Temporary fix for mga#20868. @@ -140,7 +143,7 @@ my $config = { 'broadcom-ssb-config', 'dkms', 'efibootmgr', 'efivar', 'refind', - 'grub2', 'grub2-efi', 'grub2-mageia-theme', 'os-prober', + 'grub2', 'grub2-efi', 'grub2-mageia-theme', if_($arch eq 'i586', 'kernel-desktop586-devel-latest'), if_($arch eq 'x86_64', 'kernel-desktop-devel-latest'), @@ -230,6 +233,11 @@ my $config = { "/etc/ssh/ssh_host_*", ], patches => [ + # When running from a USB stick, os-prober runs dmsetup on the protective + # partition. This just failed in mga6, but in mga7 it hangs. As a workaround + # this patch causes os-prober to skip any partition containing an is9660 + # filesystem. + 'patches/os-prober-hang-fix.patch', ], final_fixes => join(';', if_($has_gnome, diff --git a/patches/os-prober-hang-fix.patch b/patches/os-prober-hang-fix.patch new file mode 100644 index 0000000..569e520 --- /dev/null +++ b/patches/os-prober-hang-fix.patch @@ -0,0 +1,12 @@ +--- usr/libexec/os-probes/50mounted-tests.orig 2018-11-22 22:58:34.980032815 +0000 ++++ usr/libexec/os-probes/50mounted-tests 2018-11-22 22:59:25.050369548 +0000 +@@ -38,6 +38,9 @@ + elif [ "$types" = swap ]; then + debug "$1 is a swap partition; skipping" + exit 0 ++elif [ "$types" = iso9660 ]; then ++ debug "$1 is a iso9660 partition; skipping" ++ exit 0 + elif [ "$types" = crypto_LUKS ]; then + debug "$1 is a LUKS partition; skipping" + exit 0 -- cgit v1.2.1