LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-17-2010, 01:52 AM   #1
Goleteral
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
Question Server booting issues(EXT3-fs: unable to read superblock 'etc')


Having some issues with a mail server running CentOS, don't really know what had been done do it so I'm a bit stumped, when booting the server I get the following error:

Code:
EXT3-fs: unable to read superblock
mount: error mounting /dev/root on /sysroot as ext3: Invalid argument
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - Not syncing: Attempted to kill init!

I can boot the machine from a liveCD and mount the 2 drives(Mirrored in raid 0) and get the data from them but I would like to resolve the booting issue)

Did quite a lot of googling around yesterday but didn't resolve the issue. My linux knowledge is quite limited to desktop use but from what I can understand it seems like the partition table or some of the config files(like fstab or initrd) are a bit messed up,

Booting from the LiveCD and mounting the drives I get this info


sudo fdisk -l
Code:
ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d6faf

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *         384        9729    75071745   fd  Linux raid autodetect

Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00098835

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1             384        9729    75071745   fd  Linux raid autodetect
/dev/sdb2   *           1         383     3076416   82  Linux swap / Solaris

Partition table entries are not in disk order
ubuntu@ubuntu:~$


/etc/fstab and grub config:
Code:
  GNU nano 2.0.9                                  File: /mnt/etc/fstab                                                                            

/dev/md0                /                       ext3    defaults,usrquota,grpquota        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda2         swap                    swap    defaults        0 0



/boot/grub/grub.conf contains the following, 

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/md0
#          initrd /boot/initrd-version.img
#boot=/dev/md0
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-53.1.13.el5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-53.1.13.el5 ro root=/dev/md0
        initrd /boot/initrd-2.6.18-53.1.13.el5.img
title CentOS (2.6.18-53.el5)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.18-53.el5 ro root=/dev/md0
        initrd /boot/initrd-2.6.18-53.el5.img

Please let me know if you need more information to help me resolve this issue, thank you.


-edit-

An update, did some tinkering around from the LiveCD

sudo fsck /dev/sda1
fsck: fsck.linux_raid_member: not found
fsck: Error 2 while executing fsck.linux_raid_member for /dev/sda1

sudo fsck /dev/sda
fsck.ext2: superblock invalid, trying backup block
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda

e2fsck -b 8193 /dev/sda(This was a succestion made by fsck to try)
e2fsck: Bad magic number in super-block while trying to open /dev/sda

Is there a way to find out what superblocks to try and would that resolve the issue?


When trying to sudo fdisk /dev/sda1 I get:
Device contains neither a valid DOS partiton table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk ID blahblah
Changes will remain in memory onle, until you decide to write them.
After that, of course, the previous content won't be recoverable.

The number of cylinders for this disk is set to 9346
There is nothing wrong with that, but this is larger than 1024
Warning: Invalid flag 0x0000 of partition table 4 will be corrected by w(rite)




Something occured to me, the number of cylinders for the disk is set to 9346 but the /dev/sda1 and sdb1 start at the 384 cylinder and end with 9729, can't this cause the problem and if it is how do i change the set cylinder numbers for the disk - does it involve re-creating the partition table or is there a shorter way?


At boot the mdadm starts the mirror image with the drives sda1 and sdb1 and names it md127, but the grub.conf and fstab set it as md0, changing it doesn't change anything as it seems.. my mdadm.conf is:

Code:
DEVICE partitions
MAILADDR root
ARRAY /dev/md0 super-minor=0

Last edited by Goleteral; 08-17-2010 at 03:41 AM.
 
Old 08-17-2010, 05:22 AM   #2
Goleteral
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Original Poster
Rep: Reputation: 0
This always happens - i make a topic with my problem and i end fixing it myself, I recreated the raid array with mdadm via a livecd and renamed it md0, for some reason it was md127 before..

Now I'm stuck with another problem, the system seems to have a problem with the swap, It shows the total swap as 0kB, I'll edit my post as soon as I boot under the liveCD again and do some research about the issue


Managed to get the system up and running - took me 1.5 days to figure out that the raid array was named wrong... ): I need to work on my linux skills

Last edited by Goleteral; 08-17-2010 at 05:39 AM.
 
Old 08-30-2010, 01:20 AM   #3
pwagner9999
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
I've just started using linux and have been looking around a few different linux forums and have noticed that a lot of posts were people that just talked to themselves...just an observation.
 
  


Reply



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
EXT3-fs: unable to read superblock ckecbond Linux - Newbie 18 07-01-2010 08:11 AM
Ext3 - Short read reading journal superblock izaakrach Linux - Hardware 4 10-28-2008 05:47 PM
EXT3-fs: unable to read superblock after kernel upgrade rolandbreedveld Linux - General 2 06-23-2003 04:00 PM
EXT3-fs: unable to read superblock PLEASE HELP!!!!! Madmanator Linux - General 1 10-06-2002 01:34 PM
EXT3-fs: unable to read superblock... Kernel panic: no init found. ebakunin Linux - General 2 06-16-2002 10:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:55 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
Open Source Consulting | Domain Registration