Get Date When Raspberry Pi OS Image Was Generated

Get Date When Raspberry Pi OS Image Was Generated

The official Raspberry Pi OS images are generated using pi-gen tool, which available on GitHub repository. Tutorial shows how to get date when Raspberry Pi OS image was generated.

The pi-gen tool automatically adds the file rpi-issue in /etc directory with some information. It contains the date and exact commit hash when the OS image was generated.

cat /etc/rpi-issue

Output example:

Raspberry Pi reference 2022-04-04
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 27a8050c3c06e567c794620394a8c2d74262a516, stage2

The build of Raspberry Pi OS image is divided up into several stages. In the latter stages of pi-gen, /etc/rpi-issue file is copied to /boot/issue.txt. So, the same information can retrieve as follows:

cat /boot/issue.txt

Note that, the date when Raspberry Pi OS image was generated, not necessarily to be the same date mentioned as the release date on official Raspberry Pi website.

Leave a Comment

Cancel reply

Your email address will not be published.