** Summary changed: - grub 2.06 prob fat fs fail. + FAT filesystem probing fails if a file's timestamp exceeds 2038
** Description changed: - I found this issue on Ubuntu 22.04.5 LTS, but it's a general issue for grub-2.06. - This is my setup information: - nvme0n1 - ├─nvme0n1p1 vfat FAT32 EFI0 5282-D345 40.6M 17% /boot/efi - └─nvme0n1p2 ext4 1.0 OS0 bdfcdb95-b1c7-42ea-b1b8-69c20099586e 105.6G 4% / - The first partition is /dev/nvme0n1p1, FAT format. - The grub prefix environment value default be set: - prefix=(hd0,gpt1)/EFI/ubuntu # read grub at /boot/efi/EFI/ubuntu/grub.cfg. + [Impact] + If any file's timestamp under `/boot/efi` exceeds 2038, the FAT filesystem probe will fail, and the system will drop into the GRUB shell. - Grub will first probe the /dev/nvme0n1p1, which is the FAT format. When - trying FAT fs, the mount is successful, but there is a check that if any - files under the mount patch(/boot/efi) timestamp exceeds 2038, probe - will fail, and try next type FS(for example, ext2...). Ultimately, the - probe will fail and can not read the grub.cfg and show the grub menu, - then enter the grub cmdline. + [Fix] + There is an upstream patch that fixes this issue: + https://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/fs?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 - It's easy to reproduce: - touch -d "2038-02-20" /boot/efi/EFI - reboot. # After reboot, enter the grub cmdline. + [Test Plan] + 1. Change the timestamp of a directory under /boot/efi to exceed 2038: + touch -d "2038-02-27" /boot/efi/EFI + 2. Reboot, and the system will be entered into the grub shell. - Can mannel boot the setup success: - set prefix=(hd0,gpt2)/boot/grub # set the "grub.cfg" on the second partition, it's ext2 format. The path is: "/boot/grub/grub.cfg". Actually "/boot/efi/EFI/ubuntu/grub.cfg" redirected to it. - insmod linux - insmod normal - normal # Boot linux success. - - There already is a fix in the master branch: e43f3d93b fs/fat: Don't error when mtime is 0. - I have tested it, and it works. We need to include this patch in the latest Ubuntu grub-2.06 code. + [Where problems could occur] + The patch simply bypasses the error logic when the modification time is zero in FAT. + There should be no regression unless the FAT filesystem is unable to handle such scenarios. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-bluefield in Ubuntu. https://bugs.launchpad.net/bugs/2098641 Title: FAT filesystem probing fails if a file's timestamp exceeds 2038 Status in grub2 package in Ubuntu: New Status in grub2-unsigned package in Ubuntu: New Status in linux-bluefield package in Ubuntu: New Status in grub2 source package in Focal: Won't Fix Status in grub2-unsigned source package in Focal: New Status in linux-bluefield source package in Focal: New Status in grub2 source package in Jammy: New Status in grub2-unsigned source package in Jammy: New Status in linux-bluefield source package in Jammy: New Bug description: [Impact] If any file's timestamp under `/boot/efi` exceeds 2038, the FAT filesystem probe will fail, and the system will drop into the GRUB shell. [Fix] There is an upstream patch that fixes this issue: https://git.savannah.gnu.org/cgit/grub.git/commit/grub-core/fs?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 [Test Plan] 1. Change the timestamp of a directory under /boot/efi to exceed 2038: touch -d "2038-02-27" /boot/efi/EFI 2. Reboot, and the system will be entered into the grub shell. [Where problems could occur] The patch simply bypasses the error logic when the modification time is zero in FAT. There should be no regression unless the FAT filesystem is unable to handle such scenarios. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/2098641/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp