#1115891 nilfs-tools: Missing fsck.nilfs2 prevents initrd from mounting nilfs2 root partition

Package:
nilfs-tools
Source:
nilfs-tools
Description:
Continuous Snapshotting Log-structured Filesystem
Submitter:
Christopher Zimmermann
Date:
2025-09-21 23:15:01 UTC
Severity:
normal
#1115891#5
Date:
2025-09-21 09:23:12 UTC
From:
To:
Hi,

I just switched my root partition from ext2 to nilfs2 (is this a bad
idea?!?).

One problem I encountered is that the initramfs system doesn't want to
mount the root partition without running fsck.nilfs2 first, which is not
implemented (yet).

I found two workarounds:

  * pass fsck.mode=skip on the kernel command line. This is not optimal,
    since it will also prevent fsck from running on other filesystems,
    which may need repairing…
  * Create dummy fsck.nilfs2: `ln /usr/bin/true /usr/sbin/fsck.nilfs2`,
    then rerun dpkg-reconfigure linux-image-…

I'd suggest shipping a dummy fsck.nilfs2 emitting a warning that it is a
dummy to streamline nilfs2 on root for users.


Christopher

#1115891#10
Date:
2025-09-21 23:13:00 UTC
From:
To:
Well, there hasn't been zero upstream development, but the most recent
git commit for nilfs-utils (the upstream sources for nilfs-tools) is
April 3rd, 2024.  I am seeing almost no activity on the mailing list;
people are sending patches which are cc'ed to the linux-nilfs mailing
list, but I'm not seeing a replies from the maintainer.  There is
*some* activity on the git tree; a few commits in July and April of
this year.  But it doesn't look like it's under active development.

The weird thing is that supposedly there are hints that there was the
beginning of an fsck for nilfs in 2008(!), but it was never merged
into the git tree:

https://linux-nilfs.vger.kernel.narkive.com/w0lqFaoH/can-t-mount-nilfs-error-searching-super-root

So as to whether it's a bad idea --- without a file system repair
tool, if your file system gets corrupted by either a kernel bug or a
hardware problem --- you might not be able to recover the file system.
So your only alternative might be to reformat the disk and restore
from backups.

It does seem very odd that a file system which was introduced in 2005
(over 20 years ago!) doesn't have an tool to either repair the file
system, or even determine if it might be corrupted in some way.

So I'm not sure I could in good honesty recommend the use of nilfs to
users.  And if they use it, I'd strongly recommend that are making
very frequent backups, since there is no guaratee that if the file
system gets corrupted, you might not be able to mount it, and that
might result in complete data loss.

Cheers,

						- Ted