Skip to content

Commit

Permalink
add option to disable os-prober
Browse files Browse the repository at this point in the history
os-prober may slow the grub2-mkconfig a lot if many guest os are
set up in different partitions thus we have to offer an option to
disable os-prober and related grub2 scripts from running in order
to alleviate this situration (bnc#775862).
  • Loading branch information
WenhuaChang committed Aug 30, 2012
1 parent d6b8625 commit 6c5eb26
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/grub2/dialogs.ycp
Expand Up @@ -42,6 +42,7 @@ symbol Grub2LoaderDetailsDialog ()
`HBox (
`HSquash("distributor"),
"hiddenmenu",
"os_prober",
`HStretch ()
),
`HBox (
Expand All @@ -66,8 +67,8 @@ symbol Grub2LoaderDetailsDialog ()

string lt = BootCommon::getLoaderType (false);
list<string> widget_names = (lt == "grub2-efi")
? ["distributor", "hiddenmenu", "timeout", "append", "append_failsafe", "console", "default", "vgamode"]
: ["distributor", "activate","generic_mbr", "hiddenmenu", "timeout", "append", "append_failsafe", "console", "default", "vgamode"];
? ["distributor", "hiddenmenu", "os_prober", "timeout", "append", "append_failsafe", "console", "default", "vgamode"]
: ["distributor", "activate","generic_mbr", "hiddenmenu", "os_prober", "timeout", "append", "append_failsafe", "console", "default", "vgamode"];

string caption = _("Boot Loader Options");
return CWM::ShowAndRun ($[
Expand Down
3 changes: 3 additions & 0 deletions src/grub2/helps.ycp
Expand Up @@ -25,12 +25,15 @@ global map<string,string> grub2_help_messages = $[
_("<p><b>Vga Mode</b> defines the VGA mode the kernel should set the <i>console</i> to when booting.</p>"),
"append_failsafe" :
_("<p><b>Failsafe Kernel Command Line Parameter</b> lets you define failsafe parameters to pass to the kernel.</p>"),
"os_prober" :
_("<p><b>Probe Foreign OS</b> by means of os-prober for multiboot with other foreign distribution </p>"),
];

global map<string,string> grub2_descriptions = $[
"append" : _("O&ptional Kernel Command Line Parameter"),
"vgamode" : _("&Vga Mode"),
"append_failsafe" : _("&Failsafe Kernel Command Line Parameter"),
"os_prober" : _("Probe Foreign OS"),
];

} //EOF
Expand Down
2 changes: 2 additions & 0 deletions src/grub2/options.ycp
Expand Up @@ -191,6 +191,8 @@ map<string,map<string,any> > Grub2Options(){
grub_help_messages["generic_mbr"]:""),
"hiddenmenu" : CommonCheckboxWidget(grub_descriptions["hiddenmenu"]:"hidden menu",
grub_help_messages["hiddenmenu"]:""),
"os_prober" : CommonCheckboxWidget(grub2_descriptions["os_prober"]:"os_prober",
grub2_help_messages["os_prober"]:""),
"append" : CommonInputFieldWidget(grub2_descriptions["append"]:"append",
grub2_help_messages["append"]:""),
"append_failsafe" : CommonInputFieldWidget(grub2_descriptions["append_failsafe"]:"append_failsafe",
Expand Down
1 change: 1 addition & 0 deletions src/modules/BootGRUB2.ycp
Expand Up @@ -54,6 +54,7 @@ global map<string,string> StandardGlobals () {
"vgamode" : "",
"gfxmode" : "auto",
"terminal" : "gfxterm",
"os_prober" : "true",
];
}

Expand Down
1 change: 1 addition & 0 deletions src/modules/BootGRUB2EFI.ycp
Expand Up @@ -54,6 +54,7 @@ global map<string,string> StandardGlobals () {
"vgamode" : "",
"gfxmode" : "auto",
"terminal" : "gfxterm",
"os_prober" : "true",
];
}

Expand Down

0 comments on commit 6c5eb26

Please sign in to comment.