Skip to content

Instantly share code, notes, and snippets.

@xwiz
Last active September 12, 2021 15:28
Show Gist options
  • Save xwiz/f36fc2cbd108a39fa88e7f735b1d056c to your computer and use it in GitHub Desktop.
Save xwiz/f36fc2cbd108a39fa88e7f735b1d056c to your computer and use it in GitHub Desktop.

Revisions

  1. xwiz revised this gist Sep 12, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,8 @@ sudo apt-get update && sudo apt-get upgrade
    #if you run into any issues with out of date pkeys run the command below to update

    #run sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv KEY_TO_REFRESH
    #it is very important you ensure there are no pgp key errors before upgrading, remove any apt source list that is unsupported/deprecated
    #before upgrading

    sudo apt-get dist-upgrade

  2. xwiz revised this gist Sep 12, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@ sudo apt-get dist-upgrade
    #you should likely be ready to upgrade at this stage

    #update ciphers if needed to ensure you're able to login after upgrade..
    sudo sed -i s/^Ciphers .*/Ciphers +aes256-cbc,aes192-cbc,aes128-cbc/ /etc/ssh/sshd_config
    sudo sed -i 's/^Ciphers .*/Ciphers +aes256-cbc,aes192-cbc,aes128-cbc/' /etc/ssh/sshd_config

    sudo do-release-upgrade

  3. xwiz revised this gist Sep 12, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -19,5 +19,9 @@ sudo apt-get update && sudo apt-get upgrade
    sudo apt-get dist-upgrade

    #you should likely be ready to upgrade at this stage

    #update ciphers if needed to ensure you're able to login after upgrade..
    sudo sed -i ‘s/^Ciphers .*/Ciphers +aes256-cbc,aes192-cbc,aes128-cbc/’ /etc/ssh/sshd_config

    sudo do-release-upgrade

  4. xwiz revised this gist Sep 12, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ sudo apt-get update && sudo apt-get upgrade

    #run sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv KEY_TO_REFRESH

    sudo dist-upgrade
    sudo apt-get dist-upgrade

    #you should likely be ready to upgrade at this stage
    sudo do-release-upgrade
  5. xwiz revised this gist Sep 12, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #Make enough swap space if you have less than 2Gb memory

    sudo swapff -a
    sudo swapoff -a

    sudo fallocate -l 6G /swapfile

  6. xwiz created this gist Sep 12, 2021.
    23 changes: 23 additions & 0 deletions upgradebionic18.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    #Make enough swap space if you have less than 2Gb memory

    sudo swapff -a

    sudo fallocate -l 6G /swapfile

    sudo chmod 0600 /swapfile

    sudo mkswap /swapfile

    sudo swapon /swapfile

    sudo apt-get update && sudo apt-get upgrade

    #if you run into any issues with out of date pkeys run the command below to update

    #run sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv KEY_TO_REFRESH

    sudo dist-upgrade

    #you should likely be ready to upgrade at this stage
    sudo do-release-upgrade