Ubuntu

There should be a way to hide the menu in os-prober

Reported by Agostino Russo on 2009-09-12
182
This bug affects 38 people
Affects Status Importance Assigned to Milestone
elementary OS
Undecided
Unassigned
grub
Unknown
Unknown
grub2 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: grub2

In some cases, it might be desirable to hide the boot menu even if other OS are discovered. For instance in Wubi case, the grub menu is shown after the windows one, so it becomes confusing.

GRUB_HIDDEN_TIMEOUT could be used to specify that the menu has to be hidden or possibly some other variable could be used to that effect.

--- 30_os-prober.orig 2009-09-12 11:12:24.000000000 +0100
+++ 30_os-prober 2009-09-12 11:32:57.000000000 +0100
@@ -25,8 +25,7 @@
 found_other_os=

 adjust_timeout () {
- if [ "x${found_other_os}" = "x" ] ; then
- if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
+ if [ "x${found_other_os}" = "x" ] || [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
       if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
  verbose=
       else
@@ -54,7 +53,6 @@
 fi
 EOF
       fi
- fi
   fi
 }

Zakhar (alainb06) wrote :

I vote for this !

In fact there is a REGRESSION.

On previous Grub (Grub Legacy) you could parameter wether you want to display only the countdown or the entire menu.
This was done independantly of the number of O.S.es you got on your system.

Now the new system is very confusing.
It has two variables :
GRUB_HIDDEN_TIMEOUT
GRUB_HIDDEN_TIMEOUT_QUIET

And the documentation describes what these variables do... but it is unclear why the programmer decided these variables would do nothing at all if several O.S. are found on your platform.

I DO have several O.S. on my PC, and I like to have ONLY the countdown. I found it much more clean that a screen display full af lines of code.

Whenever I'd like to boot a different O.S. than the default one, I don't care having to type one keystroke more than I would with the direct display of the O.S. list, because this situation is quite an exception.

So please... give us back this feature !

[And for the moment, I apply the patch suggested -I did one myself in fact, which is not so clean but works fine-]

Gabe Gorelick (gabegorelick) wrote :

Have you actually tried setting GRUB_HIDDEN_TIMEOUT=0 in /etc/default/grub? I haven't tested it, but the documentation [1] seems to imply that if set to 0 it will disable displaying the grub menu. The value is only non-zero by default if os-prober finds another OS but it looks like the user is free to change it. Make sure to run update-grub after though.

[1] https://wiki.ubuntu.com/Grub2

Changed in grub2 (Ubuntu):
status: New → Incomplete

The documentation describes what is the intended behaviour, however, without the patch the os-prober does not work that way.

Gabe Gorelick (gabegorelick) wrote :

@Matija which patch?

affects: grub2 (Ubuntu) → os-prober (Ubuntu)
Changed in os-prober (Ubuntu):
status: Incomplete → New

The one carelessly copy-pasted into the report by the bug reporter. :)

Gabe Gorelick (gabegorelick) wrote :

Oh, that one ;)

Gabe Gorelick (gabegorelick) wrote :

Well I guess the patch should actually be in patch form from Launchpad's perspective. This is just a copy and paste of the above patch, which I haven't tested at all.

tags: added: patch
Ari (ari-reads) wrote :

this issue still affects maverick / 10.10

Colin Watson (cjwatson) on 2011-01-07
affects: os-prober (Ubuntu) → grub2 (Ubuntu)
Lukáš Chmela (lukaschmela) wrote :

I can confirm that this is still an issue in Ubuntu Maverick

Does anybody care?!

Changed in grub2 (Ubuntu):
status: New → Confirmed
Aaron Culliney (n-devnull) wrote :

Same problem in Ubuntu 11.10. The diff below lets me both do os-probe and hide the menu:

--- 30_os-prober.orig 2012-03-09 15:50:25.284234362 -1000
+++ 30_os-prober 2012-03-09 15:51:07.924232579 -1000
@@ -26,7 +26,6 @@
 found_other_os=

 make_timeout () {
- if [ "x${found_other_os}" = "x" ] ; then
     if [ "x${1}" != "x" ] ; then
       if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
  verbose=
@@ -60,7 +59,6 @@
 EOF
       fi
     fi
- fi
 }

Simon Richard (saymonz) wrote :

I just lose half an hour trying to apply what the documentation says to have my menu hidden untill I press a key on boot. All because of this really simple bug which have been reported more than two years ago. PLEASE FIX IT IN 12.04.

Hello,

1) Use case

The "feature" of disabling the menu hide feature when there are several OSes seems nonsense to me.

Use case : administrator Joe in company FooSoft creates hard disk master image for the company's computers, with several partitions (for main OS, alternate OS, dedicated diagnostic/recovery tools, dedicated partition for machine re-image from hard disk), all selectable through the main grub menu. To avoid confusing users, he wants to hide the menu (like with older grub versions).

2) Current stats

The patch from comment #7 does not apply in 12.04. Patch from comment #10 looks like it can be applied as-is on 12.04.

Is the (in-text) patch from comment #10 considered clean ? Can it break some features in some cases ?

Xiaojun Ma (damage3025) wrote :

Hi, all.

I'm using Ubuntu 12.04 and Mac OS X dual-boot.
For my case, the GRUB cannot boot my OS X correctly, so I also want to hide OS X entries.

It turns out that the hidding steps are quite straightforward:
sudo chmod -x /etc/grub.d/30_os-prober
sudo update-grub

You may refer to Wiki document:
https://help.ubuntu.com/community/Grub2/CustomMenus

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.