diff --git a/baseimage/initializeBaseUbuntuImage.sh b/baseimage/initializeBaseUbuntuImage.sh index ad60bb8f5..6e2767c6d 100644 --- a/baseimage/initializeBaseUbuntuImage.sh +++ b/baseimage/initializeBaseUbuntuImage.sh @@ -14,10 +14,10 @@ function die { export DEBIAN_FRONTEND=noninteractive -# hold grub since updating it breaks on some VPS providers +# hold grub since updating it breaks on some VPS providers. also, dist-upgrade will trigger it apt-mark hold grub* >/dev/null apt-get -o Dpkg::Options::="--force-confdef" update -y -apt-get -o Dpkg::Options::="--force-confdef" dist-upgrade -y +apt-get -o Dpkg::Options::="--force-confdef" upgrade -y apt-mark unhold grub* >/dev/null echo "==> Installing required packages" @@ -75,13 +75,11 @@ if [[ "${storage_driver}" != "overlay2" ]]; then exit 1 fi -# temporarily disable this for some providers which have issues updating grub unattended -if [[ "${arg_provider}" != "galaxygate" ]]; then - echo "==> Enable memory accounting" - apt-get -y install grub2 - sed -e 's/^GRUB_CMDLINE_LINUX="\(.*\)"$/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1 panic_on_oops=1 panic=5"/' -i /etc/default/grub - update-grub -fi +# do not upgrade grub because it might prompt user and break this script +echo "==> Enable memory accounting" +apt-get -y --no-upgrade install grub2-common +sed -e 's/^GRUB_CMDLINE_LINUX="\(.*\)"$/GRUB_CMDLINE_LINUX="\1 cgroup_enable=memory swapaccount=1 panic_on_oops=1 panic=5"/' -i /etc/default/grub +update-grub echo "==> Downloading docker images" if [ ! -f "${arg_infraversionpath}/infra_version.js" ]; then diff --git a/scripts/cloudron-setup b/scripts/cloudron-setup index f4d4be428..b37c05170 100755 --- a/scripts/cloudron-setup +++ b/scripts/cloudron-setup @@ -143,12 +143,12 @@ echo "" if [[ "${initBaseImage}" == "true" ]]; then echo "=> Updating apt and installing script dependencies" if ! apt-get update &>> "${LOG_FILE}"; then - echo "Could not update package repositories" + echo "Could not update package repositories. See ${LOG_FILE}" exit 1 fi if ! apt-get install curl python3 ubuntu-standard -y &>> "${LOG_FILE}"; then - echo "Could not install setup dependencies (curl)" + echo "Could not install setup dependencies (curl). See ${LOG_FILE}" exit 1 fi fi