Solved

Bad superblock?

Posted on 1998-11-24
6
1,137 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
  • 5
6 Comments
 

Author Comment

by:bod_1
Comment Utility
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
Comment Utility
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
Comment Utility
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 up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 

Author Comment

by:bod_1
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

11 Experts available now in Live!

Get 1:1 Help Now