Skip to content

Latest commit

 

History

History
128 lines (79 loc) · 5 KB

ubuntu.md

File metadata and controls

128 lines (79 loc) · 5 KB

Ubuntu

https://ubuntu.com/

The most widely used Linux distribution for cloud installations, derived from the battle tested stable long term Debian distribution which is now the standard for Linux and the eventual winner of the long Linux distro wars, as the result of Redhat abandoning the open source mission in favour of profits and relegating themselves to becoming legacy.

For servers always use LTS releases for stability (LTS = Long Term Support).

For the Desktop release you can just do with the newer version.

The Releases page lists the release dates and end of life date for each of version.

Debian Core

Read the Debian.md page for Deb / Apt package management and other core commands derived from Debian.

Ubuntu Releases

https://ubuntu.com/about/release-cycle

Upgrade LTS to newer non-LTS release

Don't do this on servers unless you have no other choice.

Servers should remain on LTS release, normal releases are better for desktops.

sudo apt-get install -y update-manager-core
sed -i 's/^Prompt=lts/Prompt=normal/' /etc/update-manager/release-upgrades

This step must be done locally, otherwise it tries to spawn another sshd which crashes out as a bug in 12.04 LTS:

do-release-upgrade

Change keyboard layout (requires reboot):

sudo dpkg-reconfigure keyboard-configuration

AutoInstall - Automated Installations

Ubuntu can be automatically installed via a config text file bundled into an installation medium such as a DVD iso or served by a web server on the local network.

Newer versions of Ubuntu use Autoinstall (autoinstall-user-data config).

This is called by adding the following kernel arguments in the installation grub bootloader:

linux /casper/vmlinuz autoinstall 'ds=nocloud-net;s=http://192.168.1.2:8080/'

The above command will search the web server base address for user-data and meta-data files. The user-data contents should be the config above with all the installation settings but the latter meta-data can be empty.

Older versions of Ubuntu used Redhat's Kickstart format (anaconda-ks.cfg config).

If you just want to start a quick webserver from your local directory, you can do this which starts a local webserver on port 8080:

warning this will share out your entire $PWD local directory contents without authentication so copy to an empty /tmp directory and share that so nothing else is exposed:

mkdir -p -v /tmp/serve-autoinstall &&

cd /tmp/serve-autoinstall &&

wget -nc -O user-data https://raw.githubusercontent.com/HariSekhon/Templates/master/autoinstall-user-data &&

touch meta-data &&

python -m SimpleHTTPServer ||

python3 -m http.server

Autoinstall Template

HariSekhon/Templates - autoinstall-user-data

wget -nc -O user-data https://raw.githubusercontent.com/HariSekhon/Templates/master/autoinstall-user-data

HashiCorp Packer + Autoinstall Config

HariSekhon/Packer-templates

Packer builds fully automated Virtual Machine golden templates from which to clone virtual machines by booting the Ubuntu installer medium with an Autoinstall config.

Real-world Autoinstall config used by Packer build:

HariSekhon/Packer-templates - installers/autoinstall-user-data

For building Ubuntu VMs with this config, here are relevant real configs:

HariSekhon/Packer-templates - installers/autoinstall-user-data

HariSekhon/Packer-templates - ubuntu-x86_64.vbox.pkr.hcl

Readme Card

Readme Card

Ported from private Knowledge Base page 2010+ - should have been from mid 2000s but young guys don't document enough