Ubuntu – get contradicting Ubuntu versions

release-management

I'm running Ubuntu 12.04.*

I'd like to know what point release of 12.04 I'm running (the star). I read the information about LTSEnablementStack and it seems 12.04 has point releases 12.04.0, 12.04.1, 12.04.2, 12.04.3, 12.04.4, 12.04.5
which might differ as much as running a different kernel and xorg server.

I wanted to find out my exact version and the problem is that I get contradictory information.

using lsb_release -a yields 12.04.5

root@box:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

looking at cat /etc/apt/sources.list says 12.04.1

root@box:~# cat /etc/apt/sources.list | grep cdrom
# deb cdrom:[Ubuntu 12.04.1 LTS _Precise Pangolin_ - Release i386 (20120817.3)]/ precise main restricted

checking the creation date of my root filesystem (to confirm my memmory that I installed that box somewhere in September 2012 (long before 12.04.5) indicates 12.04.1

root@box:~# dumpe2fs /dev/mapper/root    -h  | grep created
Filesystem created:       Fri Sep 21 12:56:19 2012

the GUI is of no help at all and says 12.04 only:
ubuntu version shown

So what point release am I running and why do I see this contradictory information? My kernel is a 3.2 version, which is yet not helping my understanding of the Hardware Enablement Stack Policies and Procedures. Can it be that I had 12.04.1 and accidently changed to 12.04.5? (is this even possible?, yet why do I still run a 3.2 kernel even after apt-get dist-upgrade?)
Or is only lsb_release -a broken and I should file a bug?

Best Answer

Let's break-down your issue into two parts:

  1. Your current Ubuntu version from the output of /etc/apt/sources.list

  2. Your current Ubuntu version from the output of everything else.

Now, to the explanation:

  1. From Ubuntu.

    The only lines that gets upgraded in that file are the lines that starts with deb, deb-src, #deb or #deb-src because

    Ubuntu uses apt for package management. Apt stores a list of repositories or software channels in the file.

    If there are any other lines in the file that are uncommented and doesn't start with deb, etc. then the command sudo apt-get update will produce errors.

    But the main part relevant to you is that the file doesn't get updated as a whole but the lines in them that are stated above. So, the file is basically the same one as the time when you installed Ubuntu and to make it more clear you installed Ubuntu 12.04.1 LTS to start with and upgraded your way to 12.04.5 LTS.

  2. Now, for the second part,

    From lsb-release --help:

    -v, --version      show LSB modules this system supports
    -u, --upstream     show upstream LSB data
    -i, --id           show distributor ID
    -d, --description  show description of this distribution
    -r, --release      show release number of this distribution
    -c, --codename     show code name of this distribution
    -a, --all          show all of the above information
    

    i.e., the command lsb_release -a gives you the exact information as to what your current version of Ubuntu is.

Also about your other question regarding kernels, the latest kernel that is available for Precise is 3.13.*. So, everything's fine with your Ubuntu. But on another note if you want to install the more latest kernels on your current version then you might want to follow this YouTube.

EDIT: As Pilot6 pointed out and from Ubuntu Wiki in 12.04.x Ubuntu Kernel Support section:

It seems that 12.04.5 has kernel version 3.13.*.