[Bug 997322] New: disable os-prober per default
http://bugzilla.suse.com/show_bug.cgi?id=997322 Bug ID: 997322 Summary: disable os-prober per default Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.2 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Bootloader Assignee: jsrain@suse.com Reporter: ohering@suse.com QA Contact: jsrain@suse.com Found By: --- Blocker: --- os-prober is a very expensive operation. During a fresh install nothing sets GRUB_DISABLE_OS_PROBER and as a result whatever pkg thinks it needs to create a grub.cfg will stall the install. 7 minutes in my case. 30-os_prober has just a single check for GRUB_DISABLE_OS_PROBER, and it checks only if its value is "true". Since per default the value is not set every fresh install will waste its time trying to find other installations on the attached disks. At the very end of the installation, after all pkgs are installed and after all posttrans scripts are called, yast will set GRUB_DISABLE_OS_PROBER= to the specified value and creates grub.cfg once more. In my case 3*7 minutes are wasted just in the os-prober calls. the correct thing to do is: --- /etc/grub.d/30_os-prober 2016-08-27 00:26:49.000000000 +0200 +++ 30_os-prober 2016-09-06 11:08:19.228331112 +0200 @@ -26,7 +26,7 @@ export TEXTDOMAINDIR="${datarootdir}/loc . "$pkgdatadir/grub-mkconfig_lib" -if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then +if [ "${GRUB_DISABLE_OS_PROBER}" != "false" ]; then exit 0 fi -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
Jiri Srain
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c1
Michael Chang
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c2
--- Comment #2 from Olaf Hering
How many disks your have, and are you running iSCSI disks ? We can't use your patch as it reverts grub.cfg by changing implicit default.
Its a single disk with 50 partitions. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c3
--- Comment #3 from Olaf Hering
And I think we have disabled it in SLES, not sure why Leap 42.2 didn't. Josef did you have idea ?
If that means yast, how would it help? During pkg install the defaults are used, and the proposed change helps. During %posttrans the defaults are used, and the proposed change helps. During bootloader installation the variable is written with the selected content and the proposed change covers that as well. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c4
--- Comment #4 from Michael Chang
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c5
--- Comment #5 from Olaf Hering
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c6
--- Comment #6 from Michael Chang
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c7
Josef Reidinger
Why don't you work out by yast2 or editing /etc/default/grub directly to disable os-prober but rather insist to invert the default if no explicit GRUB_DISABLE_OS_PROBER is set, and thus affect existing running installations. It works for your intention but may not be the case for others.
I expect issue Olaf have is that yast2 set this value at the end of installation, so if any part of rpm post install script call grub2-mkconfig, it will use default and default is to disable os_prober. So it is by default disabled on SLES, but only at the end of installation. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c8
--- Comment #8 from Olaf Hering
I expect issue Olaf have is that yast2 set this value at the end of installation, so if any part of rpm post install script call grub2-mkconfig, it will use default and default is to disable os_prober. So it is by default disabled on SLES, but only at the end of installation.
It would be cool if yast would write /etc/default/grub upfront. This would also fix the bug that yast in inst-sys reports an error if that file is not there, in case grub2 was not installed by accident. I guess it just tries to modify an existing file, instead of writing out the configured settings. I think any defaults should go into the code, instead of a config file. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c9
--- Comment #9 from Josef Reidinger
(In reply to Josef Reidinger from comment #7)
I expect issue Olaf have is that yast2 set this value at the end of installation, so if any part of rpm post install script call grub2-mkconfig, it will use default and default is to disable os_prober. So it is by default disabled on SLES, but only at the end of installation.
It would be cool if yast would write /etc/default/grub upfront.
I causes series of problems in past, like e.g. when /etc/default/grub get new option, then config written by yast missing it and there is no easy way for user to modify it as it is not there at all. Also not all options are configured by yast2 so it will be missing. Well, perfect solution would be to adapt it just after grub2 install, but it is not possible now. So we do not it the end.
This would also fix the bug that yast in inst-sys reports an error if that file is not there, in case grub2 was not installed by accident.
if yast2 is not installed, then you have more serious problem and any error report is good.
I guess it just tries to modify an existing file, instead of writing out the configured settings. I think any defaults should go into the code, instead of a config file.
YaST2 modify existing file, as it allows us to configure only option where we are interested, keep upstream config option comments and other stuff. From my POV, defaults should be in config file and not in code. Code just do more complex proposal that need to know e.g. storage setup, product or architecture specific stuff. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=997322
http://bugzilla.suse.com/show_bug.cgi?id=997322#c10
Michael Chang
participants (1)
-
bugzilla_noreply@novell.com