Hello all,
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
Regards, Kevin
I usually check the mtime on /root/anaconda-ks.cfg.
On 14/01/16 12:43 PM, Kevin Wilson wrote:
Hello all,
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
Regards, Kevin
On 14/01/16 17:43, Kevin Wilson wrote:
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
# rpm -qi fedora-release
Name : fedora-release Version : 22 Release : 1 Architecture: noarch Install Date: Tue 26 May 2015 20:34:10 BST Group : System Environment/Base Size : 4235 License : MIT Signature : RSA/SHA256, Tue 19 May 2015 19:08:23 BST, Key ID 11adc0948e1431d5 Source RPM : fedora-release-22-1.src.rpm Build Date : Tue 19 May 2015 15:27:10 BST Build Host : arm04-builder06.arm.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://fedoraproject.org Summary : Fedora release files Description : Fedora release files such as various /etc/ files that define the release.
Hope this helps, Chris R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01/15/2016 05:34 AM, Christopher Ross wrote:
On 14/01/16 17:43, Kevin Wilson wrote:
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
# rpm -qi fedora-release
Name : fedora-release Version : 22 Release : 1 Architecture: noarch Install Date: Tue 26 May 2015 20:34:10 BST Group : System Environment/Base Size : 4235 License : MIT Signature : RSA/SHA256, Tue 19 May 2015 19:08:23 BST, Key ID 11adc0948e1431d5 Source RPM : fedora-release-22-1.src.rpm Build Date : Tue 19 May 2015 15:27:10 BST Build Host : arm04-builder06.arm.fedoraproject.org Relocations : (not relocatable) Packager : Fedora Project Vendor : Fedora Project URL : http://fedoraproject.org Summary : Fedora release files Description : Fedora release files such as various /etc/ files that define the release.
Hope this helps, Chris R.
That approach will only work if the fedora-release package hasn't been updated (because then you'll see the date of that update, not the original date).
I think the best approach was the first one suggested; checking the ctime of /root/anaconda-ks.cfg
On Fri, 2016-01-15 at 10:34 +0000, Christopher Ross wrote:
# rpm -qi fedora-release
Occasionally, even *that* package gets updated, so it's not an indicator of install time. Unless someone else knows of something intended to show you the installation date, you are better off looking for some files in the /root directory that get created as part of the installation routine.
e.g. Inside my /root:
-rw-------. 1 root root 1227 Apr 23 2014 anaconda-ks.cfg -rw-r--r--. 1 root root 1244 Apr 24 2014 initial-setup-ks.cfg
But, rpm -qi fedora-release:
Name : fedora-release Version : 20 Release : 4 Architecture: noarch Install Date: Tue 26 May 2015 03:08:20 ACST
And, rpm -q --changelog fedora-release:
* Thu May 14 2015 Dennis Gilmore dennis@ausil.us - 20-4 - add the Fedora 22 gpg keys rhbz#1220358
* Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-3 - bump for downstream breakage
* Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-2 - provide system-release(%version) rhbz#1047058
* Wed Nov 27 2013 Dennis Gilmore dennis@ausil.us - 20-1 - enabled metadata caching for fedora - disable updates-testing - obsolete fedora-release-rawhide < the last shipped rawhide build
* Wed Nov 13 2013 Dennis Gilmore dennis@ausil.us - 20-0.8 - patch from Will Woods to use a archmap file for linking gpg keys - add f21 keys - add fields to /etc/os-release for rhbz#951119 - set skip_if_unavailable=False for rhbz#985354
* Tue Sep 03 2013 Dennis Gilmore dennis@ausil.us - 20-0.7 - set Fedora 20 release name
* Fri Aug 30 2013 Dennis Gilmore dennis@ausil.us - 20-0.6 - update the fedora 20 secondary arch key it had been created incorrectly
* Tue Aug 20 2013 Dennis Gilmore dennis@ausil.us - 20-0.5 - disable rawhide - enable fedora, updates and updates-testing - disable 7d metadata cache for fedora - Obsolete older fedora-release-rawhide
* Wed Jul 31 2013 Dennis Gilmore dennis@ausil.us - 20-0.4 - link armhfp gpg key to primary since its now living there
* Mon Jul 08 2013 Dennis Gilmore dennis@ausil.us - 20-0.3 - fix up typo
* Wed Jun 19 2013 Dennis Gilmore dennis@ausil.us - 20-0.2 - add f20 keys - switch mirrorlist= to metalink= bz#948788 - add bugzilla fields to os-release for brokeness in abrt bz#961477 - add releasever into gpgkey paths - use consistent macros for dist_release value
* Tue Mar 12 2013 Dennis Gilmore dennis@ausil.us - 20-0.1 - setup for f20 - 64 bit arm arch is aarch64 not arm64 - drop sparc arches
--- snip ---
Obviously most of that is pre-release, but some of it is post.
On Saturday 16 Jan 2016 02:19:59 Tim wrote:
On Fri, 2016-01-15 at 10:34 +0000, Christopher Ross wrote:
# rpm -qi fedora-release
Occasionally, even *that* package gets updated, so it's not an indicator of install time. Unless someone else knows of something intended to show you the installation date, you are better off looking for some files in the /root directory that get created as part of the installation routine.
e.g. Inside my /root:
-rw-------. 1 root root 1227 Apr 23 2014 anaconda-ks.cfg -rw-r--r--. 1 root root 1244 Apr 24 2014 initial-setup-ks.cfg
But, rpm -qi fedora-release:
Name : fedora-release Version : 20 Release : 4 Architecture: noarch Install Date: Tue 26 May 2015 03:08:20 ACST
And, rpm -q --changelog fedora-release:
- Thu May 14 2015 Dennis Gilmore dennis@ausil.us - 20-4
- add the Fedora 22 gpg keys rhbz#1220358
- Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-3
- bump for downstream breakage
- Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-2
- provide system-release(%version) rhbz#1047058
- Wed Nov 27 2013 Dennis Gilmore dennis@ausil.us - 20-1
- enabled metadata caching for fedora
- disable updates-testing
- obsolete fedora-release-rawhide < the last shipped rawhide build
- Wed Nov 13 2013 Dennis Gilmore dennis@ausil.us - 20-0.8
- patch from Will Woods to use a archmap file for linking gpg keys
- add f21 keys
- add fields to /etc/os-release for rhbz#951119
- set skip_if_unavailable=False for rhbz#985354
- Tue Sep 03 2013 Dennis Gilmore dennis@ausil.us - 20-0.7
- set Fedora 20 release name
- Fri Aug 30 2013 Dennis Gilmore dennis@ausil.us - 20-0.6
- update the fedora 20 secondary arch key it had been created
incorrectly
- Tue Aug 20 2013 Dennis Gilmore dennis@ausil.us - 20-0.5
- disable rawhide
- enable fedora, updates and updates-testing
- disable 7d metadata cache for fedora
- Obsolete older fedora-release-rawhide
- Wed Jul 31 2013 Dennis Gilmore dennis@ausil.us - 20-0.4
- link armhfp gpg key to primary since its now living there
- Mon Jul 08 2013 Dennis Gilmore dennis@ausil.us - 20-0.3
- fix up typo
- Wed Jun 19 2013 Dennis Gilmore dennis@ausil.us - 20-0.2
- add f20 keys
- switch mirrorlist= to metalink= bz#948788
- add bugzilla fields to os-release for brokeness in abrt bz#961477
- add releasever into gpgkey paths
- use consistent macros for dist_release value
- Tue Mar 12 2013 Dennis Gilmore dennis@ausil.us - 20-0.1
- setup for f20
- 64 bit arm arch is aarch64 not arm64
- drop sparc arches
--- snip ---
Obviously most of that is pre-release, but some of it is post.
How about the creation date of /etc/redhat-release Works for me! Regards Andy
Allegedly, on or about 15 January 2016, Andrew R Paterson sent:
How about the creation date of /etc/redhat-release Works for me!
Doesn't work for me, so you can't guarantee it'll work for others, either.
That file comes from the fedora-release RPM package, which has already been shown to get updated post-installation date, so that file is potentially not going to have the install date.
One could look for the earliest sane date in the /etc directory, though you have to be aware of systems that installed with the date set wrong, and packages that were prepared before installation, and may install with those filedates, rather than current system dates (not sure how it's supposed to work, whether all written files should have a local creation date).
If there isn't anything that's actually meant to record an installation date, perhaps concerned people either want to lobby for it, or simply write some installation notes to file on the day of installing.
On Sat, 16 Jan 2016 21:32:28 +1030 Tim ignored_mailbox@yahoo.com.au wrote:
Allegedly, on or about 15 January 2016, Andrew R Paterson sent:
How about the creation date of /etc/redhat-release Works for me!
Doesn't work for me, so you can't guarantee it'll work for others, either.
That file comes from the fedora-release RPM package, which has already been shown to get updated post-installation date, so that file is potentially not going to have the install date.
One could look for the earliest sane date in the /etc directory, though you have to be aware of systems that installed with the date set wrong, and packages that were prepared before installation, and may install with those filedates, rather than current system dates (not sure how it's supposed to work, whether all written files should have a local creation date).
If there isn't anything that's actually meant to record an installation date, perhaps concerned people either want to lobby for it, or simply write some installation notes to file on the day of installing.
What about /root/initial-setup-ks.cfg or /root/anaconda-ks.cfg ? I belive it is created at the installation time. BR, Bob
Allegedly, on or about 16 January 2016, Bob Marcan sent:
What about /root/initial-setup-ks.cfg or /root/anaconda-ks.cfg ? I belive it is created at the installation time.
I've already suggest them, and others have suggested at least one of them, too. However, there is one potential problem with them: If the clock wasn't properly set until after installation was complete, they will have the wrong file dates. That's how it was on one of my PCs. Heck knows why, there's an NTP server on the LAN, the installer could have made use of it, or any on the WWW.
On Saturday 16 Jan 2016 02:19:59 Tim wrote:
On Fri, 2016-01-15 at 10:34 +0000, Christopher Ross wrote:
# rpm -qi fedora-release
Occasionally, even *that* package gets updated, so it's not an indicator of install time. Unless someone else knows of something intended to show you the installation date, you are better off looking for some files in the /root directory that get created as part of the installation routine.
e.g. Inside my /root:
-rw-------. 1 root root 1227 Apr 23 2014 anaconda-ks.cfg -rw-r--r--. 1 root root 1244 Apr 24 2014 initial-setup-ks.cfg
But, rpm -qi fedora-release:
Name : fedora-release Version : 20 Release : 4 Architecture: noarch Install Date: Tue 26 May 2015 03:08:20 ACST
And, rpm -q --changelog fedora-release:
- Thu May 14 2015 Dennis Gilmore dennis@ausil.us - 20-4
- add the Fedora 22 gpg keys rhbz#1220358
- Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-3
- bump for downstream breakage
- Wed Feb 19 2014 Dennis Gilmore dennis@ausil.us - 20-2
- provide system-release(%version) rhbz#1047058
- Wed Nov 27 2013 Dennis Gilmore dennis@ausil.us - 20-1
- enabled metadata caching for fedora
- disable updates-testing
- obsolete fedora-release-rawhide < the last shipped rawhide build
- Wed Nov 13 2013 Dennis Gilmore dennis@ausil.us - 20-0.8
- patch from Will Woods to use a archmap file for linking gpg keys
- add f21 keys
- add fields to /etc/os-release for rhbz#951119
- set skip_if_unavailable=False for rhbz#985354
- Tue Sep 03 2013 Dennis Gilmore dennis@ausil.us - 20-0.7
- set Fedora 20 release name
- Fri Aug 30 2013 Dennis Gilmore dennis@ausil.us - 20-0.6
- update the fedora 20 secondary arch key it had been created
incorrectly
- Tue Aug 20 2013 Dennis Gilmore dennis@ausil.us - 20-0.5
- disable rawhide
- enable fedora, updates and updates-testing
- disable 7d metadata cache for fedora
- Obsolete older fedora-release-rawhide
- Wed Jul 31 2013 Dennis Gilmore dennis@ausil.us - 20-0.4
- link armhfp gpg key to primary since its now living there
- Mon Jul 08 2013 Dennis Gilmore dennis@ausil.us - 20-0.3
- fix up typo
- Wed Jun 19 2013 Dennis Gilmore dennis@ausil.us - 20-0.2
- add f20 keys
- switch mirrorlist= to metalink= bz#948788
- add bugzilla fields to os-release for brokeness in abrt bz#961477
- add releasever into gpgkey paths
- use consistent macros for dist_release value
- Tue Mar 12 2013 Dennis Gilmore dennis@ausil.us - 20-0.1
- setup for f20
- 64 bit arm arch is aarch64 not arm64
- drop sparc arches
--- snip ---
Obviously most of that is pre-release, but some of it is post.
How about when the root filesystem was created? ls -alct /|tail -1|awk '{print $6, $7, $8}' Rgds Andy
On Sat, Jan 16, 2016 at 09:07:52PM +0000, Andrew R Paterson wrote:
On Saturday 16 Jan 2016 02:19:59 Tim wrote:
--- snip ---
Obviously most of that is pre-release, but some of it is post.
How about when the root filesystem was created? ls -alct /|tail -1|awk '{print $6, $7, $8}' Rgds Andy
Simplified as "ls -lcd /"
However, "c" is not "C"reate time, but inode "C"hange time. Add or remove and entry from / or modify permissions or owner/group and "c" time is updated.
jl
On Thu, 14 Jan 2016 19:43:12 +0200, Kevin Wilson wrote:
Hello all,
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
rpm -qa --last|tail -10
That's the ten oldest installed packages with a detailed timestamp. Even if you've replaced/updated any previously oldest packages, there will be more than 10 that have not been replaced/updated since the original installation.
On Fri, 2016-01-15 at 17:47 +0100, Michael Schwendt wrote:
On Thu, 14 Jan 2016 19:43:12 +0200, Kevin Wilson wrote:
Hello all,
Is there a way to find out the date on which a Fedora distro was installed on a given machine (assuming that the date was set correctly on the machine when it was installed)?
rpm -qa --last|tail -10
That's the ten oldest installed packages with a detailed timestamp. Even if you've replaced/updated any previously oldest packages, there will be more than 10 that have not been replaced/updated since the original installation.
That's fine as long as Fedora was clean installed and not updated from a previous version. The OP didn't say this explicitly.
poc
On Fri, 15 Jan 2016 17:36:31 +0000, Patrick O'Callaghan wrote:
rpm -qa --last|tail -10
That's fine as long as Fedora was clean installed and not updated from a previous version. The OP didn't say this explicitly.
And it isn't fine either, if the installation is from a Live medium. Then the RPM database contains entries copied from the Live medium.
dumpe2fs on the root filesystem also works, if the filesystem has been formatted at 1st install time.
On Fri, 15 Jan 2016 10:24:45 -0800, Joe Zeff wrote:
dumpe2fs on the root filesystem also works, if the filesystem has been formatted at 1st install time.
That's true if and only if you always do a clean install, never an upgrade.
Well, upgrades don't reformat the root fs.
If you want the date of installation of the Fedora release that's installed on the machine, some other check is needed. Dunno whether Live media based installs create /root/anaconda-ks.cfg with an accurate mtime.