Bug 1945879 - Fails to read FAT32 EFI partition
Summary: Fails to read FAT32 EFI partition
Keywords:
Status: CLOSED DUPLICATE of bug 1955936
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 34
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-02 12:49 UTC by th.schoel
Modified: 2021-06-22 16:08 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-22 16:08:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
grub.cfg from EFI partition (143 bytes, text/plain)
2021-04-02 12:49 UTC, th.schoel
no flags Details

Description th.schoel 2021-04-02 12:49:40 UTC
Created attachment 1768532 [details]
grub.cfg from EFI partition

Description of problem:
After installation of grub2-2.06, boot fails. Downgrading to 2.04 (from koji, using live system) makes the system bootable again. With 2.06, the grub prompt will show upon boot. Entering the command from the grub.cfg file on the EFI partition (attached) boots the system. These actually just refer grub to the grub.cfg file that sits on the dedicated boot partition (which is ext4).

Very likely related to this: grub2-mkconfig also fails in 10_linux. More precisely it fails while running `grub2-probe --device /dev/nvme0n1p1 --target=fs` with "…/fs.c:120:unknown filesystem", where /dev/nvme0n1p1 is the FAT32 EFI partition. That partition was preconfigured on the system (a Dell XPS15 7590) when I originally got it. `fsck.fat -v /dev/nvme0n1p1` prints:

fsck.fat 4.2 (2021-01-31)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
      2048 bytes per cluster
      6702 reserved sectors
First FAT starts at byte 3431424 (sector 6702)
         2 FATs, 32 bit entries
    381440 bytes per FAT (= 745 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 4194304 (sector 8192)
     95232 data clusters (195035136 bytes)
63 sectors/track, 255 heads
      2048 hidden sectors
    389120 sectors total
Checking for unused clusters.
Checking free cluster summary.
/dev/nvme0n1p1: 419 files, 68673/95232 clusters

Running grub2-probe against a newly created FAT32 fs on a loop device prints "fat". Copying the EFI filesystem to a loop device using dd yields the same results for both, grub2-probe and fsck.fat.


Version-Release number of selected component (if applicable):
2.06-rc1-3

How reproducible:
Always


Steps to Reproduce:
1.
2.
3.

Actual results:
Fails to boot/read EFI FS

Expected results:
Boots


Additional info:

Comment 1 th.schoel 2021-04-02 14:08:46 UTC
A little further investigation reveals that there was a file on the FAT32 EFI FS that had a timestamp of 1980-01-01T00:00:00Z, i.e. a w_date = 0x0021 and a w_time = 0. After touching that file, grub can handle the FS. Here is the bad FAT entry:

00000000  46 53 43 4b 30 30 30 30  52 45 43 00 00 00 00 00  |FSCK0000REC.....|
00000010  21 00 82 52 00 00 00 00  21 00 8a 05 00 08 00 00  |!..R....!.......|

Comment 2 Javier Martinez Canillas 2021-06-22 16:08:40 UTC

*** This bug has been marked as a duplicate of bug 1955936 ***


Note You need to log in before you can comment on or make changes to this bug.