fsck on mounted system?
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Fri Sep 7 13:30:00 UTC 2012
Liam Proven wrote:
> On 7 September 2012 11:26, oxy <oxyopes at googlemail.com> wrote:
>>> sudo touch /forcefsck
>>>
>>> and then the filesystem should be checked at the next reboot.
>>
>> is there a way to force fsck on shutdown?
>
> No, not AFAIK, because the system would have to drop from a multituser
> runlevel down to single-user in order that the filesystems could be
> remounted read-only.
That could be done of course, but at shutdown, the system is also in its
'most likely to be corrupt' state. Not the ideal time to run some
self-checking code. It would be better to let the system shut down,
reboot so it's in a completely known state, then run fsck and shut down
again.
More information about the ubuntu-users
mailing list