Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2047979

Summary: rpm -V / --verify reports modified /boot/efi/EFI/redhat/grubaa64.efi
Product: Red Hat Enterprise Linux 9 Reporter: Jiri Jaburek <jjaburek>
Component: grub2Assignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: mdomonko, mlewando, pmatilai, rharwood
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.06-44.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:18:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Jaburek 2022-01-29 00:22:24 UTC
Description of problem:

After first boot on aarch64, rpm verify seems to report an unexpected finding:

# rpm -V grub2-efi-aa64
.......T.    /boot/efi/EFI/redhat/grubaa64.efi
.M.......  c /boot/grub2/grub.cfg

The second entry is expected, but the first one signals mtime change compared to what was packaged.

I don't really know what could be causing it - even removing the file and reinstalling grub2-efi-aa64 does immediately produce the rpm -V finding, so this is unlikely to be a foreign process modifying the file.

I also don't see any RPM scriptlets touching it, ... so maybe some anomaly with a vfat filesystem?

I'm not seeing it on any other platform/architecture, only aarch64.

If you have any ideas what could be causing it and how to fix it, please do.

I also see the same thing happening with shim-aa64, but only sometimes and again only on aarch64:

.......T.    /boot/efi/EFI/BOOT/BOOTAA64.EFI
.......T.    /boot/efi/EFI/BOOT/fbaa64.efi
.......T.    /boot/efi/EFI/redhat/BOOTAA64.CSV
.......T.    /boot/efi/EFI/redhat/gcdaa64.efi
.......T.    /boot/efi/EFI/redhat/mmaa64.efi
.......T.    /boot/efi/EFI/redhat/shimaa64.efi
.......T.    /boot/efi/EFI/redhat/shimaa64-redhat.efi
.......T.    /boot/efi/EFI/redhat/shim.efi

Thanks!


Version-Release number of selected component (if applicable):
grub2-efi-aa64-2.06-16.el9

Comment 1 Robbie Harwood 2022-01-31 20:33:43 UTC
> so maybe some anomaly with a vfat filesystem?

I suspect so.  fat/vfat is an Exciting filesystem.  By design, mtime is only tracked to a resolution of 2 seconds - which could explain the "sometimes" behavior you're seeing.  It also lacks a concept of users/groups, so there may be trouble with who can set that stuff (allow_utime) but that seems less likely.

I wonder if RPM is aware of this time resolution behavior on vfat?

Comment 2 Michal Domonkos 2022-03-23 10:41:10 UTC
I can reproduce this on an aarch64 machine:

# stat -c %Y /boot/efi/EFI/redhat/grubaa64.efi
1646945898
# rpm -q --queryformat "[%{FILENAMES} %{FILEMTIMES}\n]" grub2-efi-aa64
[...]
/boot/efi/EFI/redhat/grubaa64.efi 1646931498
[...]

1646945898-1646931498 = 14400 = 3600*4

There's an exactly 4 hour difference (in my case) between what's recorded in the rpmdb for this file and the actual mtime on disk.  That doesn't seem random, it likely is some kind of filesystem and/or timezone skew.

Although, contrary to Jiri's observation, reinstalling the grub2-efi-aa64 package fixes it for me, as in, the file no longer shows up in "rpm -V".

Comment 3 Panu Matilainen 2022-03-23 11:18:14 UTC
Yeah that does sound like some timezone issue.

In general, rpm only really supports posix filesystems, EFI is a new anomaly in that picture of course. One simple way to avoid fubar verify errors from what is known a bit wonky fs is to just filter them out explicitly, eg 

%verify(not mtime) /boot/efi/EFI/redhat/grubaa64.efi

Comment 4 Panu Matilainen 2022-08-09 12:11:55 UTC
By far the simplest fix to this is to deal with the special content on a special filesystem locally in the one place that knows about that specialty, in grub2. Just tell rpm to ignore the timestamps on anything on what is known to be a VFAT fs, see above comment.

Comment 5 Robbie Harwood 2022-08-09 15:52:13 UTC
Fine, we can work around rpm here.

Comment 6 Marta Lewandowska 2022-08-16 14:50:07 UTC
reproduced using grub2-2.06-38.el9 in RHEL-9.1.0-20220810.1

# rpm -V grub2-efi-aa64
.......T.    /boot/efi/EFI/redhat/grubaa64.efi

tested using grub2-2.06-44.el9

# rpm -V grub2-efi-aa64
(no output)

setting Verified: Tested

Comment 14 errata-xmlrpc 2022-11-15 11:18:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (grub2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8326