You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于GRUB中fsck.mode=force是否覆盖fstab第6列选项的技术问询

关于GRUB中fsck.mode=force是否覆盖fstab第6列选项的技术问询

Hey there, great question—let’s break this down clearly so you know exactly what’s happening with your setup!

核心结论

Yes, the fsck.mode=force and fsck.repair=yes kernel parameters you added to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub will completely override the 6th column (passno) settings in /etc/fstab, including your root partition’s 0 value.

具体细节解释

Let’s unpack why this works the way it does:

  • What the fstab 6th column (passno) does
    That passno field controls when (and if) fsck checks your filesystems on boot:

    • 0: Never check the filesystem, no matter what
    • 1: Check this filesystem first (reserved for root partitions)
    • 2: Check after all 1 priority partitions are done (for non-root filesystems)
      This is the default behavior when no kernel-level fsck overrides are set.
  • Why GRUB kernel parameters take precedence
    Kernel boot parameters like fsck.mode=force are high-priority, runtime overrides that bypass the normal fstab-based check logic. fsck.mode=force tells the initramfs’s fsck hook to:

    Force a filesystem check on all mounted filesystems, regardless of their passno value in /etc/fstab

    Pair that with fsck.repair=yes, and fsck will automatically fix any detectable, non-critical issues without waiting for user input during boot.

  • Your root partition example
    Even though you set your root partition’s passno to 0 (which normally skips checks), adding these two GRUB parameters means:

    • On every boot, your root partition will be scanned for filesystem errors
    • If errors are found, fsck will attempt to repair them automatically

Just a quick side note: If you ever want to go back to normal behavior, just remove those two parameters from your GRUB config, run update-grub, and reboot.

备注:内容来源于stack exchange,提问作者Faxopita

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 13:08:08