LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help with a Kernel Panic (https://www.linuxquestions.org/questions/linux-newbie-8/help-with-a-kernel-panic-625044/)

tekmann33 03-01-2008 08:52 PM

Help with a Kernel Panic
 
I've searched this forum for Kernel panics but mine seems to be a little unique.

One day when I tried to boot Fedora 8 on my machine, I get the following message from the boot screen.

Code:

Uncompressing Linux...Ok, booting the kernel
Red Hat nash versio 6.09 starting
...
...
mount: could not find filesystem '/dev/root'
setuproot; moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init

The messages preceding the "kernel panic" message is unique from the other kernel Panic messages that I have read....my machine is not even mounting root!

I tried reinstalling Fedora 8 onto this hard drive, but after going through the Install GUI, I get a pop up that says:

Code:

An error occurred trying to format sda1.  This problem is serious, and the install cannot continue.
Press <Enter> to exit the installer.

I have a second hard drive that has XP is installed on the machine. With the same IDE cable, I plugged the second hard drive in and XP booted up from the second drive with no problem, which tells me the problem is not my motherboard.

This hard drive is not that old...I thing I have had it only a couple of years.

Can anyone give me any troubleshooting advice?

paulsm4 03-01-2008 09:07 PM

Have you tried booting from CD? Running "fsck" from the CD boot?

tekmann33 03-02-2008 05:53 PM

Quote:

Originally Posted by paulsm4 (Post 3075264)
Have you tried booting from CD? Running "fsck" from the CD boot?

When I boot from the CD and issue the fdisk -l command, this is my output:
Code:

[root@localhost ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0003c781

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1          25      200781  83  Linux
/dev/sda2              26      19457  156087540  8e  Linux LVM

Disk /dev/dm-0: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/dm-2: 158.2 GB, 158209146880 bytes
255 heads, 63 sectors/track, 19234 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-2 doesn't contain a valid partition table

Disk /dev/dm-3: 1577 MB, 1577058304 bytes
255 heads, 63 sectors/track, 191 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-3 doesn't contain a valid partition table
[root@localhost ~]#

When I try to use fsck on the entire drive:
Code:

[root@localhost etc]# fsck /dev/sda
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
fsck.ext2: Device or resource busy while trying to open /dev/sda
Filesystem mounted or opened exclusively by another program?
[root@localhost etc]#

When I try to fsck the first partition:
Code:

[root@localhost etc]# fsck /dev/sda1
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda1 is mounted. 

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

The filesystem size (according to the superblock) is 104388 blocks
The physical size of the device is 16033 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

/boot contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Error reading block 16387 (Invalid argument) while getting next inode from scan.  Ignore error<y>? yes

Force rewrite<y>? yes

Error writing block 16387 (Invalid argument) while getting next inode from scan.  Ignore error<y>? no

Error reading block 16388 (Invalid argument) while getting next inode from scan.  Ignore error<y>?

This just keeps repeating until I say no and then it aborts

onebuck 03-02-2008 08:09 PM

Hi,

You should run the filesystem maintenance in single user mode.

paulsm4 03-03-2008 12:05 AM

Hi, tekmann33 -

Onebuck is right. The whole *point* of booting from a CD is so that your hard drive *isn't* mounted, so you can run "fsck" on it (and try to repair it).

Usually, the CD has some kind of "repair option" - that's the one you want. It will put you in "single user" mode, and it should mount a virtual root volume in RAM (leaving your hard drive unmounted, and available to try to repair).

Then run "fsck" on the Linux partition of your hard drive (for example, /dev/hda2, or /dev/sda2).

Remember:
1) You're getting the "panic" because you can't mount your root volume
2) You can't mount the root volume because of some kind of disk or partition error
... and ...
3) The first step to resolving the error is to see if you can "repair" the root volume with "fsck".

You're on "3)". Once you successfully run "fsck", you might be home free.


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