Download checkroot7/1/2023 To force the fsck during reboot, first create an empty file called forcefsck under / as shown below. So, to force a root filesystem check, one of the easy way is to reboot the system, and force fsck to perform the filesystem when the system is starting up before the root filesystem is mounted by the kernel. Create /forcefsck File to Force Check Root Filesystem We want to perform root filesystem fsck check now. This will happen only after May.īut, in our case, we don’t want to wait until May. Next check after: indicates the date and time after which when you perform a reboot, the filesystem will be checked.In this example, it will wait for another 6 months before fsck will be executed on this filesystem during reboot. Check internal: indicates how often the root filesystem will be checked.Last checked: indicates the last time the root filesystem check happened. So, what is the solution?Īlso, if you are new to fsck, refer to this: 10 Linux Fsck Command Examples to Check and Repair Filesystemīefore we reboot the system, let us check when was the last time fsck performed a check on the root filesystem.įor this, use tune2fs command, and grep for “check” as shown below. If you are performing a fsck on a non-root file system, you can just unmount that partition and perform fsck.īut in this case, we like to perform fsck on a root filesystem. If you run a fsck to check your root filesystem, you’ll get the following error message, as /dev/sda1 is mounted, and your cannot perform fsck on a mounted filesystem. In this example, /dev/sda1 partition is the root filesystem that is mounted as / # df -hįilesystem Size Used Avail Use% Mounted on This quick tutorial explains how to force filesytem check for a root filesystem. But, for root filesytem, you cannot perform fsck when it is mounted. Performing fsck on non-root filesystem is fairly straight forward.
0 Comments
Leave a Reply. |