Linux - Forcing disk verification using fsck

Ask a question



Intro


Disk verification under Linux, is done using the command fsck. However, for security constraints concerning the data present on the disk, it is strongly advised not to launch fsck from on a mounted partition. Note that it is difficult to remove the partitions requiring fsck because they are used by the system.

Solution 1


The aim is to request that the system to perform the fsck at the next reboot. To do this you just need to run the shutdown command with the-F parameter:
  • shutdown -r -F now

Solution 2

  • Another solution is to create the forcefsck file at the root of the system:
  • touch/forcefsck 
  • At the next restart, your hard disk will be analyzed and the file / forcefsck destroyed.
Jean-François Pillou

Jean-François Pillou - Founder of CCM
Better known as Jeff, Jean-François Pillou is the founder of CommentCaMarche.net. He is also CEO of CCM Benchmark and digital director at the Figaro Group.

Learn more about the CCM team