LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "An error occurred during the file system check." (https://www.linuxquestions.org/questions/linux-newbie-8/an-error-occurred-during-the-file-system-check-662333/)

JedSezZed 08-12-2008 06:15 PM

"An error occurred during the file system check."
 
Greetings. I'm a Linux n00b who's found himself in a fix. It started with a full partition. Doing a "df -h" I could see that /dev/hdc2 had 0% available. I tried a few things I found here and ended up not being able to boot at all.

I tried "apt-get clean" but said I didn't have it.

Now I boot and at some point get to:
Quote:

Press Y within 5 seconds to force file system integrity check...y
awk: cmd. line:2: fatal: cannot open file '/proc/mounts' for reading (No such file or directory)
Checking root filesystem
Couldn't open /proc/partitions: No such file or directory
Is /proc mounted?
/etc/rc.d/rc.sysinit: line 251: failure: command not found



***An error occurred during the file system check.
***Dropping you to shell; the system will reboot
***when you leave the shell.
Give root password for maintenance
(or type Control-D for normal startup):
I have looked at several similar threads but haven't been able to get the help suggested to help me.

I tried the Control-D and it just ended up here again. So next time I entered the root password.

Quote:

(Repair filesystem) 1 #
I've tried a lot of stuff here:

(Repair filesystem) nn # fdisk -l
Quote:

cannot open /proc/partitions
(Repair filesystem) nn # fsck /dev/hdc2
Quote:

fsck 1.27 (8-Mar-2002)
Couldn't open /proc/partitions: No such file or directory
Is /proc mounted?
(Yes I see the date is wrong)

At "(Repair filesystem) nn #" I "cd /" and "ls" to see that there is a proc directory but "cd proc" then "ls" shows nothing. Is that significant?


Thanks in advance.

onebuck 08-12-2008 06:20 PM

Hi,

You should boot the system as 'single' or use a Livecd to boot then do your repair on the filesystem in question.

JedSezZed 08-13-2008 09:55 AM

Quote:

Originally Posted by onebuck (Post 3245292)
Hi,

You should boot the system as 'single' or use a Livecd to boot then do your repair on the filesystem in question.


Awesome. I'm downloading an ISO now.

Can you give me some direction on repairing the filesystem?

onebuck 08-13-2008 12:10 PM

Hi,

Once you boot either as single or with the Livecd of choice you can do a 'fsck' on the filesystem in question. Do a 'man fsck';

Code:

excerpt from 'man fsck'                                       

NAME
      fsck - check and repair a Linux file system

SYNOPSIS
      fsck  [  -sAVRTMNP  ] [ -C [ fd ] ] [ -t fstype ] [filesys ... ] [--] [
      fs-specific-options ]

DESCRIPTION
      fsck is used to check and optionally repair one or more Linux file sys-
      tems.  filesys  can  be  a device name (e.g.  /dev/hdc1, /dev/sdb2), a
      mount point (e.g.  /, /usr, /home), or an ext2 label or UUID  specifier
      (e.g.  UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).  Nor-
      mally, the fsck program will try to  handle  filesystems  on  different
      physical  disk  drives  in  parallel to reduce the total amount of time
      needed to check all of the filesystems.

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

      The exit code returned by fsck is the sum of the following conditions:

The exit code returned by fsck is the sum of the following conditions:
            0    - No errors
            1    - File system errors corrected
            2    - 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
      The exit code returned when multiple file systems are  checked  is  the
      bit-wise OR of the exit codes for each file system that is checked.

      In  actuality,  fsck  is simply a front-end for the various file system
      checkers (fsck.fstype) available under Linux.  The file system-specific
      checker  is  searched for in /sbin first, then in /etc/fs and /etc, and
      finally in the directories listed in  the  PATH  environment  variable.
      Please  see  the  file system-specific checker manual pages for further
      details.

OPTIONS
      -s    Serialize fsck operations.  This is  a  good  idea  if  you  are
              checking  multiple filesystems and the checkers are in an inter-
              active mode.  (Note: e2fsck(8) runs in an  interactive  mode  by

...

You could look online at 'LINUX MAN PAGES ONLINE'. That way you can select the proper options for the operations you need or desire. The most likely would be '-ra' as options or '-y' to automatically repair. You should be cautious as to the automagic as it sometimes opens other possible problems. Interactive will always win for me.

'man' is your friend so use it!

These links and others can be found at 'Slackware-Links' . More than just SlackwareŽ links!

JedSezZed 08-13-2008 10:37 PM

I'm having some trouble getting going here from a Live CD. I downloaded both Ubuntu and SLAX. Something seems wrong with the Ubuntu but that isn't the problem. The SLAX loaded just fine. So what's the problem? I can't do an fsck where I want to (on the hdc1 and hdc2 is where I think I want to work).

Okay so now my Live CD. I boot, get a lovely SLAX desktop open shell-Konsole and go to root (cd /) the prompt is root@slax:~#

I can see the directories but these are the ones loaded from my CD right? The ones I want to fsck are on my HD. How do I get there?

There is one important detail I have forgotten until recently, so I haven't listed it in my experiences above. I had a few unclean shutdowns immediately before being unable to boot. It's also worthy to restate that the file the filecheck fails to find "proc/partitions" doesn't seem to exist. In fact the proc dir is quite empty.

Thanks again in advance for your help if you can provide any.

EDIT for update:
Update:

I still haven't been able to do any fsck that has the kind of outcome I'm hoping for but I've made some progress. Using the GUI I've been able to find my partitions on the HD. I've deleted a bunch of stuff i have copies of elsewhere and am 88% finished copying some website and forum stuff i really didn't want to lose. Happily my Mac has a nice little FTP server running on it. :-)

I wonder if it's grub I'm supposed to fix? Oh well.

onebuck 08-14-2008 12:23 AM

Hi,

Make sure to check the md5 sums for the downloads you do. That way you know the iso image is valid for the Livecd you burn.

You are going to be working on the filesystem in question in a single user mode. That way you know there won't be others touching the filesystem. You can do a fsck on a device if that is the way wish to go. You should read the 'man fsck'.

Do a 'fdisk -l' to find the desired device that contains your filesystem in question. Remember that the possibility of device reassignment exists.

You could mount the device to confirm it is the one to 'fsck' on by what contents are within the filesystem. As I stated you can 'fsck' on a device that contains the filesystem. Read the man!

You could look at '19.5 File System Repair: fsck' part of the 'Rute Tutorial & Exposition' for a detailed explanation.

These links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!


All times are GMT -5. The time now is 09:00 AM.