For some reasons, my Linux home server experience frequent hangs or crashes in the past few days. Oftentimes, it would be inaccessible in the morning so I had to press the restart button almost everyday. This morning was the worst experience so far, when I had to reboot it after every 10-15 minutes or so. I was planning to re-install the OS, but got the chance to look at the kernel crash logs first. It was then that I noticed that the logs suggests some problems with the hardware. I suspected that it was probably a faulty video card, so I replaced the video card with an old one from my stock and glad to say, no more reboots until now.
Due to the frequent force restarts I did prior to fixing the crashes due to a faulty hardware, I wanted to make sure that my disks are still ok. You can actually do this using the e2fsck command, but then it’s not recommended or at times won’t work on a mounted disk. Usually, most Linux distros does a disk check after a pre-defined number of reboots, but I just couldn’t wait for this to happen since it usually defaults to around 30 or more before a disk check is triggered upon bootup.
Well, you can actually force a disk check on the next reboot using the following commands:
sudo touch /forcefsck
reboot
You would then see a disk check happening in the boot process. In my case, I was glad that my disks, especially the root partition was still fine and there were no damaged or bad sectors whatsoever. Whew! ![]()
Popularity: 40% [?]
December 12th, 2009 at 4:46 am
it doesnt check for badblocks…
try “man badblocks”
December 30th, 2009 at 9:12 am
Thanks for the tip ibart.