Tech Support banner

Status
Not open for further replies.
1 - 4 of 4 Posts

·
Registered
Joined
·
17 Posts
Discussion Starter #1
/dev/hda6 contains a file system with errors, check forced.
/dev/hda6:
Unattached inode 51291
/dev/hda6: Unexpected Inconsistency; Run FSCK
Manually. (i.e, Without -a or -p options)
/dev/hda1: Clean, 3075/223104 Files, 164368/445795 blocks [Failed]

Please help me. I don't have that much experience working with Linux.
 

·
Registered
Joined
·
471 Posts
All this happens as super user. First do a "umount /dev/hda6".. If it won't umount, find out which program is accessing something on that disk. A way to find which file is open on hda6 is to run "/usr/sbin/lsof | more" and look for the file that is being accessed. To find the file you will need to run "df /dev/hda6" and see where the mount point is. lsof dumps a lot of stuff, like libraries in use, etc. You have to umount that partition or you could risk scrambling the partition. You might have to start your machine in single user mode.

The "fsck" command will call the proper program to fix your /dev/hda6 file system type. It probably call /sbin/fsck.ext2 or /sbin/fsck.ext3

You might try seeing which file inode number 51291 is hooked to. If you do a "ls -i -R <mount-pt-of-/dev/hda6>", the ls command might tell you which file that Inode is associated with. Inodes for a single file a chained together and I don't know how to traverse the inode list.

Then run /sbin/fsck -f -p /dev/hda6". The -a is the "automatic mode". I would try the -p mode (prompt) first. It will prompt you for your fix, if you know what it should be!! The program should dump enough to tell you what might be wrong. The -f is the flag to force a scan. I would just enter "yes" for the program to fix it. Hope, that nothing breaks and you have a good backup. When you are done, run it again: "/sbin/fsck -f /dev/hda6". If you don't put the -f, fsck will return in about 2 seconds and say "everything is OK". Type "sync" when you're done to flush changes to the file systems.

If you want, you can try e2fsck and debugfs.

Good luck. Just one unattached inode isn't bad. Wait tell you have 30 or 40, then the easiest thing to do is just say "yes".
 

·
Registered
Joined
·
17 Posts
Discussion Starter #3
Thank you for your help. Where do I enter the command? When I turn on the computer, after display the error, it commands me to enter the root password or press control d to reboot.

All this happens as super user. First do a "umount /dev/hda6".. If it won't umount, find out which program is accessing something on that disk. A way to find which file is open on hda6 is to run "/usr/sbin/lsof | more" and look for the file that is being accessed. To find the file you will need to run "df /dev/hda6" and see where the mount point is. lsof dumps a lot of stuff, like libraries in use, etc. You have to umount that partition or you could risk scrambling the partition. You might have to start your machine in single user mode.

The "fsck" command will call the proper program to fix your /dev/hda6 file system type. It probably call /sbin/fsck.ext2 or /sbin/fsck.ext3

You might try seeing which file inode number 51291 is hooked to. If you do a "ls -i -R <mount-pt-of-/dev/hda6>", the ls command might tell you which file that Inode is associated with. Inodes for a single file a chained together and I don't know how to traverse the inode list.

Then run /sbin/fsck -f -p /dev/hda6". The -a is the "automatic mode". I would try the -p mode (prompt) first. It will prompt you for your fix, if you know what it should be!! The program should dump enough to tell you what might be wrong. The -f is the flag to force a scan. I would just enter "yes" for the program to fix it. Hope, that nothing breaks and you have a good backup. When you are done, run it again: "/sbin/fsck -f /dev/hda6". If you don't put the -f, fsck will return in about 2 seconds and say "everything is OK". Type "sync" when you're done to flush changes to the file systems.

If you want, you can try e2fsck and debugfs.

Good luck. Just one unattached inode isn't bad. Wait tell you have 30 or 40, then the easiest thing to do is just say "yes".
 

·
Registered
Joined
·
471 Posts
You need to enter the root password. It will then come back with a prompt of # (a single pound sign). Enter fsck at that point (right after the #). Enter several carriage-returns when you first get the # sign will show you how the shell is working. The # is the universal shell "sign" that you are running as root.

To log out enter the CNTL-D keys. If that doesn't work try, logout, logoff, exit, reboot until something works. A CNTL-ALT-DEL will probably work, but do a sync first to flush everything to the disks.
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top