Merge lp:~cyphermox/debian-cd/timeouts into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Merged at revision: 1983
Proposed branch: lp:~cyphermox/debian-cd/timeouts
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 97 lines (+36/-12)
3 files modified
tools/boot/bionic/boot-amd64 (+26/-12)
tools/boot/bionic/boot-arm64 (+5/-0)
tools/boot/bionic/boot-ppc64el (+5/-0)
To merge this branch: bzr merge lp:~cyphermox/debian-cd/timeouts
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+334149@code.launchpad.net

Description of the change

Better set timeouts for some flavours:

- Booting through GRUB (UEFI, non-gfxboot arches) should still timeout eventually and proceed to the default boot entry.
- ubuntu-server LIVE builds (subiquity) can timeout even earlier, after two seconds like desktop images without even showing keyboard options (but showing the accessibility icon at the bottom of the screen).

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Suggested improvements inline.

review: Needs Fixing
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) :
Revision history for this message
Steve Langasek (vorlon) wrote :

On Wed, Nov 22, 2017 at 11:34:53PM -0000, Mathieu Trudel-Lapierre wrote:

> Diff comments:

> > === modified file 'tools/boot/bionic/boot-amd64'
> > --- tools/boot/bionic/boot-amd64 2017-11-08 04:58:14 +0000
> > +++ tools/boot/bionic/boot-amd64 2017-11-22 22:54:26 +0000
> > @@ -202,7 +202,7 @@
> > HIDDEN_TIMEOUT=
> > if [ "$CDIMAGE_LIVE" = 1 ] && [ "$CDIMAGE_DVD" != 1 ]; then
> > case $PROJECT in
> > - ubuntu|ubuntu-netbook|xubuntu|ubuntukylin|kubuntu|kubuntu-plasma5|ubuntu-gnome|ubuntu-desktop-next|ubuntu-mate|ubuntu-budgie)
> > + ubuntu|ubuntu-netbook|xubuntu|ubuntukylin|kubuntu|kubuntu-plasma5|ubuntu-gnome|ubuntu-desktop-next|ubuntu-mate|ubuntu-budgie|ubuntu-server)

> This is a special case though, it only applies to live & gfxboot; not to
> grub. I agree it could be listed as exceptions, but I think there just
> aren't any. (I certainly can't think of one). For example, I think
> lubuntu is simply missing from that list (but should be in).

But it would still be better, in terms of maintainability and principle of
least surprise, to treat this as the default case (if we think it should be
default) and only call out the exceptions.

(If Lubuntu currently gets different behavior as a result of not being in
this list, then it should be called out as an exception. We shouldn't
change the behavior of Lubuntu as a part of this MP.)

> > HIDDEN_TIMEOUT=2
> > ;;
> > mythbuntu)
> > @@ -313,6 +313,13 @@
> > : > boot$N/isolinux/hwe-gfxboot.cfg
> > fi
> >
> > +# Set a timeout for GRUB; 15 seconds for everyone since users don't need to
> > +# pick a language, but should still have time to decide what boot option
> > +# (Try, Install, HWE, etc.) they want.
> > +cat >> $CDDIR/boot/grub/grub.cfg <<EOF
> > +set timeout=15
> > +EOF
> > +

> There's currently some variability in the timeout, based on HIDDEN_TIMEOUT
> above and if unset, then only having a timeout in the keyboard selection
> prompts in gfxboot (300 (30 sec) if HIDDEN_TIMEOUT is unset, 50 (5 sec)
> otherwise); which changes what the user is "looking at" while the timeout
> counts down.

> I'm all for standardizing, but let's first agree on some standard, as well
> as where we "time out".

Yes, the timeout for gfxboot varies based on the HIDDEN_TIMEOUT setting.
But we capture that timeout value in a variable, and I see no reason why,
*for a given image*, we should not be using that same timeout value for both
grub and gfxboot.

Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Inline comments. I'm fixing the pass for lubuntu; but the other change is on purpose.

Revision history for this message
Steve Langasek (vorlon) wrote :

> Inline comments. I'm fixing the pass for lubuntu; but the other change is on
> purpose.

OK. It would be better to have this clearly called out in the commit history; right now it looks like an unintended side-effect of a refactor.

Revision history for this message
Steve Langasek (vorlon) :
review: Approve
lp:~cyphermox/debian-cd/timeouts updated
1983. By Mathieu Trudel-Lapierre

Rework menu timeouts for images and make sure GRUB shares the same timeout values.

1984. By Mathieu Trudel-Lapierre

Standardize on 30 seconds timeout for server images booted in UEFI or BIOS mode. This is no change for live images that do no use hidden-timeout, they already had a timeout of 30 seconds.

Revision history for this message
Simon Quigley (tsimonq2) wrote :

What about Lubuntu Next (lubuntu-next)? Shouldn't that be there?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/bionic/boot-amd64'
2--- tools/boot/bionic/boot-amd64 2017-11-08 04:58:14 +0000
3+++ tools/boot/bionic/boot-amd64 2017-11-29 19:41:23 +0000
4@@ -202,12 +202,16 @@
5 HIDDEN_TIMEOUT=
6 if [ "$CDIMAGE_LIVE" = 1 ] && [ "$CDIMAGE_DVD" != 1 ]; then
7 case $PROJECT in
8- ubuntu|ubuntu-netbook|xubuntu|ubuntukylin|kubuntu|kubuntu-plasma5|ubuntu-gnome|ubuntu-desktop-next|ubuntu-mate|ubuntu-budgie)
9- HIDDEN_TIMEOUT=2
10- ;;
11 mythbuntu)
12 HIDDEN_TIMEOUT=1
13 ;;
14+ lubuntu)
15+ # Lubuntu appears to be an exception, being a live image but not
16+ # using hidden timeout.
17+ ;;
18+ *)
19+ HIDDEN_TIMEOUT=2
20+ ;;
21 esac
22 if [ -e "$BASEDIR/data/$DI_CODENAME/$PROJECT-access.pcx" ]; then
23 ACCESSPCX="$PROJECT-access.pcx"
24@@ -313,6 +317,25 @@
25 : > boot$N/isolinux/hwe-gfxboot.cfg
26 fi
27
28+# Menu timeout, in seconds.
29+# gfxboots will need it in deciseconds (it is converted as needed)
30+menu_timeout=30
31+
32+# When using hidden timeout; use a shorter timeout while the user
33+# only sees the accessibility logo at the bottom of the screen.
34+if [ "$HIDDEN_TIMEOUT" ]; then
35+ menu_timeout=5
36+fi
37+
38+# Set timeout for the GRUB menu
39+cat >> $CDDIR/boot/grub/grub.cfg <<EOF
40+set timeout=$menu_timeout
41+EOF
42+
43+# Set gfxboot timeouts (for hidden-timeout or for the language picker)
44+sed -i "s/^timeout .*/timeout $(($menu_timeout * 10))/" \
45+ boot$N/isolinux/isolinux.cfg boot$N/isolinux/prompt.cfg
46+
47 # Set up-to-date build dates. Kludgy because d-i sets its own version as
48 # the build date.
49 DI_VERSION="$(perl -lne 'if (/built on ([0-9a-z]*)/) { print $1 }' \
50@@ -323,15 +346,6 @@
51 "boot$N"/isolinux/*.txt "boot$N"/isolinux/*.hlp
52 fi
53
54-if [ "$HIDDEN_TIMEOUT" ]; then
55- timeout=50
56-elif [ "$CDIMAGE_LIVE" = 1 ]; then
57- timeout=300
58-else
59- timeout=0
60-fi
61-sed -i "s/^timeout .*/timeout $timeout/" \
62- boot$N/isolinux/isolinux.cfg boot$N/isolinux/prompt.cfg
63 # Isolinux config file.
64 if [ "$CDIMAGE_LIVE" = 1 ]; then
65 DEFAULT_LABEL=live
66
67=== modified file 'tools/boot/bionic/boot-arm64'
68--- tools/boot/bionic/boot-arm64 2017-11-08 04:58:14 +0000
69+++ tools/boot/bionic/boot-arm64 2017-11-29 19:41:23 +0000
70@@ -152,6 +152,11 @@
71 #mcopy -i $CDDIR/boot/grub/efi.img ::EFI/BOOT/bootaa64.efi $CDDIR/EFI/BOOT/bootaa64.efi
72 sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
73
74+# Set a timeout for grub.
75+cat >> $CDDIR/boot/grub/grub.cfg <<EOF
76+set timeout=30
77+EOF
78+
79 if [ "$BACKPORT_KERNEL" ]; then
80 cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
81 submenu 'Boot and Install with the HWE kernel' {
82
83=== modified file 'tools/boot/bionic/boot-ppc64el'
84--- tools/boot/bionic/boot-ppc64el 2017-11-08 04:58:14 +0000
85+++ tools/boot/bionic/boot-ppc64el 2017-11-29 19:41:23 +0000
86@@ -108,6 +108,11 @@
87 # setup grub menu
88 sed -i '/^menuentry/Q' $CDDIR/boot/grub/grub.cfg
89
90+# Set a timeout for GRUB
91+cat >> $CDDIR/boot/grub/grub.cfg <<EOF
92+set timeout=30
93+EOF
94+
95 if [ "$BACKPORT_KERNEL" ]; then
96 cat > $CDDIR/boot/grub/hwe-grub.cfg <<EOF
97 submenu 'Boot and Install with the HWE kernel' {

Subscribers

People subscribed via source and target branches