Solved

Bad superblock?

Posted on 1998-11-24
6
1,158 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 50 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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 …
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

691 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