grub 2.04 can't read f2fs volume

Bug #1868664 reported by Blastoff
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
grub2 (Debian)
Fix Committed
Undecided
Unassigned
grub2 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Focal includes grub 2.04 which brings support for f2fs.
I created a new Focal install with an f2fs volume as root, however grub is unable to read the volume at all and so cannot get the volume's UUID or read from the grub folder.

The volume is visible and automounted under media when I boot from the Focal USB installer image. All files show up and the drive behaves fine in the USB installer environment.

At the grub command prompt, (hd0,gpt3) is the f2fs partition.
grub> ls (hd0,gpt3)
        Partition hd0,gpt3: No known filesystem detected - Partition start at 103424KiB - Total size 56114176KiB

$ lsb_release -rd
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04

$ apt-cache policy grub2
grub2:
  Installed: 2.04-1ubuntu22
  Candidate: 2.04-1ubuntu22
  Version table:
*** 2.04-1ubuntu22 500
       500 http://archive.ubuntu.com focal/universe amd64 Packages
       100 /var/lib/dpkg/status

Related branches

Revision history for this message
Blastoff (wolph) wrote :

The f2fs module is not being added to the UEFI image.

This is fixed in debian upstream grub 2.04-6 by https://salsa.debian.org/grub-team/grub/-/commit/146d21cc9db01cca6f945e466e4adc31d165782b

Are there any plans to incorporate the above fix?

Revision history for this message
Blastoff (wolph) wrote :
Changed in grub2 (Debian):
status: New → Fix Committed
Revision history for this message
Blastoff (wolph) wrote :

A workaround is to move the f2fs.mod to the EFI partition, then add something along the lines of
insmod (hd0,gpt1)/EFI/ubuntu/f2fs.mod
to the top of your grub.cfg

Will probably need to reapply the workaround each time the grub package gets updated.

Revision history for this message
Blastoff (wolph) wrote :

An improved workaround, add the f2fs.mod to /EFI/ubuntu then put

search.fs_uuid <your efi fs uuid> efs
insmod ($efs)/EFI/ubuntu/f2fs.mod

at the top of grub.cfg

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
DiagonalArg (diagonalarg) wrote :

Almost a year later ... same problem.

Revision history for this message
DiagonalArg (diagonalarg) wrote :

@wolph's work-around isn't working for me. Where in the top of grub.cfg is that insmod supposed to go? And, any way to get it into /etc/default/grub.d?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please have /boot on a separate partition which is ext4 and not f2fs.

That way you can have / as f2fs.

also insmod is disabled when secureboot is on.

Changed in grub2 (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

currently there are no plans to sign & support root on f2fs.

Revision history for this message
林博仁(Buo-ren, Lin) (buo-ren-lin) wrote :

I do create /boot partition in order to support the configuration but it's such a hassle to do so, is there any practical reason for not signing the f2fs module?

Revision history for this message
Julian Andres Klode (juliank) wrote :

Anything we sign increases our attack surface.

Revision history for this message
Blastoff (wolph) wrote :

DiagonalArg, the entire grub.cfg is as follows:

search.fs_uuid <your efi fs uuid> efs
insmod ($efs)/EFI/ubuntu/f2fs.mod
search.fs_uuid <your f2fs fs uuid> root
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.