Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.

Bug #1258597 reported by Tobiasz Jarczyk on 2013-12-06
692
This bug affects 147 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Medium
Unassigned
Trusty
Medium
Unassigned

Bug Description

When running update-grub I am getting the following message:

Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.

$ sudo update-grub
Generowanie grub.cfg...
Uwaga: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Znaleziono obraz Linuksa: /boot/vmlinuz-3.12.0-6-generic
Znaleziono obraz initrd: /boot/initrd.img-3.12.0-6-generic
Found memtest86+ image: /boot/memtest86+.elf
gotowe

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: grub2 (not installed)
ProcVersionSignature: Ubuntu 3.12.0-6.14-generic 3.12.3
Uname: Linux 3.12.0-6-generic x86_64
ApportVersion: 2.12.7-0ubuntu1
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Dec 6 18:49:28 2013
InstallationDate: Installed on 2013-10-15 (51 days ago)
InstallationMedia: Ubuntu-GNOME 13.10 "Saucy Salamander" - Release amd64 (20131015)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=pl_PL.UTF-8
 SHELL=/bin/bash
SourcePackage: grub2
UpgradeStatus: Upgraded to trusty on 2013-11-05 (31 days ago)

Sworddragon (sworddragon) wrote :

Confirming this on Ubuntu 14.04 dev with grub-pc 2.00-21 even with a completely new generated /etc/default/grub.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Changed in grub2 (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Simon Déziel (sdeziel) wrote :

This also recently started showing on Precise too.

Dariusz (milley) wrote :

Options GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET are deprecated in grub. Use

info -f grub -n 'Simple configuration'

and then you read in there:

`GRUB_HIDDEN_TIMEOUT'
     Wait this many seconds before displaying the menu. If <ESC> is
     pressed during that time, display the menu and wait for input
     according to `GRUB_TIMEOUT'. If a hotkey associated with a menu
     entry is pressed, boot the associated menu entry immediately. If
     the timeout expires before either of these happens, display the
     menu for the number of seconds specified in `GRUB_TIMEOUT' before
     booting the default entry.

     If you set `GRUB_HIDDEN_TIMEOUT', you should also set
     `GRUB_TIMEOUT=0' so that the menu is not displayed at all unless
     <ESC> is pressed.

     This option is unset by default, and is deprecated in favour of
     the less confusing `GRUB_TIMEOUT_STYLE=countdown' or
     `GRUB_TIMEOUT_STYLE=hidden'.

`GRUB_HIDDEN_TIMEOUT_QUIET'
     In conjunction with `GRUB_HIDDEN_TIMEOUT', set this to `true' to
     suppress the verbose countdown while waiting for a key to be
     pressed before displaying the menu.

     This option is unset by default, and is deprecated in favour of
     the less confusing `GRUB_TIMEOUT_STYLE=countdown'.

Ivan Kozik (ludios) wrote :

A debootstrap of trusty created an /etc/default/grub with

GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10

which resulted in the warning mentioned, but also caused grub to not automatically boot the default menuentry after 10 seconds. It just hung around forever waiting for a manual selection. Especially not good for headless servers.

At the time of testing, my grub version was 2.02~beta2-6

Ivan Kozik (ludios) wrote :

Sorry, ignore my last comment, that looks like an unrelated issue that went away by coincidence.

The grub-pc package generates the initial /etc/default/grub file based on /usr/share/grub/default/grub , which currently includes a GRUB_HIDDEN_TIMEOUT=0 line.

There is logic in the .postinst script to comment out that line if the grub-pc/hidden_timeout debconf value is set to False, but as far as I can see the only way for that to happen is if one is upgrading from a pre-version-2 version of grub and the /boot/grub/menu.list file contains the word "hiddenmenu", or if the line is already commented out (e.g. it has been done manually beforehand). (Doing a "dpkg-reconfigure grub-pc" does not prompt for that item.)

Given that GRUB_HIDDEN_TIMEOUT is now deprecated, maybe the postinst script should attempt to convert a setting for that variable into a GRUB_TIMEOUT_STYLE setting....

In any case, it seems the /usr/share/grub/default/grub file should be edited to reflect the currently recommended settings.

(Some background info about this warning message and GRUB_HIDDEN_TIMEOUT's deprecation can be found in the following threads:
  http://lists.gnu.org/archive/html/grub-devel/2013-11/msg00388.html
  http://lists.gnu.org/archive/html/grub-devel/2013-12/msg00122.html
)

It looks like the GRUB_HIDDEN_TIMEOUT line in the /usr/share/grub/default/grub file comes from the setting at about line 60 of the debian/rules file for the grub2 source package (
  http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/trusty/grub2/trusty/view/head:/debian/rules
) :

ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
DEFAULT_CMDLINE := quiet splash
DEFAULT_TIMEOUT := 10
DEFAULT_HIDDEN_TIMEOUT := 0

followed by
ifneq (,$(DEFAULT_HIDDEN_TIMEOUT))
 perl -pi -e 's/^GRUB_TIMEOUT=.*/GRUB_HIDDEN_TIMEOUT=0\nGRUB_HIDDEN_TIMEOUT_QUIET=true\n$$&/' \
  debian/grub2-common/usr/share/grub/default/grub
at about line 367.

sudo update-grub
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.11.0-19-generic
Found initrd image: /boot/initrd.img-3.11.0-19-generic
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found memtest86+ image: /boot/memtest86+.bin
done

sudo gedit /etc/default/grub
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=countdown
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.modeset=1"
GRUB_CMDLINE_LINUX=""

sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.11.0-19-generic
Found initrd image: /boot/initrd.img-3.11.0-19-generic
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found memtest86+ image: /boot/memtest86+.bin
done

OK

I don't have a build environment were I can actually test it, but here's an attempt to update the debian/rules file so that (under Ubuntu) it generates a /usr/share/grub/default/grub file that uses "GRUB_TIMEOUT_STYLE=hidden" instead of a GRUB_HIDDEN_TIMEOUT= line.

(Note that grub-pc.config and grub-pc.postinst would also need to be updated to reflect this change.)

Changed in grub2 (Ubuntu Trusty):
milestone: none → ubuntu-14.04.1

The attachment "debian/rules patch to generate default/grub file without "GRUB_HIDDEN_TIMEOUT=" line" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Colin Watson (cjwatson) on 2014-04-24
Changed in grub2 (Ubuntu Trusty):
assignee: nobody → Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
milestone: ubuntu-14.04.1 → none
Damir Butmir (d4m1r2) wrote :

Just to add, this bug is affecting Ubuntu 12.04 LTS (x64). It is basically making it impossible for me to lower the GRUB countdown value from 10 seconds to 5;

damir@damir-macbook:~$ sudo gedit /etc/default/grub
damir@damir-macbook:~$ sudo update-grub
Generating grub.cfg ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.5.0-48-generic
Found initrd image: /boot/initrd.img-3.5.0-48-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Mac OS X on /dev/sda2
Found Windows 7 (loader) on /dev/sda4
done

damir@damir-macbook:~$ uname -a
Linux damir-macbook 3.5.0-48-generic #72~precise1-Ubuntu SMP Tue Mar 11 20:09:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Phill Whiteside (phillw) wrote :

You can manually edit the grub.cfg file. It is not for the faint of heart... But, here goes...

sudo -i
<enter password>
cd / boot/grub
nano grub.cfg
Ctrl-W
timeout <enter>
edit set timeout=-1
to be set timeout=10
Ctrl-X (yes)

everytime you do a grub update, you need to edit that file :)

Hope that it helps.

Regards,

Phill.

Damir Butmir (d4m1r2) wrote :

Thanks for the response Phill but I already have found an easier workaround :) If others want to try it;

I have commented out the GRUB_HIDDEN* fields like this;

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
#GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5

Now I don't get that warning when updating GRUB and my countdown timer was changed to 5s from 10s. I have no idea why those 2 are not commented out by default to avoid this.....

Phill Whiteside (phillw) wrote :

hmm...

root@build:/boot/grub# grep -r GRUB_HIDDEN *
root@build:/boot/grub#

No sign of GRUB_HIDDEN ?

On Mon, Apr 28, 2014 at 19:11:59 -0000, Phill Whiteside wrote:
> hmm...
>
> root@build:/boot/grub# grep -r GRUB_HIDDEN *
> root@build:/boot/grub#
>
> No sign of GRUB_HIDDEN ?

The GRUB_HIDDEN... variables are found in /etc/default/grub .

       Nathan

Phill Whiteside (phillw) wrote :

thanks... there are times when I hate when a build relies on an /etc entry when it is so blooming simple to correct it.... but, hey such thoughts have gotten me into problems in the past... I'll just sav this is "idiots decided not to keep grub updated" department.... It will certainly not be the first time :) (Just dig up Dave Stan for the truth on that) :D

Sworddragon (sworddragon) wrote :

Some time ago I have made a bug report on upstream that GRUB_TIMEOUT set to a non-zero value does still work in some cases even if GRUB_HIDDEN_TIMEOUT is set: https://savannah.gnu.org/bugs/index.php?41918

Probably it is releated with this bug report.

Colin Watson (cjwatson) on 2014-12-18
Changed in grub2 (Ubuntu):
assignee: Colin Watson (cjwatson) → nobody
Changed in grub2 (Ubuntu Trusty):
assignee: Colin Watson (cjwatson) → nobody
Qwerty Dragon (0-m2-m) wrote :

Did:
update-grub
Got:
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Now can only boot using recovery mode.

At the time of writing this, all updates, using "Software Updater" are applied, and problem still exists.
Linux vivid 3.19.0-12-generic #12-Ubuntu SMP Fri Apr 3 04:02:54 UTC 2015 i686 i686 i686 GNU/Linux
Description: Ubuntu Vivid Vervet (development branch)

Jeffrey Flaker (jflaker) wrote :

I still have this error too

Is it possible to just comment or remove these lines??? Shouldn't be a big deal to script a find/replace or find/delete as once it is fixed, the script will no longer do anything.

Try it. You will need to chroot in from LiveCD to undo the change though (if the system fails to boot)

Damir Butmir (d4m1r2) wrote :

Yes that is possible. Comment out that specific line and it will get ignored and your boot won't be affected at all (you won't notice any difference except for no more error message).

If you search for my comment on Launchpad, I copy/pasted my file after I edited it. And I've been using it like that for months since, so grub* package updates didn't overwrite my changes either interestingly enough....

Damir

> Date: Sun, 10 May 2015 05:04:37 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 1258597] Re: Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
>
> I still have this error too
>
> Is it possible to just comment or remove these lines??? Shouldn't be a
> big deal to script a find/replace or find/delete as once it is fixed,
> the script will no longer do anything.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1258597
>
> Title:
> Warning: Setting GRUB_TIMEOUT to a non-zero value when
> GRUB_HIDDEN_TIMEOUT is set is no longer supported.
>
> Status in grub2 package in Ubuntu:
> Triaged
> Status in grub2 source package in Trusty:
> Triaged
>
> Bug description:
> When running update-grub I am getting the following message:
>
> Warning: Setting GRUB_TIMEOUT to a non-zero value when
> GRUB_HIDDEN_TIMEOUT is set is no longer supported.
>
> $ sudo update-grub
> Generowanie grub.cfg...
> Uwaga: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
> Znaleziono obraz Linuksa: /boot/vmlinuz-3.12.0-6-generic
> Znaleziono obraz initrd: /boot/initrd.img-3.12.0-6-generic
> Found memtest86+ image: /boot/memtest86+.elf
> gotowe
>
> ProblemType: Bug
> DistroRelease: Ubuntu 14.04
> Package: grub2 (not installed)
> ProcVersionSignature: Ubuntu 3.12.0-6.14-generic 3.12.3
> Uname: Linux 3.12.0-6-generic x86_64
> ApportVersion: 2.12.7-0ubuntu1
> Architecture: amd64
> CurrentDesktop: GNOME
> Date: Fri Dec 6 18:49:28 2013
> InstallationDate: Installed on 2013-10-15 (51 days ago)
> InstallationMedia: Ubuntu-GNOME 13.10 "Saucy Salamander" - Release amd64 (20131015)
> ProcEnviron:
> TERM=xterm
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=pl_PL.UTF-8
> SHELL=/bin/bash
> SourcePackage: grub2
> UpgradeStatus: Upgraded to trusty on 2013-11-05 (31 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1258597/+subscriptions

martinwguy (martinwguy) wrote :

Hi folks
  The settings for /etc/default/grub to get the same behaviour as the old version are:

GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=2
GRUB_TIMEOUT_STYLE=hidden

best

    M

martinwguy (martinwguy) wrote :

Sorry
GRUB_TIMEOUT=5

  M

Changed in grub2 (Ubuntu Trusty):
milestone: ubuntu-14.04.1 → trusty-updates
Roy (royvanarem) wrote :

Same problem in ubuntu 15.10

tags: added: utopic vivid wily xenial
T0beus (t0beus) wrote :

I'm getting it on Gnome Ubuntu 15.10 x64 4.2.0-21-generic

macho (macho) wrote :

And here on Ubuntu 15.10 x64 4.2.0-23-generic

Dmitry Veltishev (vdmit) wrote :

Yes, 15.10 is also affected. Will this ever be fixed?!
A bug with long beard indeed.

Aimo Ella (aimo-ella) wrote :

How can this take so much time? The problem is very simple: you have included grub settings that grub does not support anymore. All you need to do is to update the template for grub settings to include only supported settings. No more than that.

Hassan Williamson (hazrpg) wrote :

I agree with Aimo, since this seems to be such a simple bug to fix, it doesn't make sense that this hasn't been added to the current LTS 16.04 - it was reported around 3 years ago! Is this something that has been pulled from Debian, if so should we be reporting it to them?

Rolf Leggewie (r0lf) on 2016-05-27
Changed in grub2 (Ubuntu):
importance: Medium → High
milestone: none → ubuntu-16.06
Rolf Leggewie (r0lf) on 2016-05-27
Changed in grub2 (Ubuntu):
importance: High → Medium
tags: added: yakkety
Sapa Holliday (saparonia) wrote :

I have this BUG and it has appeared spontaneously. I have never had it before with this distro.
Have tried a couple of suggestions found in comments above:

:~$ GRUB_DEFAULT=0
:~$ #GRUB_HIDDEN_TIMEOUT=0
:~$ #GRUB_HIDDEN_TIMEOUT_QUIET=true
:~$ GRUB_TIMEOUT=5
:~$ sudo update-grub
[sudo] password for saparonia:
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-3.19.0-77-generic
Found initrd image: /boot/initrd.img-3.19.0-77-generic
Found linux image: /boot/vmlinuz-3.19.0-73-generic
Found initrd image: /boot/initrd.img-3.19.0-73-generic
Found linux image: /boot/vmlinuz-3.19.0-26-generic
Found initrd image: /boot/initrd.img-3.19.0-26-generic
done

:~$ GRUB_HIDDEN_TIMEOUT=0
:~$ GRUB_HIDDEN_TIMEOUT_QUIET=true
:~$ GRUB_TIMEOUT=5
:~$ GRUB_TIMEOUT_STYLE=hidden
:~$ sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-3.19.0-77-generic
Found initrd image: /boot/initrd.img-3.19.0-77-generic
Found linux image: /boot/vmlinuz-3.19.0-73-generic
Found initrd image: /boot/initrd.img-3.19.0-73-generic
Found linux image: /boot/vmlinuz-3.19.0-26-generic
Found initrd image: /boot/initrd.img-3.19.0-26-generic
done

elementary OS 0.3.2 Freya (64-bit)
Built on Ubuntu 14.04

Sapa Holliday (saparonia) wrote :

Noticed timeout was at =30 and changed it to =5

made no difference

:~# cd /boot/grub
:/boot/grub# nano grub.cfg
:/boot/grub#
:/boot/grub# sudo update-grub
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.

I will probably wipe this and do a clean reinstall grr

Mikko Rantalainen (mira) wrote :

Sapa Holliday: you need to edit file called /etc/default/grub, not /boot/grub/grub.cfg. The latter is *automatically* generated from the former when you run update-grub. Any changes you make to grub.cfg will be silently overridden any time update-grub is executed (by you or by dpkg).

Eero (eero+launchpad) wrote :

Still happening in a fresh 16.04 installation.

tags: added: zesty
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