LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Now I have really MESSED it ALL up: SUPER BLOCKS--NO LINUX (https://www.linuxquestions.org/questions/linux-newbie-8/now-i-have-really-messed-it-all-up-super-blocks-no-linux-428352/)

smiley_lauf 03-25-2006 08:25 AM

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

marozsas 03-25-2006 09:11 AM

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.

smiley_lauf 03-25-2006 09:14 AM

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

smiley_lauf 03-25-2006 09:16 AM

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?

marozsas 03-25-2006 09:21 AM

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.

marozsas 03-25-2006 09:32 AM

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.

smiley_lauf 03-25-2006 10:35 AM

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

marozsas 03-25-2006 11:09 AM

*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 !

smiley_lauf 03-25-2006 11:47 AM

cheers! thanks

smiley_lauf 03-25-2006 05:34 PM

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

marozsas 03-27-2006 05:45 AM

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,


All times are GMT -5. The time now is 03:07 PM.