Linux - Force disk verification (fsck)
IT Tricks Random

Linux – Force disk verification (fsck)


#Linux #Force #disk #verification #fsck

In Linux, the verification of the disks is done thanks to the command fsck. But, for security reasons of the data present on the disk, it is discouraged to perform fsck on a mounted partition. In addition, it is difficult to unmount partitions that need an fsck, as they are used by the system. Learn how to solve.


Solutions

1

The tip then is to ask the system to do fsck on the next boot. To do so, simply launch the command shutdown with the parameter -F :

shutdown -r -F now

2

An alternative is to create the file forcefsck at the root of the system:

touch /forcefsck

On the next boot, the disks will then be analyzed and the file / forcefsck destroyed.

Photo: © Andrew Neel – Unsplash.

Leave a Reply

Your email address will not be published. Required fields are marked *