Ubuntu

From Segfault
Jump to: navigation, search

Postinstall

Network Configuration

netplan

Newer Ubuntu distributions use Netplan to create[1] network configurations:

# cat /etc/netplan/01-netcfg.yaml  
network:
  ethernets:
    eth0:
      dhcp4: true
      dhcp6: true

# netplan apply

interfaces

Example static network configuration:

# cat /etc/network/interfaces 
auto lo eth0

iface lo inet loopback

iface eth0 inet static
      address 192.168.0.3
      netmask 255.255.255.0
      gateway 192.168.0.1

# cat /etc/resolv.conf 
nameserver 192.168.0.1
domain example.com
search example.com

For some reason, Ubuntu introduced DNS information in interfaces(5) - that's what resolv.conf(5) is for. Let's get rid of those:

sed '/dns/d' -i /etc/network/interfaces

GRUB

 $ cat /etc/default/grub 
 GRUB_DEFAULT=0
 # GRUB_HIDDEN_TIMEOUT
 # GRUB_HIDDEN_TIMEOUT_QUIET=true
 GRUB_TIMEOUT=15
 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
 GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,115200n8 console=tty0 nomodeset gfxpayload=text"
 GRUB_CMDLINE_LINUX=""
 GRUB_TERMINAL="console serial"
 GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
 GRUB_DISABLE_RECOVERY="true"
 $ sudo update-grub

sources.list

Be sure to use a near mirror server:

deb http://us.archive.ubuntu.com/ubuntu/        precise           main universe restricted multiverse
deb http://us.archive.ubuntu.com/ubuntu/        precise-updates   main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/          precise-security  main universe restricted multiverse

# deb http://us.archive.ubuntu.com/ubuntu/      precise-proposed  main universe restricted multiverse
# deb http://us.archive.ubuntu.com/ubuntu/      precise-backports main universe restricted multiverse
# deb http://archive.canonical.com/ubuntu/      precise           partner
# deb http://extras.ubuntu.com/ubuntu/          precise           main

Valid repositories are:

  • main - Officially supported software
  • universe - Community maintained software, i.e. not officially supported software
  • restricted - Supported software that is not available under a completely free license
  • multiverse - Software that is not free
  • partner - Not part of Ubuntu, but is offered by Canonical and the respective vendors
  • extras - New applications that aren't in the repositories at the time of release

Or, via the mirror:// URI protocol handler:

deb mirror://mirrors.ubuntu.com/mirrors.txt vivid           main universe
deb mirror://mirrors.ubuntu.com/mirrors.txt vivid-updates   main universe
deb mirror://mirrors.ubuntu.com/mirrors.txt vivid-backports main universe
deb mirror://mirrors.ubuntu.com/mirrors.txt vivid-security  main universe

Note: apt-file does not understand this, yet![2]

Packages

Install missing packages:

apt-get install acl apt-file apt-listchanges atop attr autossh bc bzip2 ca-certificates chrony cryptsetup curl deborphan devscripts debsums ecryptfs-utils git-core haveged s-nail htop iftop iotop irqbalance ksh less libpam-tmpdir lsof mlocate moreutils netcat-openbsd openssh-server openvpn p7zip-full pbzip2 pigz pv pwgen pxz rsync screen sharutils smartmontools ssmtp strace subversion sudo sysstat thermald vim vnstat whois zsh

For x86 based systems:

firmware-iwlwifi i7z intel-microcode mcelog memtest86+ msr-tools

For desktop systems:

chromium flashplugin-nonfree gedit gnome-core gnome-themes gnome-tweak-tool icedove enigmail firefox libcanberra-gtk-module xul-ext-https-everywhere xul-ext-noscript xul-ext-refcontrol libreoffice-calc libreoffice-writer pidgin pidgin-otr rdesktop sox xtightvncviewer ekiga


Miscellaneous

Clean up a few things:

 rm -rf /initrd.img /vmlinuz /media /srv
 rm /etc/motd && touch /etc/motd

Tune some defaults:

 sed 's/,errors=remount-ro//' -i /etc/fstab
 tune2fs -e remount-ro /dev/sda1
 sed 's/=[Nn][Oo]/=Yes/' -i /etc/default/bootlogd
 sed 's/VERBOSE=no/VERBOSE=yes/;s/FSCKFIX=no/FSCKFIX=yes/' -i /etc/default/rcS
 sed 's/^#RUN=/RUN=/;s/OPTS=""/OPTS="-s"/' -i /etc/default/cachefilesd 
 dpkg-reconfigure -p low debconf              # e.g. choose Dialog and low

Serial Console

Serial Console

Upgrading

Manual

Let's say we want to upgrade from Natty (11.04) to Oneiric (11.10):

sed 's/natty/oneiric/' -i.bak /etc/apt/sources.list
apt-get update
apt-get -V dist-upgrade
apt-get clean
deborphan --guess-all

Note: for release upgrades, we might want to use aptitude instead of apt-get:

aptitude update
aptitude safe-upgrade
aptitude full-upgrade                      # aka dist-upgrade

update-manager

However, Ubuntu recommends to handle release upgrades with update-manager:

$ apt-get install update-manager-core
$ grep ^P /etc/update-manager/release-upgrades
Prompt=normal                              # never, normal, lts

do-release-upgrade -d

Releases

Release Quantal Quetzal Precise Pangolin Oneiric Ocelot Natty Narwhal Maverick Meerkat Lucid Lynx Karmic Koala Jaunty Jackalope Intrepid Ibex Hardy Heron Gutsy Gibbon Feisty Fawn Edgy Eft Dapper Drake Breezy Badger Hoary Hedgehog Warty Warthog
Version 12.10 12.04 LTS 11.10 11.04 10.10 10.04 LTS 9.10 9.04 8.10 8.04 LTS 7.10 7.04 6.10 6.06 LTS 5.10 5.04 4.10
Releasedate 2012-10-18 2012-04-26 2011-10-13 2011-04-28 2010-10-10 2010-04-29 2009-10-29 2009-04-23 2008-10-30 2008-04-24 2007-10-18 2007-04-19 2006-10-26 2006-06-01 2005-10-12 2005-04-08 2004-10-20

Links

References