Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Force fsck safe?

Writer Matthew Martinez

My ubuntu system just froze, and I was forced to run the REIUSB commands. Now, in windows, you can run chdsk. I've read about "touch /forcefsck", but I have also read that's is dangerous to check a mounted filesystem.

Will "touch /forcefsck" check the disks mounted? Is "touch /forcefsck" safe? Will it automatically fix the errors? Where will my corrupt file go?

Thanks in advance!

2 Answers

touch /forcefsck simply creates a file /forcefsck. This file will cause the system to run fsck on the next reboot before the filesystem is mounted. Its similar to when you try to run chkdsk in Windows and it says it can't but it will do it on the next reboot.

So its pretty safe and with any luck it will fix your problem.

1

Yes and no. It is safe enough, and some distros will routinely run this every 30 days.

The generally preferred method is to boot a live distro and check the drive as a non-system device, partition by partition if need be. You can run e2fsck -c -c to check for bad blocks, it will take a while. Note that for LVM groups some special handling is required. (check from /dev/mapper/...). The most recent versions of GParted and the like do this fairly handily.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy