Solved

e2fsck: need terminal for interactive repairs

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

13 Experts available now in Live!

Get 1:1 Help Now