From 8159117afc34395c2dc2430d5e1d04fa08f56e2d Mon Sep 17 00:00:00 2001 From: Alexander Lutay Date: Tue, 19 Mar 2019 14:09:10 +0100 Subject: [PATCH] TT#55156 Install grub-pc during puppet disaster recovery process Otherwise the servers with Software RAID cannot be installed due to the error on stage 'grub-install "/dev/$disk"': > grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory. The package grub-pc is a NGCP dependency, so it is available when we install NGCP but missing when we recovery server using Puppet or install Debian plain on Software RAID. Change-Id: I46caf893d2d6c523b6c007702d21f6b81caac291 --- templates/scripts/includes/deployment.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 90f3f33..e8d613e 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -1344,6 +1344,7 @@ echo "Clean the default /etc/debootstrap/packages" echo > /etc/debootstrap/packages if ! "$NGCP_INSTALLER" ; then + echo "Install some packages to be able to login on the Debian plain system" cat >> /etc/debootstrap/packages << EOF # to be able to login on the Debian plain system via SSH @@ -1352,7 +1353,16 @@ openssh-server # deployment supports LVM only lvm2 EOF -else + + if [[ "${SWRAID}" = "true" ]] ; then + cat >> /etc/debootstrap/packages << EOF +# required for Software-RAID support on plain debian and Puppet recovery +grub-pc +EOF + fi + +else # "$NGCP_INSTALLER" = true + echo "Install some essential packages for NGCP bootstrapping" # WARNING: consider to add NGCP packages to NGCP metapackage! cat >> /etc/debootstrap/packages << EOF @@ -1361,7 +1371,8 @@ wget # required for Software-RAID support mdadm EOF -fi + +fi # if ! "$NGCP_INSTALLER" ; then # NOTE: we use the debian.sipwise.com CNAME by intention here # to avoid conflicts with apt-pinning, preferring deb.sipwise.com