LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel panic not syncing (https://www.linuxquestions.org/questions/linux-general-1/kernel-panic-not-syncing-415326/)

n6rob 02-14-2006 10:26 AM

Kernel panic not syncing
 
Greetings,

I have a FC4 2.6.15-1.1831 based system that will not boot. Here is a summary of the boot sequence:

> It finds the file system type (ext2fs) partition type 0x83
> Kernel /vmlinuz-2.6.15..... etc. etc.
> Initrd (then it finds the initrd-2.6.15-1.1831_fc4.img)
> It uncompresses linux and boots the kernel
> Loads RH nash version 4.2.15
> Finds "volGroup00" using lvm metadata., 2 logical volumes in "VolGroup00" now active

Then we get the problelms:
/bin/sh: ro: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

I booted the FC resuce CD. when I mount the image <chroot /mnt/sysimage>, I can navigate the file system on the HDD. I can see the file names of my data, etc.

fsck says the superblock of /hda2 has a bad magic number. So does debugfs. /hda1 is my boot and seems to be fine. I ran partimage from Knoppix and it reads the file system from /hda1 just fine, but calls hda2 an unknown file system. Hence, I have been unable to get an image of the fail partition (I was hoping to get an image before trying to extract the data with surgical tools). And yes, I've tried the alternate superblock numbers with no success.

So you are probably asking yourself, "what the hell was he doing that made this happen?". Brace yourself; I was attempting to unload what I thought were obsolete kernels using a package manager. Instead it unloaded all the dependencies before I realized what it was doing and I gave it a control-C. Somehow the file system has been damaged to a point that I can't access it anymore.

Anyone know how to get an image of a HDD without a valid superblock? Or how to restore a superblock without blanking the drive? Or maybe to restore my lost data?

Thanks in advance for any help.

guysoft 02-14-2006 01:04 PM

i am not an expert on LVM, but i came across a similar error with a RAID array.
i think the problem is the initrd is lacking of the right LVM modules.

you should try and make a new initrd, maybe try with mkinitrd.yaid or mkinitramfs (rather than the original mkinitrd).

n6rob 02-14-2006 03:56 PM

Quote:

Originally Posted by guysoft
i am not an expert on LVM, but i came across a similar error with a RAID array.
i think the problem is the initrd is lacking of the right LVM modules.

you should try and make a new initrd, maybe try with mkinitrd.yaid or mkinitramfs (rather than the original mkinitrd).

Thank you guysoft. I have not been able to find these tools in my rescue disk but I suffer from extreme newbie-ism.

I will explain my solution as I have implemented it so far.

I don't know why, but the FC rescue disk is able to create an image of the failed system which may be mounted by typing chroot /mnt/sysimage. My file system was navigatable when mounting this. Using a separate OS from a liveCD did not allow me to do this since the hda2 was not mountable (though maybe there was another way I was not familiar with).

I had a spare HDD. I installed it, added a file system with fdisk, and formatted it. I booted the FC rescue CD and copied (cp) my desired files from the /mnt/sysimage to the new, blank HDD.

Then I booted in Knoppix and burned the files from the new HDD (hdb1 in my case) to DVD (my set up has one CD-R/RW burner and a DVD-R/RW burner).

With data in-hand, I will now attempt to revive my otherwise damaged system. Most likely I will save myself the headache and just reinstall the OS.

What a lesson.

guysoft 02-15-2006 06:13 AM

As long that you didn't loose data, I'm happy :)


All times are GMT -5. The time now is 03:19 AM.