Solved

e2fsck: need terminal for interactive repairs

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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 …
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

820 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