This topic has come up before, but the answers were (AFAICT) inconclusive.
I have a PiOS system that was installed many years ago and has been running fine ever since. I'm typing on it right now. I'd like to know when it was originally installed. I think it is something in the 2016/2018 range.
Is there a good way to do this. Ideally, there would be some file, either in /boot or in the rootfs, that gets written during the initial setup and never thereafter. Things like /boot/config.txt and cmdline.txt are candidates, but of course, they can be modified (either by the user or by systemic processes) as time goes by. Note that the basic problem is that in a normal Linux install, files get copied from a medium (CD or DVD or the network) to the hard disk, so the "ctime" field will tell you when the copy took place; unfortunately, in an "image install" as on the Pi, this isn't usable.
Here's a possible candidate, but I'm not sure if this is reliable or not:
I'm not sure if this file is written or just "in the image".
Also, there are files in /etc/ssh that (I think) get modified during the install. I've never done anything special with these files myself. I think later versions of the PiOS installer does stuff in /etc/ssh, but I think the earlier versions just go with what is in the image. But I'm not sure about any of this.
Anyway, is there a good way to figure this out?
I have a PiOS system that was installed many years ago and has been running fine ever since. I'm typing on it right now. I'd like to know when it was originally installed. I think it is something in the 2016/2018 range.
Is there a good way to do this. Ideally, there would be some file, either in /boot or in the rootfs, that gets written during the initial setup and never thereafter. Things like /boot/config.txt and cmdline.txt are candidates, but of course, they can be modified (either by the user or by systemic processes) as time goes by. Note that the basic problem is that in a normal Linux install, files get copied from a medium (CD or DVD or the network) to the hard disk, so the "ctime" field will tell you when the copy took place; unfortunately, in an "image install" as on the Pi, this isn't usable.
Here's a possible candidate, but I'm not sure if this is reliable or not:
Code:
$ stat /etc/os-release File: '/etc/os-release' -> '../usr/lib/os-release' Size: 21 Blocks: 0 IO Block: 4096 symbolic linkDevice: 801h/2049d Inode: 1049705 Links: 1Access: (0777/lrwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)Access: 2017-11-25 09:58:51.135273806 -0500Modify: 2015-01-06 21:09:37.000000000 -0500Change: 1969-12-31 19:12:49.869999706 -0500 Birth: -$
Also, there are files in /etc/ssh that (I think) get modified during the install. I've never done anything special with these files myself. I think later versions of the PiOS installer does stuff in /etc/ssh, but I think the earlier versions just go with what is in the image. But I'm not sure about any of this.
Anyway, is there a good way to figure this out?
Statistics: Posted by BigRedMailbox — Wed Oct 23, 2024 7:10 pm