Skip to content

Instantly share code, notes, and snippets.

@d34dh0r53
Last active January 2, 2019 06:12
Show Gist options
  • Save d34dh0r53/95e0488a5588ffc2a71f837041098ea4 to your computer and use it in GitHub Desktop.
Save d34dh0r53/95e0488a5588ffc2a71f837041098ea4 to your computer and use it in GitHub Desktop.
Upgrading Rackspace OnMetal Trusty to Xenial

Upgrading a Rackspace OnMetal server from Trusty (14.04) to Xenial (16.04)

First Steps

  1. Run apt-get update
  2. Run apt-get dist-upgrade
  3. Reboot if needed (new kernel, etc...)
  4. Run apt-get update again
  5. Run apt-get autoremove
  6. Ensure that update-manager is set to receive lts upgrades
    • Edit /etc/update-manager/release-upgrades
    • Ensure that Prompt=lts is set
  7. Install and start tmux
  8. Run do-release-upgrade

Running do-release-upgrade

  1. Enter y for all of the the continue prompts, and the No valid mirror prompt
  2. Say Yes to the restart services prompt
  3. Keep your currently-installed version for /etc/default/rc5 by entering N
  4. Keep your currently-installed version of /etc/default/grub
  5. Keep your currently-installed version of /etc/apt.conf.d/50-unattended-upgrades
  6. Continue y on the package removal step
  7. Allow the upgrade to reboot the box

Bringing the box back from the brink

  1. Start a ping to your OnMetal server
  2. From mycloud.rackspace.com or from nova issue a hard reboot
  3. In a few minutes you should see echo replies
    • This will probably take 500-600 echo requests
    • If it takes more than 750 you can issue another hard reboot
  4. SSH back into your box
  5. Remove the file /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist
  6. Update packages with apt update
  7. Look for held packages with dpkg --get-selections | grep hold
  8. Unhold any packages that were held back
    for package in $(dpkg --get-selections | grep hold | awk '{ print $1 }');
      do apt-mark unhold $package;
    done
  9. Update packages again apt update
  10. Run apt dist-upgrade
  11. Choose the package maintainers version for /etc/cloud/cloud.cfg.d
  12. Run apt autoremove
  13. Run apt clean

Congratulations, you now have a functional Xenial (16.04) LTS OnMetal server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment