Solved

e2fsck: need terminal for interactive repairs

Posted on 2004-09-03
1
5,750 Views
Last Modified: 2013-12-06
Hi,

I am using Red Hat Linux 8 and recently my machine hung on reboot so I had to manually turn it off and on again.  When the system started up it asked to perform a file system check to make sure everything was ok.  It reported a problem similar to:

Inode11 is too big
UNEXPECTED INCONSISTENCY; run fsck MANUALLY
(without -a or -r parameters)

So I run fsck with the -A option so that it would get the file systems out of the fstab file and fix them sequentially, but this returns the following error for each file system:

e2fsck: need terminal for interactive repairs

What can I do to get fsck to automatically repair everything?

Thanks
0
Comment
Question by:garry_m
1 Comment
 
LVL 20

Accepted Solution

by:
Gns earned 100 total points
ID: 11972199
Well first of all I wouldn't aim at letting e2fsck do the repeairs automatically. You could well end up with an unuseable filesystem that way.
Start by running it with the -n flag (automatically answering "no" to every question) so that you get to see the extent of the problems. I'd also try with a "secondary superblock" since massive amounts of errors might indicate that you actually have a broken superblock... You specify this with the -b option ,,, Here's a quote of that section from the manpage:
       -b superblock
              Instead  of  using  the  normal  superblock,  use an alternative
              superblock specified by superblock.   This  option  is  normally
              used  when the primary superblock has been corrupted.  The loca-
              tion of the backup superblock is dependent on  the  filesystem's
              blocksize.    For  filesystems  with  1k  blocksizes,  a  backup
              superblock can be found at block 8193; for filesystems  with  2k
              blocksizes,  at  block  16384;  and  for 4k blocksizes, at block
              32768.

              Additional backup superblocks can be  determined  by  using  the
              mke2fs  program  using  the  -n  option  to  print out where the
              superblocks were created.   The -b option to mke2fs, which spec-
              ifies blocksize of the filesystem must be specified in order for
              the superblock locations that are printed out to be accurate.

              If an alternative superblock is specified and the filesystem  is
              not  opened  read-only,  e2fsck  will make sure that the primary
              superblock is  updated  appropriately  upon  completion  of  the
              filesystem check.

... Now, if you get dumped at a prompt and e2fsck don't wan't to run because of "no terminal" it might just be a question fo setting the TERM environment variable... Or you could boot rescue mode from your install CD1 and perform the repairs there.

In a pinch, you can specify the -y option, which will (analoguously to the -n option) assume a "yes" to evey question...

-- Glenn
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now