Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671786 - sys-fs/f2fs-tools-1.12.0: fails to fsck rootfs on boot
Summary: sys-fs/f2fs-tools-1.12.0: fails to fsck rootfs on boot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://git.kernel.org/pub/scm/linux/...
Whiteboard:
Keywords:
: 671866 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-11-24 04:33 UTC by Perfect Gentleman
Modified: 2022-01-14 12:42 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Perfect Gentleman 2018-11-24 04:33:12 UTC
Solution disable fsck for rootfs (/).
Comment 1 Perfect Gentleman 2018-11-24 04:33:32 UTC
(In reply to Perfect Gentleman from comment #0)
> Solution disable fsck for rootfs (/).

Solution is disable fsck for rootfs (/).
Comment 2 Perfect Gentleman 2018-11-24 04:58:39 UTC
rc.log of unsuccessful boot
---------------------------
rc default logging started at Sat Nov 24 11:29:13 2018

razerd            | * Starting razerd ...
rpc.pipefs        | * Setting up RPC pipefs ...
chronyd           | * Starting chronyd ...
fsck              | * Checking local filesystems  ...
 [ ok ]
fsck              |Info: Fix the reported corruption.
fsck              |Info: Mounted device!
fsck              |Info: Check FS only due to RO
fsck              |Error: Failed to open the device!
fsck              | * Filesystems couldn't be fixed
 [ !! ]
fsck              | * ERROR: fsck failed to start
 [ ok ]
 [ ok ]
urandom           | * ERROR: cannot start urandom as fsck would not start
netmount          | * ERROR: cannot start netmount as fsck would not start
cronie            | * ERROR: cannot start cronie as fsck would not start
localmount        | * ERROR: cannot start localmount as fsck would not start
mtab              | * ERROR: cannot start mtab as fsck would not start
bootmisc          | * ERROR: cannot start bootmisc as fsck would not start
elogind           | * ERROR: cannot start elogind as fsck would not start
net.eno1          | * ERROR: cannot start net.eno1 as fsck would not start
dbus              | * ERROR: cannot start dbus as fsck would not start
root              | * ERROR: cannot start root as fsck would not start
cupsd             | * ERROR: cannot start cupsd as fsck would not start
rpcbind           | * Starting rpcbind ...
 [ ok ]
rpc.idmapd        | * Starting idmapd ...
rpc.statd         | * Starting NFS statd ...
 [ ok ]
 [ ok ]
nfsclient         | * Starting NFS sm-notify ...
 [ ok ]
nfs               | * Mounting nfsd filesystem in /proc ...
 [ ok ]
nfs               | * Exporting NFS directories ...
nfs               |exportfs: could not open /var/lib/nfs/.etab.lock for locking: errno 30 (Read-only file system)
nfs               |exportfs: can't lock /var/lib/nfs/etab for writing
 [ !! ]
nfs               | * Starting NFS mountd ...
 [ ok ]
nfs               | * Starting NFS daemon ...
 [ ok ]
nfs               | * Starting NFS smnotify ...
 [ ok ]
local             | * Starting local ...
 [ ok ]

rc default logging stopped at Sat Nov 24 11:29:13 2018
----------------------------------------------------
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-24 13:18:13 UTC
Your divece was mounted, but failed to open, which says nothing special but possible problems in your system settings.
Comment 4 Perfect Gentleman 2018-11-24 14:43:09 UTC
(In reply to Mikle Kolyada from comment #3)
> Your divece was mounted, but failed to open, which says nothing special but
> possible problems in your system settings.

wat?
It works with 1.11.0-r1.
Comment 5 Perfect Gentleman 2018-11-24 14:45:13 UTC
rc boot logging started at Sat Nov 24 11:24:22 2018

modules           | * Loading module vboxdrv ...
 [ ok ]
modules           | * Loading module vboxnetflt ...
 [ ok ]
modules           | * Loading module vboxnetadp ...
 [ ok ]
modules           | * Loading module vboxpci ...
 [ ok ]
hwclock           | * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
sysctl            | * Configuring kernel parameters ...
hostname          | * Setting hostname to HOSTNAME  ...
loopback          | * Bringing up network interface lo ...
 [ ok ]
fsck              | * Checking local filesystems  ...
 [ ok ]
 [ ok ]
fsck              |Info: Fix the reported corruption.
fsck              |Info: Mounted device!
fsck              |Info: Check FS only due to RO
fsck              |Info: [/dev/sdd1] Disk Model: PLEXTOR PX-G256M1.06
fsck              |Info: Segments per section = 1
fsck              |Info: Sections per zone = 1
fsck              |Info: sector size = 512
fsck              |Info: total sectors = 500116111 (244197 MB)
fsck              |Info: MKFS version
fsck              |  "Linux version 4.15.0-20-generic (buildd@lgw01-amd64-039) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018"
fsck              |Info: FSCK version
fsck              |  from "Linux version 4.18.0-11-generic (buildd@lcy01-amd64-027) (gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)) #12-Ubuntu SMP Tue Oct 23 19:22:37 UTC 2018"
fsck              |    to "Linux version 4.19.4-gentoo (root@HOSTNAME) (gcc version 8.2.0 (Gentoo 8.2.0-r4 p1.5)) #1 ZEN SMP PREEMPT Fri Nov 23 22:15:59 +07 2018"
fsck              |Info: superblock features = 0 : 
fsck              |Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
fsck              |Info: total FS sectors = 500116104 (244197 MB)
fsck              |Info: CKPT version = 7965081c
fsck              |Info: Checked valid nat_bits in checkpoint
fsck              |Info: checkpoint state = c5 :  nat_bits crc compacted_summary unmount
fsck              |
fsck              |[FSCK] Unreachable nat entries                        [Ok..] [0x0]
fsck              |[FSCK] SIT valid block bitmap checking                [Ok..]
fsck              |[FSCK] Hard link checking for regular file            [Ok..] [0xe0]
fsck              |[FSCK] valid_block_count matching with CP             [Ok..] [0x6bb835]
fsck              |[FSCK] valid_node_count matcing with CP (de lookup)   [Ok..] [0xebfb3]
fsck              |[FSCK] valid_node_count matcing with CP (nat lookup)  [Ok..] [0xebfb3]
fsck              |[FSCK] valid_inode_count matched with CP              [Ok..] [0xeb3ea]
fsck              |[FSCK] free segment_count matched with CP             [Ok..] [0x1a345]
fsck              |[FSCK] next block offset is free                      [Ok..]
fsck              |[FSCK] fixing SIT types
fsck              |[FSCK] other corrupted bugs                           [Ok..]
fsck              |
fsck              |Done.
fsck              |Info: Fix the reported corruption.
fsck              |Info: [/dev/sda1] Disk Model: SAMSUNG MZ7WD2407W3Q
fsck              |Info: Segments per section = 1
fsck              |Info: Sections per zone = 1
fsck              |Info: sector size = 512
fsck              |Info: total sectors = 468860047 (228935 MB)
fsck              |Info: MKFS version
fsck              |  "Linux version 4.16.6-gentoo (root@kubuntu) (gcc version 7.3.0 (Gentoo 7.3.0-r1 p1.1)) #1 ZEN SMP PREEMPT Tue May 1 18:28:05 +07 2018"
fsck              |Info: FSCK version
fsck              |  from "Linux version 4.19.4-gentoo (root@HOSTNAME) (gcc version 8.2.0 (Gentoo 8.2.0-r4 p1.5)) #1 ZEN SMP PREEMPT Fri Nov 23 22:15:59 +07 2018"
fsck              |    to "Linux version 4.19.4-gentoo (root@HOSTNAME) (gcc version 8.2.0 (Gentoo 8.2.0-r4 p1.5)) #1 ZEN SMP PREEMPT Fri Nov 23 22:15:59 +07 2018"
fsck              |Info: superblock features = 0 : 
fsck              |Info: superblock encrypt level = 0, salt = 00000000000000000000000000000000
fsck              |Info: total FS sectors = 468860040 (228935 MB)
fsck              |Info: CKPT version = 40e5095e
fsck              |Info: checkpoint state = c5 :  nat_bits crc compacted_summary unmount
fsck              |Info: No error was reported
 [ ok ]
root              | * Remounting root filesystem read/write ...
 [ ok ]
root              | * Remounting filesystems ...
 [ ok ]
mtab              | * Updating /etc/mtab ...
swap              | * Activating swap devices ...
mtab              | * Creating mtab symbolic link
 [ ok ]
 [ ok ]
localmount        | * Mounting local filesystems ...
 [ ok ]
urandom           | * Initializing random number generator ...
 [ ok ]
bootmisc          | * Creating user login records ...
 [ ok ]
termencoding      | * Setting terminal encoding [UTF-8] ...
dbus              | * Starting dbus ...
 [ ok ]
 [ ok ]
keymaps           | * Setting keyboard mode [UTF-8] ...
 [ ok ]
keymaps           | * Loading key mappings [us] ...
 [ ok ]
elogind           | * Starting elogind ...
 [ ok ]

rc boot logging stopped at Sat Nov 24 11:24:42 2018
Comment 6 Perfect Gentleman 2018-11-24 15:00:53 UTC
I didn't hear any explanation why it works with 1.11.0 but not with 1.12.0
Comment 7 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-24 15:04:08 UTC
How is that gentoo specific? 

You did not provide any info, /etc/init.d/fsck fails as it can't run f2fs' fsck command. As per your output fsck mounted your device, but could not open it at least twice. So nothing for gentoo here.
Comment 8 Perfect Gentleman 2018-11-24 15:08:07 UTC
(In reply to Mikle Kolyada from comment #7)
> How is that gentoo specific? 
> 
> You did not provide any info, /etc/init.d/fsck fails as it can't run f2fs'
> fsck command. As per your output fsck mounted your device, but could not
> open it at least twice. So nothing for gentoo here.

what info else should I provide?
there was no changes except f2fs-tools update.
if it's not gentoo specific, it must be reported to upstream.
Comment 9 Mark Gannon 2018-11-25 15:52:59 UTC
I'm also experiencing the issue and downgrading from sys-fs/f2fs-tools-1.12.0 to f2fs-tools-1.11.0-r1 resolved the issue.  I'm happy to provide more information, but I need help with getting the boot information from a systemd system.
Comment 10 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-11-25 15:58:28 UTC
Again, go to upstream please.
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2018-12-03 13:46:14 UTC
Reopening as reporter contacted upstream [1] and a working patch is available (see URL).

[1] https://sourceforge.net/p/linux-f2fs/mailman/message/36476197/
Comment 12 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-12-03 14:06:12 UTC
*** Bug 671866 has been marked as a duplicate of this bug. ***
Comment 13 Larry the Git Cow gentoo-dev 2018-12-03 14:12:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76ae45b316e09ec982a1f02d77017efbd5909d40

commit 76ae45b316e09ec982a1f02d77017efbd5909d40
Author:     Mikle Kolyada <zlogene@gentoo.org>
AuthorDate: 2018-12-03 14:12:19 +0000
Commit:     Mikle Kolyada <zlogene@gentoo.org>
CommitDate: 2018-12-03 14:12:41 +0000

    sys-fs/f2fs-tools: revbump to fix fsck on boot
    
    Closes: https://bugs.gentoo.org/671786
    Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
    Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-fs/f2fs-tools/f2fs-tools-1.12.0-r1.ebuild      | 37 ++++++++++++++
 .../f2fs-tools/files/f2fs-tools-1.12.0-fsck.patch  | 56 ++++++++++++++++++++++
 2 files changed, 93 insertions(+)
Comment 14 Nikolay Kichukov 2018-12-04 08:53:53 UTC
=sys-fs/f2fs-tools-1.12.0-r1 is still affected by this at least on ARM. 1.12 should remain masked, until this is resolved as it can render the whole system unavailable if rootfs is on f2fs and has the fsck flag on in fstab.

Has this patch resolved the issue for the others? Which architectures?

Thanks!
-N
Comment 15 Perfect Gentleman 2018-12-04 08:55:22 UTC
(In reply to Nikolay Kichukov from comment #14)
> =sys-fs/f2fs-tools-1.12.0-r1 is still affected by this at least on ARM. 1.12
> should remain masked, until this is resolved as it can render the whole
> system unavailable if rootfs is on f2fs and has the fsck flag on in fstab.
> 
> Has this patch resolved the issue for the others? Which architectures?
> 
> Thanks!
> -N

for RO-fs -f switch should be used
Comment 16 Nikolay Kichukov 2018-12-04 09:07:50 UTC
This seems to be the case: /etc/init.d/fsck script contains:

        if _forcefsck; then
                fsck_opts="$fsck_opts -f"
                check_extra="(check forced)"

However it fails to boot, still. Downgrade of sys-f2/f2fs-tools fixes the issue.
Comment 17 Michele Santullo 2019-07-29 23:24:39 UTC
My system was also rendered unusable by this. Downgrading to f2fs-tools-1.11.0-r1 fixed the problem for me, or with 1.12.0-r1, the solution is to change the last column in the fstab's root mount to 0.

I'm running gentoo with kernel 4.20.17 x86_64, systemd 242-r6.

This caused my system to break after an update and it remained unusable for months. Only yesterday I had the time to sit down and find a solution, I think f2fs-tools should be masked until the problem is fixed as it just renders a system unusable and it's very hard (at least it was for me) to diagnose and laborious to recover from. Even on IRC #gentoo no one was able to help.
Comment 18 Toaster-Two 2022-01-14 12:26:24 UTC
The title of this bug has a typo in the package category (sys-f2). This should be "sys-fs". I am assuming this is why this bug is not listed when a basic search of 'sys-fs/f2fs-tools' is done.

This comment seems the best way to bring this problem to the attention the right person(s).

Thanks,

Doug