Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Help! fsck failed error...

  1. #1
    Join Date
    Jun 2006
    Location
    New Orleans, Louisiana
    Beans
    56
    Distro
    Kubuntu Karmic Koala (testing)

    Help! fsck failed error...

    My partner rebooted my pc this morning after an unspecified problem (ktorrent hanging i think). I wasn't awake yet so did not see exactly what was happening before the reboot. Anyhow, upon rebooting, it did not make it to x or kdm or the desktop and this is what was on screen when I saw it:

    Code:
    * Setting kernel variables... [ok]
    * Activating swap [ok]
    * Checking root file system...
    1232
    fsck 1.40.8 (13-Mar-2008)
    /dev/sbd2 contains a file system with errors, check forced.
    Checking drive /dev/sbd2: 0% (stage 1/5, 2/195)
    Checking drive /dev/sbd2: 1% (stage 1/5, 3/195)
    Checking drive /dev/sbd2: 1% (stage 1/5, 4/195)
    Checking drive /dev/sbd2: 1% (stage 1/5, 5/195)
    Checking drive /dev/sbd2: 5% (stage 1/5, 14/195)
    Checking drive /dev/sbd2: 8% (stage 1/5, 23/195)
    Checking drive /dev/sbd2: 11% (stage 1/5, 32/195)
    /dev/sbd2: Inodes that were part of a corrupted orphan linked list found.
    
    /dev/sbd2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
                 (i.e., without -a or -p options)
    fsck died with exit status 4
    Checking drive /dev/sbd2: 12% (stage 1/5, 35/195)
                                                                                                                     [fail]
    * An automatic file system check (fsck) of the root file system failed.
    A manual fsck must be performed, then the system restarted.
    The fsck should be performed in maintenance mode with the
    root file system mounted in read-only mode.
    * The root filesystem is currently mounted in read-only mode.
    A maintenance shell will now be started.
    After performing system maintenance, press CONTROL-D
    to terminate the maintenance shell and restart the system.
    bash: no job control in this shell
    bash: groups: command not found
    bash: lesspipe: command not found
    bash: command: command not found
    bash: The: command not found
    bash: dircolors: command not found
    bash: Command: command not found
    bash: The: command not found
    root@POOT~#_
    The fsck check thing has run before as I have a dual boot (Windows XP/Kubuntu Hardy Heron) system with a shared NTFS drive. Sometimes when XP locks up or needs a hard reset, upon booting Kubuntu, the fsck thing complains and will not mount the drive. That is usually easily fixed by rebooting windows and then rebooting once again into Linux. But this time the reboot was as a result of some problem with a hanging application in Linux itself. My partner is not computer literate and did not realise you can simply kill the app itself rather than restarting the pc.

    I am not sure what to do about this error and unable to get into x or the desktop...

    Any ideas?
    Last edited by c_martini; July 25th, 2008 at 11:18 AM.
    • c h r i s m •

  2. #2
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Help! fsck failed error...

    Yes, you probably need to run e2fsck without the -a or -p options, You may need to recover some files from the /lost+found afterwards.
    Code:
    sudo e2fsck -y -f -v /dev/sdb2
    You should run that command from a live CD.
    Last edited by Herman; July 25th, 2008 at 11:38 AM.
    Ubuntu user since 2004 (Warty Warthog)

  3. #3
    Join Date
    Oct 2006
    Location
    Belgrade, Serbia
    Beans
    1,321
    Distro
    Ubuntu

    Re: Help! fsck failed error...

    You will need a live cd for this one

    Follow this post:
    http://ubuntuforums.org/showthread.p...62#post5454162

    but don't use -fp in e2fsck command as the error describes, you will be asked several questions where you will have to respond with simple yes/no (from what I remember)
    for example:
    Code:
    e2fsck /dev/sbd2

  4. #4
    Join Date
    Jun 2006
    Location
    New Orleans, Louisiana
    Beans
    56
    Distro
    Kubuntu Karmic Koala (testing)

    Re: Help! fsck failed error...

    Quote Originally Posted by Herman View Post
    Yes, you probably need to run e2fsck without the -a or -p options, You may need to recover some files from the /lost+found afterwards.
    Code:
    sudo e2fsck -y -f -v /dev/sdb2
    You should run that command from a live CD.
    Quote Originally Posted by forger View Post
    You will need a live cd for this one

    Follow this post:
    http://ubuntuforums.org/showthread.p...62#post5454162

    but don't use -fp in e2fsck command as the error describes, you will be asked several questions where you will have to respond with simple yes/no (from what I remember)
    for example:
    Code:
    e2fsck /dev/sbd2
    Thanks for the lightening fast response. whoa! I wasn't expecting anything until at least this afternoon, which is why I posted early while at work.

    Thanks to both of you and will burn a fresh live cd and give it a go this evening and let you know how I made out...

    • c h r i s m •

  5. #5
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Help! fsck failed error...

    The -y option automatically says 'Yes' to any or all questions about whether to unlink certain files to the "Lost+Found" (owned by root), so you won't have to keep typing it yourself manually in case a lot of files need to be moved.

    These will be renamed to the inode on which they were found.

    Afterwards you should be able to do "gksudo nautilus", and right-click on the "Lost+Found" folder, and change the file ownership and permissions.
    Then drag & drop the folders and files to another disc or a spare partition and see if you can identify them.
    (Thanks to confused 57 for the above info).

    If you're lucky they'll only be data files.
    Try to boot Ubuntu and keep your fingers crossed.
    If Ubuntu still boots and everything works okay then good.
    If Ubuntu doesn't boot or runs with problems, some vital operating system files may have been moved that might not be easy to identify and restore. If that's the case, you'll need to make a backup of all the rest of your files, and re-install Ubuntu maybe.
    Ubuntu user since 2004 (Warty Warthog)

  6. #6
    Join Date
    Jun 2006
    Location
    New Orleans, Louisiana
    Beans
    56
    Distro
    Kubuntu Karmic Koala (testing)

    Re: Help! fsck failed error...

    I think perhaps I wasn't clear previously about this problem and it came to light once I tried your suggestions:

    The partition in question is actually from an NTFS formatted drive. The strange thing is, the live cd boots and mounts all the drives with no problem. When I tried the above suggestions from the live cd desktop environment, I get the following errors (screenshot attached):



    I would imagine that is because the drive is NTFS formatted. Actually the device (sdb2) is a 1kb partition which i don't understand as well... So what to do now? When i test the drive in Windows, no errors are reported...

    • c h r i s m •

  7. #7
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Help! fsck failed error...

    Oh, it has the NTFS file system...

    Okay then, maybe you should check your /etc/fstab file first and make sure it's up to date and correct.

    The method I use for doing that now is to type 'sudo blkid' into a terminal and copy the output from that, then open my /etc/fstab file and paste the blkid output to the bottom of it and 'hash it out'.

    For example I copy this output,
    Code:
    herman@blackacer:~$ sudo blkid
    /dev/sda1: UUID="2629-16F0" TYPE="vfat" 
    /dev/sda2: UUID="78ef4f70-84eb-47bc-bf00-9af5692e3839" SEC_TYPE="ext2" TYPE="ext3" 
    /dev/sda4: UUID="b1f95da4-09a0-4cd6-b5d0-facd57f0c94e" SEC_TYPE="ext2" TYPE="ext3" 
    /dev/sda5: TYPE="swap" UUID="90f74a0c-6580-4f69-99aa-7561febb3fe5" 
    /dev/sdb1: UUID="005D0DF776970DD3" TYPE="ntfs" 
    /dev/sdb5: UUID="6ae3e4f2-0fb1-42b4-b2fe-3c78a75efa04" TYPE="ext3" 
    /dev/sdb6: TYPE="swap" UUID="f992474b-63d4-4c85-adcd-e3155bb3bfac"
    Then I get my /etc/fstab file open with root priveleges,
    Code:
    gksudo gedit /etc/fstab
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sdb5
    UUID=6ae3e4f2-0fb1-42b4-b2fe-3c78a75efa04 /               ext3    relatime,errors=remount-ro 0       1
    
    # /dev/sdb6
    UUID=f992474b-63d4-4c85-adcd-e3155bb3bfac none            swap    sw              0       0
    
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    ...and I paste the blkid output to the bottom of my /etc/fstab file and make sure I comment each line out with a '#' (hash mark).
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sdb5
    UUID=6ae3e4f2-0fb1-42b4-b2fe-3c78a75efa04 /               ext3    relatime,errors=remount-ro 0       1
    
    # /dev/sdb6
    UUID=f992474b-63d4-4c85-adcd-e3155bb3bfac none            swap    sw              0       0
    
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
    
    # /dev/sda1: UUID="2629-16F0" TYPE="vfat" 
    # /dev/sda2: UUID="78ef4f70-84eb-47bc-bf00-9af5692e3839" SEC_TYPE="ext2" TYPE="ext3" 
    # /dev/sda4: UUID="b1f95da4-09a0-4cd6-b5d0-facd57f0c94e" SEC_TYPE="ext2" TYPE="ext3" 
    # /dev/sda5: TYPE="swap" UUID="90f74a0c-6580-4f69-99aa-7561febb3fe5" 
    # /dev/sdb1: UUID="005D0DF776970DD3" TYPE="ntfs" 
    # /dev/sdb5: UUID="6ae3e4f2-0fb1-42b4-b2fe-3c78a75efa04" TYPE="ext3" 
    # /dev/sdb6: TYPE="swap" UUID="f992474b-63d4-4c85-adcd-e3155bb3bfac" 
    Now if a line is incorrect or out of date, I can easily compare the file system types and UUID numbers from the blkid output, which is correct, to the corresponding information in my /etc/fstab file which may be incorrect out of date, and copy/paste the correct information to my /etc/fstab lines.

    It may be that you had an ext3 file system there in your /dev/sda2 partition and you have since reformatted it to an NTFS file system and your /etc/fstab file and hence your Ubuntu operating system is still treating it as if it is formatted with ext3.
    I'm not sure if that's the case or not, just making a guess.

    If it's already listed as NTFS in your /etc/fstab file, you can tell Ubuntu not to bother running a file system check on it at boot-up by changing the last '1' or '2' in your /etc/ the /etc/fstab line for that file system to a '0', and Ubuntu will skip the file system check at boot-up for that partition.
    For example,
    Code:
    #/dev/sda2     
       UUID=285F98566380864A   /media/ntfsdata  ntfs ro,umask=0002,nls=utf8      0         1
    Change the '1' to a '0', like this,
    Code:
    #/dev/sda2     
       UUID=285F98566380864A   /media/ntfsdata  ntfs ro,umask=0002,nls=utf8      0         0
    Just make sure you do remember to run a file system check on that file system from Windows now and again, because all file systems do need checking quite frequently.

    You can run a file system check in your NTFS partition from Linux these days quite safely if you want to,
    Code:
    sudo apt-get install ntfsprogs
    Code:
    sudo umount /dev/sda2
    Code:
    sudo ntfsfix /dev/sda2
    Ubuntu user since 2004 (Warty Warthog)

  8. #8
    Join Date
    Dec 2007
    Beans
    341

    Re: Help! fsck failed error...

    NTFSfix really dosent fix any ntfs errors all it does is reset the logfile and marks the dirty bit for chkdsk to run when windows boots

  9. #9
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    5,100
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Help! fsck failed error...

    NTFSfix really dosent fix any ntfs errors all it does is reset the logfile and marks the dirty bit for chkdsk to run when windows boots
    Where did you get that information from?
    Ubuntu user since 2004 (Warty Warthog)

  10. #10
    Join Date
    Dec 2007
    Beans
    341

    Re: Help! fsck failed error...

    It only repairs some fundamental NTFS
    inconsistencies, resets the NTFS journal file and schedules an NTFS
    consistency check for the first boot into Windows.

    I think the fundamental ones are like the $bitmap connectivity and all that.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •