16

I've got a few machines which I'm upgrading from version to version for a few years.

I'm curious to find out what was the original version of Ubuntu installed on the machine.

Is there a way to do that?

Sergey
  • 43,665

4 Answers4

19

Run this command from the terminal:

cat /var/log/installer/media-info

or, if the file doesn't exist, try:

cat /var/log/installer/lsb-release
carestad
  • 993
5

Yet another option: by default /etc/apt/sources.list contains the name of the CD from which the system was installed:

> cat /etc/apt/sources.list|grep cdrom
# deb cdrom:[Kubuntu-KDE4 8.04 _Hardy Heron_ - Release amd64 (20080423)]/ hardy main restricted

which even works on a VPS which I'm sure never been actually installed from a cdrom:

# deb cdrom:[Ubuntu-Server 10.04.2 LTS _Lucid Lynx_ - Release i386 (20110211.1)]/ lucid main restricted

Of course, /etc/apt/sources.list is relatively less hidden than anything in /var/log/installer, so chances are it had been edited manually and the cdrom entry was modified/removed.

The same data can be seen in Software Sources dialog:

enter image description here

Sergey
  • 43,665
  • I'm accepting my own answer since the most upvoted one does not seem to work on systems older than 11.04. – Sergey Nov 09 '12 at 02:12
4

You can see that when you report a bug using ubuntu-bug. For instance, you can press Alt+F2 and enter ubuntu-bug firefox. It'll start collecting info about your system which you can review. Among those is "Installation Media", which will show how it was originally installed. Then you just cancel the bug report, of course.

I'm not sure where apport gets this information, so someone will probably post a better answer. But this works, and that counts for something, I guess. :)

  • 1
    Interestingly, I can't find "Installation Media" in ubuntu-bug output on my machine. The only partially-related thing I found is UprgadeStatus: Upgraded to quantal on 2012-10-19 (6 days ago) – Sergey Oct 25 '12 at 04:36
1

A possibly over looked option here might be to judge age through the use of time stamps. Just look and see what the time stamps are on some of the oldest files. For example, a file with a last modified dated of Jun 2010 may indicate Ubuntu 10.04.

Obviously this isn't a foolproof system, because some files can be copied onto a system with older dates than the existence of the installed Operating System. So you have to use your best judgment.

Rucent88
  • 1,978