ubuntu Linux distribution notes

Pick the LTS (long term support) version to avoid the automatic package management from becoming out of date and unsupported.

At 2012-07-14, 12.04 LTS is my preferred Ubuntu version.

network

My installation automatically configured the box with DHCP. To change from dynamic to static, edit /etc/network/interfaces and type in your static IP.

Originally I had:


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
    >
    

I changed the last line to


iface eth0 inet static
address 192.168.100.20
netmask 255.255.255.0
gateway 192.168.100.138
mtu 1500

"address" is your static IP address.

"gateway" is the ADSL router

Kernel

You can install the precompiled kernel via apt-get (package manager). There are 2 packages to pick from

  • linux-image-server or linux-image-generic is the same since release 12.04.

  • linux-image-virtual, for use within a virtual machine.

I installed linux-image-server to a dedicated server.


# apt-get install linux-image-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  crda iw linux-image-3.2.0-27-generic wireless-regdb
  ...........
Generating grub.cfg ...
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-3.2.13-xxxx-grs-ipv6-64
Found linux image: /boot/vmlinuz-3.2.0-27-generic
Found initrd image: /boot/initrd.img-3.2.0-27-generic
  No volume groups found
done

In the above example kernel linux-image-3.2.0-27-generic was installed.

Next, we need to tell grub (the boot loader) to load the new kernel image next reboot.

First determine the image number for your new kernel. It starts from 0.


# cat /boot/grub/grub.cfg  | grep menuentry
menuentry "Ubuntu 12.04, 3.2.13-xxxx-grs-ipv6-64" {
menuentry 'Ubuntu, with Linux 3.2.0-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
menuentry 'Ubuntu, with Linux 3.2.0-27-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    

The above output shows 3 menu entries to pick from. They are in order, and the count starts from 0. In my case I'd like the 2nd option, 'Ubuntu, with Linux 3.2.0-27-generic'. This would be option 1.

Edit/etc/default/grub, change the value of GRUB_DEFAULT to your option number.

GRUB_DEFAULT=1

run update-grub


# update-grub
Generating grub.cfg ...
Warning: update-grub_lib is deprecated, use grub-mkconfig_lib instead
Found linux image: /boot/bzImage-3.2.13-xxxx-grs-ipv6-64
Found linux image: /boot/vmlinuz-3.2.0-27-generic
Found initrd image: /boot/initrd.img-3.2.0-27-generic
  No volume groups found
done]
    

reboot and check your kernel has been updated by running the uname command:


# uname -a
Linux 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Published: Sunday, 1 July 2012