How to fix your Debian file system with fsck
Today my server is suddently report with file system error (ext4) after reboot. Some partition is not able to mount automatically and require for fsck. Here are some simple sharing about how to fix it safely.
Boot your server with Debian installation CD/DVD
First of all you should shutdown your server, and prepare with yor Debian installation CD/DVD. Both full or netinst version is suitable, or even a gparted live cd. BTW, the main point is: this bootable linux should support your harddisk controller. In case of my server it is running on hardware RAID5 with 3ware 9650SE-8LPML, so a latest Debian stable installation CD is a minimum requirement.
Go into "Rescue mode"
Once boot up your server with CD/DVD, choose "Advanced options" and "Rescue mode":
Just answer some basic question (they don't really affect your real system, just store as temporary) and soon you will face this page and ask for your root file system (i.e. your
/; in case of my server, it is /dev/sda3); BUT!! Let's choose for "Do not use a root file system":
Fix the file system with fsck
Now execute with the shell and run with following command in order to check your online harddisks:
Once you discover your online harddisk and its partition, now we can fix it with fsck, e.g.
fsck.ext3 -yfv /dev/sda1
fsck.ext3 -yfv /dev/sda3
After all checking completed, now we should shutdown the server, remove the bootable CD/DVD, and start your server again. It should now be fixed :D