When the OS is started, there will be an operation to check whether filesystem is correct. If filesystem is inconsistent, fsck will be executed automatically. The main cause of filesystem inconsistent is power off, this is what we call hard shutdown.
When you run fsck, if you find that you cannot check the filesystem of a partition, fsck will be failed and the system will enter the repair filesystem mode. The phenomenon is:
Finding module dependencies; modprobe: can't locate module block-Major-3 fsck. ext3possibly non-existent or swap device? Such device or address while trying to open/dev/hdb1/boot: clena, 41/26104 files. 12679/104391 blocks [failed]
* ** An error occurred during the file system check *** dropping you to a shell; the specified M will reboot
*** When you leave the shell give root password for maintenance
(Or type control-D to continue ):
Login incorrect. (repair filesystem) 1 #
In this case, enter the root password and enter the repair filesystem command line. Here, you can temporarily uninstall the wrong or nonexistent Mount directory to enable the operating system to start properly, after startup, you can perform fsck or other operations on a partition. The problem is that in repair filesystem mode, the root partition is read-only, so you cannot modify/etc/fstab to detach a mount point. You can run the following command to make it writable:
(Repair filesystem) 1 # Mount-O remount, RW/
Then, you can modify it through Vim/etc/fstab.
Here, I only introduced some principles. For specific operation methods for different application scenarios, refer
System Solution