Merge lp:~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/param-recordfail-timeout into lp:ubuntu/quantal/grub2

Proposed by Ben Howard
Status: Superseded
Proposed branch: lp:~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/param-recordfail-timeout
Merge into: lp:ubuntu/quantal/grub2
Diff against target: 73 lines (+53/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/series (+1/-0)
debian/patches/ubuntu_param_recordfail_timeout.patch (+46/-0)
To merge this branch: bzr merge lp:~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/param-recordfail-timeout
Reviewer Review Type Date Requested Status
Colin Watson Needs Fixing
Review via email: mp+106720@code.launchpad.net

This proposal has been superseded by a proposal from 2012-05-24.

Commit message

Parameterization of recordfail setting. This allows users to define the
default time out of Grub2 when recordfail has been set. The current
setting causes hangs on appliances and Cloud Images where access to the
console is limited or prohibited. (LP: #669481)

Description of the change

This patch parameterizes the record fail behavior, such that putting "GRUB_RECORDFAIL_TIMEOUT=0" in /etc/default/grub will fix hang problems on appliances and HVM cloud images. (See LP: #462888, #872244, #447725 and #669481 and there are many user reports on Google). The current work-around is to modify /etc/grub.d/00_header directly. However, this work around fails on any Grub2 package update.

This fix simply adds the environment variable "GRUB_RECORDFAIL_TIMEOUT" which can then be defined in /etc/default/grub. When this variable is present, it sets the timeout on "recordfail" to the value, otherwise it sets it the default value of "-1".

This has been tested on both Precise and Quantal builds.

To post a comment you must log in.
144. By Ben Howard

Changed the changelong to be more descriptive of the change

Revision history for this message
Colin Watson (cjwatson) wrote :

Please drop the debian/default/grub change. It'll probably cause configuration file prompts for people, and it's unnecessary - most variables are not documented by way of comments in the stock /etc/default/grub file.

Conversely, please add a patch to docs/grub.texi to document this new variable.

review: Needs Fixing
Revision history for this message
Colin Watson (cjwatson) wrote :

Oh, also, a more verbose changelog entry (along the lines of your commit message) wouldn't hurt.

145. By Ben Howard

Parameterization of recordfail setting. This allows users to define the
default time out of GRUB when recordfail has been set. The current
setting causes hangs on headless and appliances where access to the
console is limited or prohibited. (LP: #669481)

Unmerged revisions

145. By Ben Howard

Parameterization of recordfail setting. This allows users to define the
default time out of GRUB when recordfail has been set. The current
setting causes hangs on headless and appliances where access to the
console is limited or prohibited. (LP: #669481)

144. By Ben Howard

Changed the changelong to be more descriptive of the change

143. By Ben Howard

Parameterization of recordfail timeout (LP: #669481)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-05-15 08:03:30 +0000
3+++ debian/changelog 2012-05-21 23:42:21 +0000
4@@ -1,3 +1,9 @@
5+grub2 (1.99-21ubuntu5) quantal; urgency=low
6+
7+ * Parameterization of recordfail setting. (LP: #669481)
8+
9+ -- Ben Howard <ben.howard@ubuntu.com> Fri, 18 May 2012 11:22:57 -0600
10+
11 grub2 (1.99-21ubuntu4) quantal; urgency=low
12
13 * Switch to backwards compatible ${} syntax for grub.cfg (LP: #978464)
14
15=== modified file 'debian/patches/series'
16--- debian/patches/series 2012-04-17 16:11:45 +0000
17+++ debian/patches/series 2012-05-21 23:42:21 +0000
18@@ -64,3 +64,4 @@
19 ubuntu_qemu_no_kvm.patch
20 ubuntu_probe_nonexistent_loopback.patch
21 ubuntu_efi_device_discovery.patch
22+ubuntu_param_recordfail_timeout.patch
23
24=== added file 'debian/patches/ubuntu_param_recordfail_timeout.patch'
25--- debian/patches/ubuntu_param_recordfail_timeout.patch 1970-01-01 00:00:00 +0000
26+++ debian/patches/ubuntu_param_recordfail_timeout.patch 2012-05-21 23:42:21 +0000
27@@ -0,0 +1,46 @@
28+Description: Parameterizes the timeout value for recordfail boots
29+Author: Ben Howard <ben.howard@ubuntu.com>
30+Bug-Ubuntu: https://bugs.launchpad.net/bugs/669481
31+Forwarded: no
32+Last-Update: 2012-05-17
33+
34+Index: b/debian/default/grub
35+===================================================================
36+--- a/debian/default/grub
37++++ b/debian/default/grub
38+@@ -32,3 +32,8 @@ GRUB_CMDLINE_LINUX=""
39+
40+ # Uncomment to get a beep at grub start
41+ #GRUB_INIT_TUNE="480 440 1"
42++
43++# Uncomment to disable record fail timeout
44++# This should be uncommented on appliances and cloud images. Default value is
45++# "-1", which causes Grub to wait for user input if a previous boot fails.
46++#GRUB_RECORDFAIL_TIMEOUT=0
47+Index: b/util/grub.d/00_header.in
48+===================================================================
49+--- a/util/grub.d/00_header.in
50++++ b/util/grub.d/00_header.in
51+@@ -233,7 +233,7 @@ make_timeout ()
52+ {
53+ cat << EOF
54+ if [ "\${recordfail}" = 1 ]; then
55+- set timeout=-1
56++ set timeout=${GRUB_RECORDFAIL_TIMEOUT:--1}
57+ else
58+ set timeout=${2}
59+ fi
60+Index: b/util/grub-mkconfig.in
61+===================================================================
62+--- a/util/grub-mkconfig.in
63++++ b/util/grub-mkconfig.in
64+@@ -245,7 +245,8 @@ export GRUB_DEFAULT \
65+ GRUB_DISABLE_OS_PROBER \
66+ GRUB_INIT_TUNE \
67+ GRUB_SAVEDEFAULT \
68+- GRUB_BADRAM
69++ GRUB_BADRAM \
70++ GRUB_RECORDFAIL_TIMEOUT
71+
72+ if test "x${grub_cfg}" != "x"; then
73+ rm -f ${grub_cfg}.new

Subscribers

People subscribed via source and target branches

to all changes: