How to do check the file system in Linux
Take down system to single user mode and umount system
Following are steps :
=> Use init (process control initialization ) command to change runlevel 1 (singe user mode)
=> Use umount command to unmount /home file system
=> Run fsck using fsck command
Let us say you would like to run fsck on /home (/dev/sda3):
# init 1
# umount /home
# umount /dev/sda
# fsck /homeOR
# fsck /dev/sda3OR
# e2fsck -y /dev/sda3
(b) Boot from the installation CD into rescue mode
If you are using Cent OS/Fedora Core/RHEL linux, boot from first CD and at boot prompt type linux rescue nomount:
boot: linux rescue nomount
Now make new node for disk and partition 3:
# mknod /dev/sda
# mknod /dev/sda3
# fsck /dev/sda3
OR
# e2fsck -y /dev/sda3
Don't forget to reboot the system:
# exit;exit
# reboot
Following are steps :
=> Use init (process control initialization ) command to change runlevel 1 (singe user mode)
=> Use umount command to unmount /home file system
=> Run fsck using fsck command
Let us say you would like to run fsck on /home (/dev/sda3):
# init 1
# umount /home
# umount /dev/sda
# fsck /homeOR
# fsck /dev/sda3OR
# e2fsck -y /dev/sda3
(b) Boot from the installation CD into rescue mode
If you are using Cent OS/Fedora Core/RHEL linux, boot from first CD and at boot prompt type linux rescue nomount:
boot: linux rescue nomount
Now make new node for disk and partition 3:
# mknod /dev/sda
# mknod /dev/sda3
# fsck /dev/sda3
OR
# e2fsck -y /dev/sda3
Don't forget to reboot the system:
# exit;exit
# reboot