Solved

e2fsck: need terminal for interactive repairs

Posted on 2004-09-03
1
5,658 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

867 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

16 Experts available now in Live!

Get 1:1 Help Now