?
Solved

Bad superblock?

Posted on 1998-11-24
6
Medium Priority
?
1,160 Views
Last Modified: 2012-06-21
Hi,
My system got messed up really bad.
It lost the /usr directory.
The directory mounted a partition on my second harddrive.
I keep getting this message to run e2fsck -b 8193 <dev>.
When I run 'e2fsck -b 8193 /dev/hdb2' (second partition on second harddrive) it tells me that there's a bad superblock.
I tried running 'fsck /dev/hdb2' and it tells me to run
'esfsck -b 1581066 <dev>'.
When I do that, I get a new message saying ' bad magic number, resulted in 0 length read'.
I'm sooo lucky I had a copy of my homework on /dev/hda2 which is still alive and kicking.
Please help
Thanks
0
Comment
Question by:bod_1
[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
  • 5
6 Comments
 

Author Comment

by:bod_1
ID: 1638573
Oh, things leading up to this, last night, I mounted a dos floppy, and this morning I installed Borland C++ 4.5 on D: (/dev/hdb).
? ? ?
0
 

Accepted Solution

by:
overcode earned 200 total points
ID: 1638574
Is /dev/hdb2 an EXT2 partition? The ext2 tools WILL complain if you try to run them on DOS partitions. I've had this problem when I've tried to mount MS-DOS floppy disks without specifying "-t msdos".
If so, you need to unmount /usr and then run fsck.msdos (the manpage gives the correct options for this). Otherwise you may have some serious corruption. fsck CAN use an alternate superblock (ext2 partitions ahve multiple backups). Again, the fsck manpage gives the correct option for this (I've only had to use it once fortunately).

-Reeves

0
 

Author Comment

by:bod_1
ID: 1638575
It's an ext2 partition.  The bad thing about the problem (I think) is that the block that is corrupted is the root of all the other blocks int it's tree (/usr).  I suspect that it would have been able to stick in a backup superblock if it had beensub-node, I don't know.  I tried to get e2fsck to replace the block with
     esfsck -b 8193 /dev/hdb2  (booting told me to do)
     e2fsck -b 1581066 /dev/hdb2 (fsck told me to do)
fdisk says that the partitions are there too.
The man pages are on the lost partition as well.
One of my teachers, at the beginnig of the semester said that Microsoft's bounds checking is bad.  Maybe installing the program in the first partition overwrote a few bytes in the second parition (superblock of /usr)?
I hope I don't have to re-install, just lastnight I installed code_crusader last night.  It took like three hours to compile.
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:bod_1
ID: 1638576
If I do have to re-install Linux, compiling Code Crusader is the first thing on my list though.  That program is wicked.
0
 

Author Comment

by:bod_1
ID: 1638577
I am reformatting my harddrive now.
I have to finish the rest of my assignment for friday so I can't wait.
Thanks for the help though overcode.
0
 

Author Comment

by:bod_1
ID: 1638578
I thought I'd mention something wierd that happened which has to do with this.
After I reformatted, installed Linux, it was running fine until I was in windows and tried to delete Borland.  I deleted a bunch of files but a lot of the folders had screwy characters for names and I couldn't delete them cause they 'didn't exist or their filenames were too long'.
Their sizes were also about the same size as the Linux (ext2) partition that I had on the same drive.
I went back into linux and everything was screwed again.
Any ideas?
0

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
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 …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.
Suggested Courses
Course of the Month11 days, 16 hours left to enroll

752 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