Solved

e2fsck: need terminal for interactive repairs

Posted on 2004-09-03
1
6,204 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
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.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

717 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