LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2006, 09:25 AM   #1
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Rep: Reputation: 30
Angry Now I have really MESSED it ALL up: SUPER BLOCKS--NO LINUX


I am soooo f*****!!! For some reason I can no longer boot into any of my linux partitions:

hda7 Ubuntu Breezy
hda8 SUSE linux
hda6 SWAP

hda1 WinXP (I can boot into here, this is where I can writing this)

I used the MEPIS LIVECD to check my partitions for bad sectors and this is what I got:
Code:
Checking/repairing filesystem (e2fsck) on /dev/hda7.
e2fsck 1.39-WIP (31-Dec-2005)

Couldn't find ext2 superblock, trying backup blocks...

/sbin/e2fsck
: 
Bad magic number in super-block
 
while trying to open /dev/hda7



The 
super
block
 could not be read or does not describe a correct ext2

filesystem
.  If the 
device
 is valid and it really contains an ext2

filesystem
 (and not swap or ufs or something else), then the 
super
block

is corrupt, and you might try running e2fsck with an alternate 
super
block
:
    e2fsck -b 
8193
 <
device
>


Check completed.
Firstly let me explain what happens:
1. Boot up
2. GRUB menu (all OS listed as expected)
3. Choose Ubuntu (or even SUSE)
4. text loads, then a couple (perhaps 3 secs later)
5. Systems HALTS to shutdown!

Some thing happens if I try again, and again.
I think I have messed up my Linux partitions on my hdd. The partitions have become corrupt.

Questions:
1. How do I re-instate or correct the ba sectors (remove them, if it can be done?)
2. If this means my linux partitions are USELESS, then my Linux glory days are OVER??? I am very SAD!

I have even tried to format the drives (fronm reiserFS to ext3) to see if this would work, then reinstalled Ubuntu to check. But still the same happens.

3. What do I do next?

Many many thanks,

Smiley
 
Old 03-25-2006, 10:11 AM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
First thing is give us your partition table and any advice what it should looks like. I mean, partition 1 is for OS x, type ext3, size nGBytes.
 
Old 03-25-2006, 10:14 AM   #3
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Original Poster
Rep: Reputation: 30
I did this (after valuable input from another similar thread here)
1/ Boot using MEPIS LIVECD (I guess I use this because I understand the interface very well, and I should work with any other LIVE CD)
2. terminal consol
3. su as root
4. #fsck -b 32768 /dev/hda7 (and then /dev/hda8)
5. Accept all questions as 'y'
6. reboot into Ubuntu/SUSE
7. Worked like a charm!

Will update if I have any subsequent hurdles. Man, knowing how system works really pays off!
Thanks once again!

Smiley
 
Old 03-25-2006, 10:16 AM   #4
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by marozsas
First thing is give us your partition table and any advice what it should looks like. I mean, partition 1 is for OS x, type ext3, size nGBytes.
Sorry here it is

hda1 winxp ntfs
hda5 data fat32
hda6 swp
hda7 Ubuntu ext3
hda8 SUSE ext3

Does that help?
 
Old 03-25-2006, 10:21 AM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
I'm sorry. I mean we need the output of command "fdisk -l /dev/hda" which prints all information in your partition table.
You need to boot using a live distro or whatever.
 
Old 03-25-2006, 10:32 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
Don't follow the smiley_lauf's suggestion until you are sure the partition table is correct.
Doing that on a corrupted partition table could mess even more your filesystem.

smiley_lauf's suggestion is a very good suggestion and it is the next step after you are sure your partition table is fine.
 
Old 03-25-2006, 11:35 AM   #7
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by marozsas
Don't follow the smiley_lauf's suggestion until you are sure the partition table is correct.
Doing that on a corrupted partition table could mess even more your filesystem.

smiley_lauf's suggestion is a very good suggestion and it is the next step after you are sure your partition table is fine.
I guess my partition table was correct, fo it to have worked? How to check partion table?
Here is my partition table (after I have done the above blind "repair"
Code:
Disk /dev/hda: 100.0 GB, 100030242816 bytes
240 heads, 63 sectors/track, 12921 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4063    30716248+   7  HPFS/NTFS
/dev/hda2            4064       12920    66958920    f  W95 Ext'd (LBA)
/dev/hda5            4064        9481    40960048+   c  W95 FAT32 (LBA)
/dev/hda6            9482        9758     2094088+  82  Linux swap / Solaris
/dev/hda7   *        9759       11339    11952328+  83  Linux
/dev/hda8           11340       12920    11952328+  83  Linux
Thanks for alerting me to this.
best,
Smiley
 
Old 03-25-2006, 12:09 PM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
*lol* You are smiley_lauf ! I read the post and I thought it came from another one following the thread ! Sorry to advice you against yourself

Well, your partition table looks like fine. Every partition start where the previous ends, no overlaps, and the partitions id are correct. So I think every else is fine.

A live cd is very helpfull in situations like that.

See'ya !
 
Old 03-25-2006, 12:47 PM   #9
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Original Poster
Rep: Reputation: 30
cheers! thanks
 
Old 03-25-2006, 06:34 PM   #10
smiley_lauf
Member
 
Registered: Jan 2006
Location: NY
Distribution: Fedora 15 x64
Posts: 344

Original Poster
Rep: Reputation: 30
Sorry I am back. this time my SUSE partition is giving me BAD BLOCKS!

when i do this:
Code:
#fsck -b 32768 /dev/hda8

this is the output I get:
$ sudo fsck -b 32768 /dev/hda8
Password:
fsck 1.38 (30-Jun-2005)
e2fsck 1.38 (30-Jun-2005)
fsck.ext3: Bad magic number in super-block while trying to open /dev/hda8

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

user@ubuntu:~$ sudo e2fsck -b 8193 /dev/hda8
e2fsck 1.38 (30-Jun-2005)
e2fsck: Bad magic number in super-block while trying to open /dev/hda8

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
Any suggestions?

Thanks again.

Smiley

Last edited by smiley_lauf; 03-25-2006 at 06:36 PM.
 
Old 03-27-2006, 06:45 AM   #11
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,397
Blog Entries: 1

Rep: Reputation: 64
You are unlucky !

I suggest you to buy a new drive and move/backup only the important/personal files. On the new disk make a fresh install.

As a temporary solution, try to run fsck with the options "-b 32768 -cc". The double "c" option will do a non-destructive read/write test on disk, mapping all badblocks, preventing the filesystem to use this blocks in future allocations. It will take a very long time to finish, and I'm not sure it worth the time.

If you can not buy a new disk right now, backup all important stuff, and run "badblocks -sw -b 4096 -o /tmp/badblk.hda8 /dev/hda8" . It will run a destructive write test and list all badblocks on specified file. After that, re-create the ext3 filesystem with "mke2fs -b 4096 -j -l /tmp/badblk.hda8 /dev/hda8". Of course, all operations must be done with a live CD.

good luck,

Last edited by marozsas; 03-27-2006 at 06:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs write == super slow; read == super fast - problem? BrianK Linux - Networking 4 08-23-2007 11:59 PM
new Windows installation blocks Linux joshknape Linux - General 2 08-08-2005 02:02 PM
linux super question! jay820 Linux - General 14 08-09-2003 07:38 PM
How does linux take care of bad blocks? doris Linux - Software 2 03-05-2003 03:29 PM


All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration