Forums

Resolved
0 votes
Our server froze during the night , when we came in and restarted it , it came up with a kernel panic . We have see this before and run a fsck command in rescue mode and it sorts out the problem .

When we run

fsck -p /dev/sda2

we get the following

fsck: Waring : couldn't open /etc/fstab: no such file or directory
fsck.ext2: Bad magic number in superblock while trying to open /dev/sda2
The superblock could not be read or does not describe a correct ext2 file system. If the device is valid and ...........

The server is running a mirror raid from the bios.
I can boot from both disks and get the exact same error message

( I have not typed to whole screen as it is in a photo )


to make the problem worse the computer is of site in a remote location !

any advice that can help to get he the PC up and running again
Regards
Justin
Friday, November 21 2014, 12:56 PM
Share this post:
Responses (11)
  • Accepted Answer

    Saturday, November 22 2014, 01:20 PM - #Permalink
    Resolved
    0 votes
    Noted the typo, !
    We have two disks and are using only one , they are part of a hardware raid , the other is untouched !
    Regards

    Have you ever used the command
    mke2fs -S /dev/xxx in our case xxx = sdb2

    followed by

    e2fsck /dev/xxx in our case xxx =x sdb2

    We have run this and are answing yes to all the "do you want to fix "
    There seem to be quite a few of them.
    Will let you know if it works or not !
    cowboy style i know
    Regards
    Justin
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 22 2014, 01:10 PM - #Permalink
    Resolved
    0 votes
    I don't know what advice to give here. I just knew about this fixing route which I may have used before, but I can't remember. Conventional wisdom says you should not work on your live disk. The first thing you should do is make a bitwise clone of the disk to a new disk using something like the command dd, then you try all your repairs on the clone.

    After that, all I can suggest is trying different superblocks.

    FWIW your last command in the second screen shot is missing the last digit (0 or 8) - 265400 (or 8)
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 22 2014, 12:12 PM - #Permalink
    Resolved
    0 votes
    and a screenshot of the command

    e2fsck -b 32768 /dev/sdb2 http://www.clearfoundation.com/media/kunena/attachments/legacy/images/e2fsck1.jpg
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 22 2014, 12:06 PM - #Permalink
    Resolved
    0 votes
    Here is a screen shot of the command
    mke2fs -n /dev/sdb2 http://www.clearfoundation.com/media/kunena/attachments/legacy/images/superblocks1-20141122-2.jpg
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, November 22 2014, 11:51 AM - #Permalink
    Resolved
    0 votes
    Ok, We have got a list of superblock backups by typing in the following comand

    mke2fs -n /dev/sdb2

    and we get a list

    When we run the command
    e2fsck -b 32768 /dev/sdb2

    it comes up with the same error message.
    e2fsck : Bad magic number .........

    is it reasonable to try all number blocks or am i doing something wrong with the command ?
    We are in rescue mode with clearos 5.2
    e2fsck version 1.39 (29-May-2006)
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 06:20 PM - #Permalink
    Resolved
    0 votes
    many thanks
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 05:16 PM - #Permalink
    Resolved
    0 votes
    Both links I gave have live CD's but the commands may be available from the ClearOS CD in recovery mode as well.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 04:56 PM - #Permalink
    Resolved
    0 votes
    Thanks for the heads up ! They only have access to a rescue mode at the moment
    Can you suggest a live cd that may work ?
    I am aware that we have no remote access ! :cheer:
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 04:42 PM - #Permalink
    Resolved
    0 votes
    You'll have problems running the commands. They rely on you booting up with a live CD. Rescue mode of the installation CD may have the required commands. There is no possibility of running them remotely.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 04:34 PM - #Permalink
    Resolved
    0 votes
    Dear Nick, Many thanks for your prompt reply !
    Let me clarify. When I say we “normally “run the fsck command it is on other servers and this happens when it has been uncleanly shut down. But only once in a blue moon. This particular server has never given any problems before. However it is in rural Zambia! Where the power utility service is erratic, especially during the rainy season!
    I will update this post once I have had a chance to run the commands.
    Many thanks
    Justin Richards
    The reply is currently minimized Show
  • Accepted Answer

    Friday, November 21 2014, 02:29 PM - #Permalink
    Resolved
    0 votes
    Have a look at this link, among others. Although it is for ext4 it should be the same for ext2. Or else try a program such as TestDisk.

    I'd be quite concerned if this is regular and I'd suspect a hardware issue. Do you have SMART disk's. If so have a look at smartmontools, available in clearos-core. Also could you have a m/b problem?
    The reply is currently minimized Show
Your Reply