From 2844aa530debe60f0eee689ff8f365cab55b1282 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Wed, 12 Aug 2020 16:49:17 -0500 Subject: [PATCH] Revert ubuntu-cpc: Disable boot splash These introduced a regression for ppc64el and needs more time to bake. This reverts commits 1deb0c68e8be6b06190402e32292c3c55134eee2 & 6dbb30f53bd3f2086021abdecaee04645c9ccda0. * "ubuntu-cpc: Fix ppc64el grub console update" * "ubuntu-cpc: Disable boot splash in all cloud images (LP: #1725358)" --- .../hooks.d/base/disk-image-ppc64el.binary | 20 +++++---- .../hooks.d/chroot/999-cpc-fixes.chroot | 42 +++++++------------ 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary index 48f99560..77f24e7e 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-ppc64el.binary @@ -35,15 +35,19 @@ install_grub() { chroot mountpoint apt-get -qqy remove --purge grub-legacy-ec2 # set the kernel commandline to use hvc0 - CONSOLES="console=hvc0 earlyprintk" - # Append to the existing GRUB_CMDLINE_LINUX_DEFAULT line - if [ ! -f mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg ]; then - echo "Expected to find an existing grub config override" - exit 1 - fi - sed -e "/^\s*GRUB_CMDLINE_LINUX_DEFAULT=/{s/=\"\"/=\"$CONSOLES$itemNum\"/;t;s/\"$/ $CONSOLES$itemNum&/;}" \ - mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg + mkdir -p mountpoint/etc/default/grub.d + cat << EOF > mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg +${IMAGE_STR} +# Set the recordfail timeout +GRUB_RECORDFAIL_TIMEOUT=0 + +# Do not wait on grub prompt +GRUB_TIMEOUT=0 + +# Set the default commandline +GRUB_CMDLINE_LINUX_DEFAULT="console=hvc0 earlyprintk" +EOF prep_partition="/dev/mapper${loop_device///dev/}p2" chroot mountpoint grub-install "${prep_partition}" \ --no-nvram \ diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot index 8b805a7a..7817c430 100755 --- a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot @@ -112,27 +112,9 @@ if [ "${SUBPROJECT:-}" = minimized ]; then _xchroot "${rootd}" apt clean fi -# for Quantal and later, use /etc/default/grub.d functionality -# rather than modifying the grub configuration itself. -# This avoids the mess of having to do dpkg stuff -# LP: 1179940 -mkdir -p "${rootd}/etc/default/grub.d" -cat << EOF > "${rootd}/etc/default/grub.d/50-cloudimg-settings.cfg" -# Cloud Image specific Grub settings for Generic Cloud Images -${CLOUD_IMG_STR} - -# Set the recordfail timeout -GRUB_RECORDFAIL_TIMEOUT=0 - -# Do not wait on grub prompt -GRUB_TIMEOUT=0 - -# Drop 'quiet' and 'splash' for cloud images -GRUB_CMDLINE_LINUX_DEFAULT="" -EOF - #### END COMMON ARCH FUNCTIONS + case $arch in # ARM, ppc, riscv64 and s390x images are special armhf|arm64|powerpc|ppc64el|s390x|riscv64) @@ -205,15 +187,23 @@ fi psuedo_grub_probe > "${gprobe}" chmod 755 "${gprobe}" +# for Quantal and later, use /etc/default/grub.d functionality +# rather than modifying the grub configuration itself. +# This avoids the mess of having to do dpkg stuff +# LP: 1179940 +mkdir -p "${rootd}/etc/default/grub.d" +cat << EOF > "${rootd}/etc/default/grub.d/50-cloudimg-settings.cfg" +# Cloud Image specific Grub settings for Generic Cloud Images +${CLOUD_IMG_STR} -# Set the consoles on the default grub commandline -CONSOLES="console=tty1 console=ttyS0" -# Append to the existing GRUB_CMDLINE_LINUX_DEFAULT line -sed -e "/^\s*GRUB_CMDLINE_LINUX_DEFAULT=/{s/=\"\"/=\"$CONSOLES$itemNum\"/;t;s/\"$/ $CONSOLES$itemNum&/;}" \ - "${rootd}/etc/default/grub.d/50-cloudimg-settings.cfg" +# Set the recordfail timeout +GRUB_RECORDFAIL_TIMEOUT=0 + +# Do not wait on grub prompt +GRUB_TIMEOUT=0 -# Append the terminal console setting to the cloud grub config -cat << EOF >> "${rootd}/etc/default/grub.d/50-cloudimg-settings.cfg" +# Set the default commandline +GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0" # Set the grub console type GRUB_TERMINAL=console