Ask Your Question
5

shell command to fix filesystem

asked 2011-12-16 12:50:56 -0500

tonybrowning gravatar image

updated 2011-12-16 13:09:09 -0500

I'm using Fedora 16 Verne but before it was Beta. My problem began when I just had updated my auto YUM software updates yesterday, 12/15/11 and it updated Linux kernel from fedora (3.1.5-1.fc16.i686) to (3.1.5-2.fc16.i686) rpm 32bit, then my laptop started acting unstable with a sign Oh no! Something has gone wrong. A problem has occurred and the system can't recover. Please log out and try again. So I did that and then it read Need to contact adminstrator, of which I am. After booting up, everytime it displays....even if I try booting the other 2 earlier Linux kernels, dracut still drops to command shell and gives this same read-out:

Booting 'Fedora (3.1.5-2.fc16.i686)'

Loading Fedora (3.1.5-2fc16.i686)'

Loading initial ramdisk...

_Fedora-16-Beta-: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)

dracut Warning: e2fsck returned with 4

dracut Warning:_Fedora-16-Beta-contains a file system with errors, check forced.

dracut Warning:_Fedora-16-Beta-: Inodes that were part of a corrupted orphan linked list found.

dracut Warning: * An error occured during the file system check.

dracut Warning: * Dropping you to a shell; the system will try

dracut Warning: * to mount the filesystem(s), when you leave the shell.

dracut Warning:

Dropping to debug shell.

sh: can't access tty; job control turned off

(Repair filesystem):/#

ANY HELP would be most appreciated because I haven't the slightest clue how to fix this nor what went wrong. I tryed typing in fsck and it then reads fsck from util-linux 2.20.1 (or how do I leave the shell?)

edit retag flag offensive close merge delete

10 Answers

Sort by ยป oldest newest most voted
5

answered 2011-12-16 14:30:49 -0500

stephan gravatar image

type "blkid" (without quotes) to find out which partition is called Fedora-16-Beta

It will probably be something like /dev/sda2 or possibly /dev/mapper/xxxxx

Once you know which one is Fedora-16-Beta, type the command: fsck -y /dev/sda2 (substituting whichever partition was called Fedora-16-Beta)

then type exit and hopefully you will be fixed up

edit flag offensive delete link more

Comments

Thank you very much.My issue has been fixed.

Jasonli gravatar imageJasonli ( 2013-05-12 21:20:04 -0500 )edit
3

answered 2011-12-16 14:42:33 -0500

hhlp gravatar image

updated 2011-12-16 15:27:32 -0500

fsck is used to check and optionally repair one or more Linux file systems, Do not run fsck on a live or mounted file system. Running fsck on a mounted filesystem can usually result in disk and/or data corruption.

If no filesystems are specified on the command line, fsck will default to checking filesystems in /etc/fstab serially. This is equivalent to the -As options.

You can do this with fsck -Vy. And check the exit code of fsck afterwards with

echo $?

. These are some values you could get:

    0 - No errors
    1 - File system errors corrected
    2 - File system errors corrected, system should be rebooted
    4 - File system errors left uncorrected
    8 - Operational error
    16 - Usage or syntax error.
    32 - Fsck canceled by user request
   128 - Shared-library error
edit flag offensive delete link more
0

answered 2011-12-16 14:29:17 -0500

ztank1013 gravatar image

Once you are in the debug shell you should be able to run the fsck utility on the corrupted file system, try:

fsck -y

or

fsck -y <target-filesystem>

when it finishes type exit or ctrl+d to resume the normal boot process.

edit flag offensive delete link more
0

answered 2013-04-29 02:36:19 -0500

Thanks a lot .... it saved my day....

thanks again. best regards,

edit flag offensive delete link more
0

answered 2012-03-25 23:31:55 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

thanks for the commands posts here. i have encountered the same problem in fedora 16 full version. but it is finally recovered from the command fsck -y

edit flag offensive delete link more
0

answered 2012-09-19 01:23:10 -0500

this is working for my fedora 15 even..Thank you very much

edit flag offensive delete link more
0

answered 2012-03-09 11:49:27 -0500

thanks a lot. it worked 4 me.

edit flag offensive delete link more
0

answered 2012-01-30 14:22:25 -0500

Liev gravatar image

Hello! I just wanted to say i had the same problem, happened when i upgraded the linux kernel with yumex. I also found that the partition was inside mapper. Thig is after doing the whole process (and ia ran echo $? to verify there were no errors) every time i boot the most recent kernel i keep getting the same message and either i have to do the same process of fsck o just ignore it, type exit and continue booting normally... Is it normal that it keeps giving me the same mistake after running the fsck on the right partition? Thanks for your time!

edit flag offensive delete link more
0

answered 2012-01-30 14:23:20 -0500

Liev gravatar image

Hello! I just wanted to say i had the same problem, happened when i upgraded the linux kernel with yumex. I also found that the partition was inside mapper. Thig is after doing the whole process (and ia ran echo $? to verify there were no errors) every time i boot the most recent kernel i keep getting the same message and either i have to do the same process of fsck o just ignore it, type exit and continue booting normally... Is it normal that it keeps giving me the same mistake after running the fsck on the right partition? Thanks for your time!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-12-16 12:50:56 -0500

Seen: 61,754 times

Last updated: Apr 29 '13