Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 705568

Summary: sys-fs/f2fs-tools - boot loop on f2fs rootfs system with systemd
Product: Gentoo Linux Reporter: Jacques Landru <jacques.landru>
Component: Current packagesAssignee: Anthony Basile <blueness>
Status: RESOLVED WORKSFORME    
Severity: normal CC: zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jacques Landru 2020-01-16 15:30:14 UTC
Context : f2fs rootfs system with systemd 

Since last @world update, two days ago, my system enter in a boot loop at startup. Fortunatelly single mode boot works... but boot loop is painful to debug.

Last @world emerge updated f2fs-tools from sys-fs/f2fs-tools-1.11.0-r1 to sys-fs/f2fs-tools-1.13.0. 

According to 
- https://bugs.gentoo.org/666657
- https://bugs.gentoo.org/671786
- https://bugs.gentoo.org/681618
- and detailed discussion here https://sourceforge.net/p/linux-f2fs/mailman/linux-f2fs-devel/thread/22c88c02-9854-48fb-70c1-9144edaa0425%40huawei.com/#msg36645996

I need to add '-f' parm to fsck.f2fs call. If it seems to work on openrc init system (see bug report above) adding '-f' in /etc/conf.d/fsck , what about systemd systems ?

- on my systemd system, I finally found that boot hangs at systemd-fsck-rootfs starting step which initiate a /sbin/fsck.(fstype) call (according man:systemd-fsck)

As f2fs-tools ebuild installs fsck.f2fs binary under /usr/sbin, I try, with no success, to set the '-f' param in  a /sbin/fsck.f2fs shell script wrapper.

How can I temporarily fix my system boot ?
- unset rootfs filesystem check at bootup (not a good practice solution) using one among : 
    * add fsck.mode=skip param at kernel parameter in your grub.cfg file (works on my system)
    * set passno from '1' to '0' on fstab root entry (didn't work on my system)
    * disable systemd-fsck or systemd-fsck-rootfs service (no tested on my system)
- downgrade f2fs-tools to  sys-fs/f2fs-tools-1.11.0-r1 : As that ebuild version, was removed from portage I had to manually recreate it on a local personnal repo. 

That latter is my actual choice, as I need to use my system, hoping better solution in future to use more recent f2fs tools.
Comment 1 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2020-01-17 09:39:09 UTC
As you may guess we are not responsible for the actual "fix". It is upstream developer who has decided this behaviour correct (and, as you may realized is not going to change it anyhow).

systemd recognizes the number of standard options that can be passed to the /proc/cmdline (as you mentioned yourself), and as also described at [1]. Apart from that there is no the other solution I am afraid.

[1] - https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html