1

I understand that few main ways to obtain information about the current OS for a Raspbian/Debian system is via :

  1. cat /etc/os-release which will give me sufficient information about the Version of Jessie.

  2. cat /etc/debian_version just show the current version number

  3. I can do uname -a to obtain information about the kernel version and data for date of the kernel etc.

But for instance, I have Two raspberry Pis one with Raspbian Jessie which was downloaded in the late 2016 and one with Raspbian Jessie-Lite which was downloaded in recent February 2017.

Is there any way to determine which Jessie version is the latest on either of the two pis?

Observation

since the Download Page for Jessie has some information about the Release Date and Version how can I obtain that same information on the Pi.

4 Answers 4

2

Raspbian releases downloaded from the foundation website have an unique file special to foundation-released builds. Check it :

pi@raspberrypi:~$ cat /boot/issue.txt
Raspberry Pi reference 2012-07-15 (armhf)
generated using spindle, http://asbradbury.org/projects/spindle/, d2c1253, stage4-lxde-edu.qed
pi@raspberrypi:~$
2

Debian is a rolling release, so there aren't specific release dates fixed to a point in time, if that's what you mean. An RPi running raspbian jessie that was installed in late 2016 can be fully brought up to date with the one installed in February 2017. Both will be "current" with the debian release configured in /etc/apt/sources.list.

The jumps between debian releases (e.g. wheezy to jessie) tend to be pretty significant, but within a release, assuming you keep it up to date, an install will be "current". It is possible -- though not always trivial -- to update debian systems between releases with dist-upgrade. That's one of the beauties of the debian rolling release approach. There's less need to wipe and reinstall to get the latest.

4
  • I agree. But what about the scenario when I have one Pi with Jessie-Lite without Pixel and the older one with Jessie and GUI ? I can't remove the GUI part on the older distribution or can I ?
    – Shan-Desai
    Mar 21, 2017 at 15:19
  • You can remove the GUI components and a lot of other RPi features if you don't need them (wolfram, etc.), although it might not be a tidy result. Before the jessie lite distribution became officially available, there were several discussions about how to lighten up raspbian. It sounds like you might be trying to determine whether or not a GUI environment is installed rather than distinguishing between debian releases. Is that correct?
    – bobstro
    Mar 21, 2017 at 15:26
  • Well I am actually planning to ask the GUI thing as a new thread. Thanks for bringing that up
    – Shan-Desai
    Mar 21, 2017 at 15:42
  • here is the GUI Thread
    – Shan-Desai
    Mar 21, 2017 at 16:01
2

If you want to know the date when the Raspbian image was created, you can run:

tune2fs -l /dev/mmcblk0p2 | grep created

Of course, there's no guarantee that this will exactly match the information published on the Raspbian download page (after all, it's just a page, you can write anything you want in there), but I expect this to be the case.

This sets a limit on how old packages on the system may be: if the system was deployed from image created on January 1st, 2016 it is guaranteed not to have packages from 2015 and older (unless the user made a downgrade). However, this doesn't mean this system has packages that are 1 year old: if the user has run an upgrade on January 1st, 2017, the system will have the same packages as the system deployed from a 01/01/2017 image.

1
  • This will indeed show the date the filesystem was created, but the a actual contents may be older. If the SD Card is copied using SD Copy or the sdclone tool it creates a new filesystem and copies the contents - tune2fs will show the date on which the copy was performed.
    – Milliways
    Nov 17, 2018 at 11:39
2

As others have stated, there is no real difference between Raspbian installs which have been upgraded, regardless of where they started.

If you want to work out which started as Raspbian Jessie-Lite, then had GUI packages manually added you may want to examine your installation history.

I have 5 Pi and 10 SD Cards with different installations. When I want to explore the history I run the following script which displays my apt history.

#!/bin/bash
#Print apt-get history
for logf in $(ls /var/log/apt/history.log.?.gz | sort -r) ; do zcat $logf | grep -E "Start-Date:|Commandline:" ; done
grep -E "Start-Date:|Commandline:" /var/log/apt/history.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.