Merge lp:~xnox/debian-cd/no-try-only-do-in-grub into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 2052
Proposed branch: lp:~xnox/debian-cd/no-try-only-do-in-grub
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 76 lines (+21/-4)
1 file modified
tools/boot/focal/boot-amd64 (+21/-4)
To merge this branch: bzr merge lp:~xnox/debian-cd/no-try-only-do-in-grub
Reviewer Review Type Date Requested Status
Martin Wimpress  (community) Approve
Ubuntu CD Image Team Pending
Review via email: mp+381967@code.launchpad.net

Commit message

focal: boot-amd64: allow different behaviour in isolinux & grub, w.r.t notry

Allow isolinux & grub labels and kernel-arg to be different. By default, keep them the same.

Allow doing NOTRYONLYDO mode, but just for grub, whilst keeping bios mode the same, with NOTRYONLYDOINGRUB.

Make Ubuntu flavour use NOTRYONLYDOINGRUB, such that isolinux remains the same, but under grub the only boot entry is "maybe-ubiquity" one.

This is work-in-progress, as I still need to test build a desktop ISO with this code, and check that ubuntu flavour works correctly and non-ubuntu flavour works correctly too.

To post a comment you must log in.
2048. By Dimitri John Ledkov

focal: boot-amd64: allow different behaviour in isolinux & grub, w.r.t notry

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Bios boot remains the same, all options work, and translations preserved.

UEFI boot works as intended and goes into maybe-ubiquity mode, as per design review between Wimpress & mpt.

Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

I confirm that boot to maybe-ubiquity from EFI is the agreement from a meeting with design and foundations.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/boot/focal/boot-amd64'
2--- tools/boot/focal/boot-amd64 2020-04-09 20:51:06 +0000
3+++ tools/boot/focal/boot-amd64 2020-04-12 15:13:04 +0000
4@@ -459,11 +459,24 @@
5 liveparams=
6 NOTRYONLYDO=true
7 ;;
8+ ubuntu)
9+ livelabel="^Try $HUMANPROJECT without installing"
10+ liveparams=
11+ livelabelgrub="^$HUMANPROJECT"
12+ liveparamsgrub=' maybe-ubiquity'
13+ NOTRYONLYDOINGRUB=true
14+ ;;
15 *)
16 livelabel="^Try $HUMANPROJECT without installing"
17 liveparams=
18 esac
19
20+ if [ -z "$livelabelgrub" ]; then
21+ livelabelgrub="$livelabel"
22+ liveparamsgrub="$liveparams"
23+ fi
24+
25+
26 LAYERFS_PATH_OPT=$(add_layerfs_path_opt)
27
28 for variant in "" " (safe graphics)^ nomodeset"; do
29@@ -476,17 +489,17 @@
30 append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt ---
31 EOF
32 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
33-menuentry "${livelabel#^}${suffix}" {
34+menuentry "${livelabelgrub#^}${suffix}" {
35 set gfxpayload=keep
36- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
37+ linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---
38 initrd $CASPER_INITRD\$casper_flavour
39 }
40 EOF
41 done
42 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
43-menuentry "${livelabel#^}" {
44+menuentry "${livelabelgrub#^}" {
45 set gfxpayload=keep
46- linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
47+ linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$liveparamsgrub$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
48 initrd $CASPER_INITRD\$casper_flavour
49 }
50 EOF
51@@ -500,6 +513,7 @@
52 kernel $CASPER_KERNEL
53 append $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH$extra_kopt ---
54 EOF
55+ if [ "$NOTRYONLYDOINGRUB" != "true" ]; then
56 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
57 menuentry "Install $HUMANPROJECT${suffix}" {
58 set gfxpayload=keep
59@@ -507,7 +521,9 @@
60 initrd $CASPER_INITRD\$casper_flavour
61 }
62 EOF
63+ fi
64 done
65+ if [ "$NOTRYONLYDOINGRUB" != "true" ]; then
66 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
67 menuentry "Install $HUMANPROJECT" {
68 linux $CASPER_KERNEL\$casper_flavour $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---
69@@ -515,6 +531,7 @@
70 }
71 EOF
72 fi
73+ fi
74 cat >> boot$N/isolinux/gfxboot.cfg <<EOF
75 label driverupdates=Use driver update disc
76 append driverupdates=debian-installer/driver-update=true

Subscribers

People subscribed via source and target branches