fsck command asking to repair manually

Q I wonder if you can help. I am running Ubuntu and during boot it says the following:

'fsck failed. Please repair manually.
* CONTROL-D will exit from this shell and continue system startup.
root@(none)::~#'.

Ctrl+D does indeed continue the boot process and brings me to the login screen. Logging in gives the error message:

'Your home dir is listed as: /home/john, but it does not appear to exist.
Do you want to log in with the / (root) dir as your home dir. It is unlikely that anything will work unless you use a failsafe session'.

A Despite what it sounds like, Fsck is not a chain of clothes shops, nor a strange Linux curse. It is the FileSystem Check program, which performs a similar function to the likes of Scandisk. The first message means that the boot process has detected an error on one of your partitions that needs your attention. It wants you to do this before pressing Ctrl+D to continue. By pressing Ctrl+D straight away you have left it in its faulty condition, so the partition could not be mounted. Presumably, this partition is mounted at /home, which explains why /home/john cannot be found when it fails to mount. The error message should have told you which partition was affected, for example /dev/hda6. If not, typing

grep /home /etc/fstab

will tell you which it is. Now type the following code, replacing 'N' with the partition number:

fsck -f /dev/hdaN

After some disk activity and various screen messages, Fsck should exit without an error. To be safe, I prefer to run the command a second time, to make sure things really are fixed. Now you can press Ctrl+D to continue with the boot process. If the problem persists, it is likely that your disk has a fault. Your first action should be to back your data up, now - not tomorrow. Then you should install the Smartmontools package - from http://smartmontools.sourceforge.net or an Ubuntu or Debian repository, and run

smartctl /dev/hda

for a report on your disk's health.

Back to the list