Cannot boot invalid argument

After NixOS update I cannot boot anymore.


I have several system links, I know that /var/nix/profiles/system-27-link/ works. How can I debug that? It seems fstab didn’t change.

I use flake system.

It seems like to me, that, as you can read, your root filesystem is corrupted and F2FS did not perform any fixes, did it? Seems like fsck is not running in a correcting mode.

Or, that, you lost the capability to mount F2FS in the early boot.

I don’t think so @RaitoBezarius. I think Info: Fix the reported corruption. is just normal output for fsck.f2fs. Notice at the end it says Info: No error was reported

1 Like

Right, I do include the “or, that, you lost the capability to mount F2FS in the early boot” because of this.

Though, EINVAL for F2FS is either invalid magic for the superblock or when an fsck is needed (SBI_NEED_FSCK IIRC).

1 Like

Any idea why the older generation would still be able to boot then?

The older generation may have a kernel version which does not check SBI_NEED_FSCK, then it would probably prove that the F2FS has correct magic but requires a fsck which is not triggered.

Either way, all of this is highly speculative at this point, we probably need more data/logs/configuration/etc.

I’ve been running fsck for some time now, it is still incomplete. But fsck.f2fs -a succeeds fast.

You can find my config here https://github.com/knightpp/nixos-cfg/blob/5f15996151b5beb926e3b9f461d9b56aae6c15bb/hosts/chlap/default.nix, look for chlap host.

It is probably a hardware fault. fsck hangs on 60%, the storage is eMMC.

Thanks!

I’m not sure because I’ve already reinstalled OS, but it seems something’s changed in f2fs opitons or zstd. Here’s possible fix

-  "compress_algorithm=zstd:6"
+  "compress_algorithm=zstd"