Merge lp:~xnox/debian-cd/subiquity into lp:~ubuntu-cdimage/debian-cd/ubun3

Proposed by Dimitri John Ledkov
Status: Work in progress
Proposed branch: lp:~xnox/debian-cd/subiquity
Merge into: lp:~ubuntu-cdimage/debian-cd/ubun3
Diff against target: 94 lines (+14/-7)
2 files modified
tools/boot/eoan/boot-amd64 (+10/-6)
tools/boot/eoan/common.sh (+4/-1)
To merge this branch: bzr merge lp:~xnox/debian-cd/subiquity
Reviewer Review Type Date Requested Status
Dimitri John Ledkov (community) rebase-to-focal Needs Resubmitting
Ubuntu CD Image Team Pending
Review via email: mp+366564@code.launchpad.net

Commit message

  Fix whitespace & drop OEM boot options from subiquity

  Currently kernel commandline string on subiquity images has multiple
  groups of duplicate whitespace. This is because most of the
  parameteres are empty for subiquity images and are concatenated space
  delimited. Instead of fiddling with optionality of each argument,
  simply parse them with $(echo ), such that shell escaping space
  separates all arguments without any double/tripple spacing.

  Also this makes reading the variable names easier.

  Create a variable indicating subiquity based images, to skip chunks of
  unneeded boot options. E.g. OEM boot is not supported by the subiquity
  images.

Description of the change

  Fix whitespace & drop OEM boot options from subiquity

  Currently kernel commandline string on subiquity images has multiple
  groups of duplicate whitespace. This is because most of the
  parameteres are empty for subiquity images and are concatenated space
  delimited. Instead of fiddling with optionality of each argument,
  simply parse them with $(echo ), such that shell escaping space
  separates all arguments without any double/tripple spacing.

  Also this makes reading the variable names easier.

  Create a variable indicating subiquity based images, to skip chunks of
  unneeded boot options. E.g. OEM boot is not supported by the subiquity
  images.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Needs Resubmitting (rebase-to-focal)

Unmerged revisions

2028. By Dimitri John Ledkov

Fix whitespace & drop OEM boot options from subiquity

Currently kernel commandline string on subiquity images has multiple
groups of duplicate whitespace. This is because most of the
parameteres are empty for subiquity images and are concatenated space
delimited. Instead of fiddling with optionality of each argument,
simply parse them with $(echo ), such that shell escaping space
separates all arguments without any double/tripple spacing.

Also this makes reading the variable names easier.

Create a variable indicating subiquity based images, to skip chunks of
unneeded boot options. E.g. OEM boot is not supported by the subiquity
images.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tools/boot/eoan/boot-amd64'
--- tools/boot/eoan/boot-amd64 2019-04-24 18:24:20 +0000
+++ tools/boot/eoan/boot-amd64 2019-04-26 13:02:57 +0000
@@ -447,7 +447,7 @@
447label live447label live
448 menu label $livelabel448 menu label $livelabel
449 kernel $CASPER_KERNEL449 kernel $CASPER_KERNEL
450 append $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH ---450 append $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT initrd=$CASPER_INITRD $QUIET $SPLASH ---)
451EOF451EOF
452for variant in "" " (safe graphics)^ nomodeset"; do452for variant in "" " (safe graphics)^ nomodeset"; do
453 suffix="${variant%^*}"453 suffix="${variant%^*}"
@@ -455,7 +455,7 @@
455 cat >> $CDDIR/boot/grub/grub.cfg <<EOF455 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
456menuentry "${livelabel#^}${suffix}" {456menuentry "${livelabel#^}${suffix}" {
457 set gfxpayload=keep457 set gfxpayload=keep
458 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT $QUIET $SPLASH$extra_kopt ---458 linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT $QUIET $SPLASH $extra_kopt ---)
459 initrd $CASPER_INITRD459 initrd $CASPER_INITRD
460}460}
461EOF461EOF
@@ -463,7 +463,7 @@
463 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF463 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
464menuentry "${livelabel#^}" {464menuentry "${livelabel#^}" {
465 set gfxpayload=keep465 set gfxpayload=keep
466 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$liveparams$LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---466 linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $liveparams $LAYERFS_PATH_OPT iso-scan/filename=\${iso_path} $QUIET $SPLASH ---)
467 initrd $CASPER_INITRD467 initrd $CASPER_INITRD
468}468}
469EOF469EOF
@@ -472,7 +472,7 @@
472label live-install472label live-install
473 menu label ^Install $HUMANPROJECT473 menu label ^Install $HUMANPROJECT
474 kernel $CASPER_KERNEL474 kernel $CASPER_KERNEL
475 append $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH ---475 append $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity initrd=$CASPER_INITRD $QUIET $SPLASH ---)
476EOF476EOF
477 for variant in "" " (safe graphics)^ nomodeset"; do477 for variant in "" " (safe graphics)^ nomodeset"; do
478 suffix="${variant%^*}"478 suffix="${variant%^*}"
@@ -480,14 +480,14 @@
480 cat >> $CDDIR/boot/grub/grub.cfg <<EOF480 cat >> $CDDIR/boot/grub/grub.cfg <<EOF
481menuentry "Install $HUMANPROJECT${suffix}" {481menuentry "Install $HUMANPROJECT${suffix}" {
482 set gfxpayload=keep482 set gfxpayload=keep
483 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---483 linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity $QUIET $SPLASH$extra_kopt ---)
484 initrd $CASPER_INITRD484 initrd $CASPER_INITRD
485}485}
486EOF486EOF
487 done487 done
488 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF488 cat >> $CDDIR/boot/grub/loopback.cfg <<EOF
489menuentry "Install $HUMANPROJECT" {489menuentry "Install $HUMANPROJECT" {
490 linux $CASPER_KERNEL $KERNEL_PARAMS $DEFAULT_PRESEED$LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---490 linux $CASPER_KERNEL $(echo $KERNEL_PARAMS $DEFAULT_PRESEED $LAYERFS_PATH_OPT only-ubiquity iso-scan/filename=\${iso_path} $QUIET $SPLASH ---)
491 initrd $CASPER_INITRD491 initrd $CASPER_INITRD
492}492}
493EOF493EOF
@@ -551,10 +551,12 @@
551EOF551EOF
552 fi552 fi
553fi553fi
554
554# The GRUB versions of this only correspond to single isolinux labels,555# The GRUB versions of this only correspond to single isolinux labels,
555# because we don't yet have the necessary technology in our GRUB menu stack556# because we don't yet have the necessary technology in our GRUB menu stack
556# to have a two-dimensional set of boot options, as is implemented for557# to have a two-dimensional set of boot options, as is implemented for
557# isolinux using the gfxboot "applies" keyword.558# isolinux using the gfxboot "applies" keyword.
559if [ "$SUBIQUITY" == "0" ]; then
558for kp in $KERNEL_PREFIXES; do560for kp in $KERNEL_PREFIXES; do
559cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF561cat >> boot$N/isolinux/${!kp}gfxboot.cfg <<EOF
560label ${!kp}oem=OEM install (for manufacturers)562label ${!kp}oem=OEM install (for manufacturers)
@@ -584,6 +586,8 @@
584EOF586EOF
585fi587fi
586done588done
589fi
590
587if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then591if [ "$CDIMAGE_INSTALL_BASE" = 1 ]; then
588 if [ "$PROJECT" != ubuntu-server ]; then592 if [ "$PROJECT" != ubuntu-server ]; then
589 cat >> boot$N/isolinux/gfxboot.cfg <<EOF593 cat >> boot$N/isolinux/gfxboot.cfg <<EOF
590594
=== modified file 'tools/boot/eoan/common.sh'
--- tools/boot/eoan/common.sh 2019-04-20 08:07:06 +0000
+++ tools/boot/eoan/common.sh 2019-04-26 13:02:57 +0000
@@ -35,7 +35,10 @@
35 ;;35 ;;
36 ubuntu-server)36 ubuntu-server)
37 if [ "$CDIMAGE_LIVE" != 1 ]; then37 if [ "$CDIMAGE_LIVE" != 1 ]; then
38 DEFAULT_PRESEED='file=/cdrom/preseed/ubuntu-server.seed'38 DEFAULT_PRESEED='file=/cdrom/preseed/ubuntu-server.seed'
39 SUBIQUITY=0
40 else
41 SUBIQUITY=1
39 fi42 fi
40 ;;43 ;;
41 ubuntu-mid)44 ubuntu-mid)

Subscribers

People subscribed via source and target branches