Kernel panic: EXT2 fs panic

Posted on 1998-04-21
Last Modified: 2008-03-06
I was trying to install a new version of an applicatio (MATLAB 5.2) when at installation 45% complete the following message appeared: kernel panic: EXT2 fs panic (device 03:42): ext2_read_inode: unable to read i-node block - inode=174081, block=696328. I could not do much after that - even stopping installation have not removed several related processes, which had STAT designation "D", I could not write anything to the partition onto which I've attempted to install the application (message was that it is read-only partition)).
I even could not reboot and CTRL-ALT-DEL did not do anything either. When I've hard-reset the machine, in the process of
linux coming up I was told that there is a problem with the relevant partition and I should run fsck manually. When
I did this, I got a message that there is something wrong with this particular block, giving me option of ignoring this or not. Not ignoring stops e2fsck, ignoring  completes execution of e2fsck, but trying to install application resultos in exactly the same behavior. When I rebooted again, I noticed that in the subdirectory where the installation was to take place there are two files with extensions swp and swx, which cannot be removed - such attempt again results in a process with STAT desigantion "D", which seems to take all the resources (CPU monitor shows 100% busy), can't reboot etc. When after reset and logging in I tried to run e2fsck on this paticular partition I got the message about corrupted superblock and a suggestion of using an alternative superblock. This however
does not seem to work, the same message comes back.
I need advice how to nurse my machine back to health.
I am running RedHat 4.0 linux (2.0.18) on a pentium machine with 80Mb of RAM and plenty of disk space.
Question by:andrzej

Author Comment

ID: 1626450
Adjusted points to 300

Expert Comment

ID: 1626451
Most Possibly it is a bad block on your disk.

did you try badblocks <device> ??

if you would like to know what badblocks does, check the manpage.

Good Luck.

Author Comment

ID: 1626452
Man page for badblocks states that I need to enter also 'blocks-count' (start_count). I am not sure what this should be.
When I enter the number given as start by fdisk (even though this
number seems to refer to cylinders), the program comes out with a single number (10) which is the same as the number given by fsck "Error reading block 10...". Btw., now an attempt to install anything on this partition results in "kernel panic" pointing to a problem at this block (which is differen
than the block pointed to originally, see above). fsck gives
the same message for two other blocks (729096 and 729097).
How can I get rid of these bad blocks or mark them so that they
are not used?
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.


Expert Comment

ID: 1626453
If you type 'fdisk -l' it will show you howmany blocks the device has, under the heading 'Blocks'


root@coyote:~# fdisk -l

Disk /dev/sda: 255 heads, 63 sectors, 274 cylinders
Units = cylinders of 16065 * 512 bytes
   Device Boot   Begin    Start      End   Blocks   Id System
/dev/sda1          243      243      258   128520   82  Linux swap
/dev/sda2   *        1        1      242  1943833+  83  Linux native
/dev/sda3          259      259      274   128520   82  Linux swap

I would then type badblocks /dev/sda3 128520

LVL 51

Expert Comment

ID: 1626454
bad blocks are managed by
   mkfs -t ext2 -l file_containing_list_of_bad_blocks

Please refer to  man mkfs  for details

Accepted Solution

santhosh022698 earned 300 total points
ID: 1626455
The problem is due to Cross-linkage or Bad sectors. The solution for this is to run
e2fsck with bad block test. This test will test the hard disk for bad blocks and mark them also.
e2fsck -c /dev/<device>
will do the job.

Author Comment

ID: 1626456
Unfortunately using mkfs does not seem to help. mkfs executes all right, but I cannot even mount the filesystem in question -
as a reply to mount command I get an answer that the partition is already mounted or busy, which it is not. Interestingly, if I reboot the machine with mounting the partition through fstab,
ls -dl on the mount point gives a surprising answer "?---------" in the first column. When I umount it I get a message
EXT2-fs error (device03:42) free_inode: reserved inode or nonexistent inode. The partition seems to unmout (df does not show it) but I cannot mount it back.
 In addition fdisk -l gives me the following answer:
/dev/hdb2    411   411   820   826560   83 Linix native
Warning : invalid flag 0000 of partition tabkle 4 will be corrected by w(rite)

Needles to say, running fdisk on this partition and w(write) does not help at all even though it seems to go all right.
I am not sure if this is relevant but fdisk -l also produces at the end 7 following identical messages:
May 4 05:51:55 modprobe: Can't locate module block-major-8

Author Comment

ID: 1626457
I have finally received a problem-solving answer form the author of e2fsk, saying that there is a bug in the version of e2fsck I am using (1.04) and advising me to upgrade to the newest version
1.10 . I have done so and it fixed all the problems I have had with fs in question. Consequently this solves the problem

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Squid Connection Pools 3 69
su - oracle could not open session 6 78
Which is more secure: EAP or machine certificate for IKEv2 VPN? 1 87
Run Secure WMI query from CentOS 5 33
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

809 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