Yet Another "Kernel Panic" Problem. With a difference.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yet Another "Kernel Panic" Problem. With a difference.
Hello friends,
All of you out there.
Please try to understand that I have searched a lot for the solution to this problem before posting here. (Agreed, the search might be incomplete, but still....)
Anyway, the story goes like this.
I have a Windows XP, Redhat linux 7.3, and Redhat linux 9.0, all installed on the same hard disk.
And I don't want to re-install a new linux on either of the linuxes.
It so happened that my windows crashed (not a very great news), and I had to reinstall it again, which ate up my dear old GRUB.
Well, I followed the instructions, of many good people out there. And my GRUB is restored. But both the linuxes are giving me problems,
"Kernel Panic".
Yes, I think on reinstalling windows the partition numberings have changed. (Not very sure).
This is what I get when I do fdisk -l (through "linux rescue")
-----------------------------
Disk /dev/hda: 255 heads, 63 sectors, 9729 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2550 20482843+ c Win95 FAT32 (LBA)
/dev/hda2 2551 9729 57665317+ f Win95 Ext'd (LBA)
/dev/hda5 2551 6374 30716248+ b Win95 FAT32
/dev/hda6 6375 8454 16707568+ 7 HPFS/NTFS
/dev/hda7 8455 8467 104391 83 Linux
/dev/hda8 8468 8913 3582463+ 83 Linux
/dev/hda9 8914 9043 1044193+ 82 Linux swap
/dev/hda10 9044 9056 104391 83 Linux
/dev/hda11 9057 9599 4361616 83 Linux
/dev/hda12 9600 9729 1044193+ 82 Linux swap
------------------------------
My grub.conf file looks like this.
------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,9)
# kernel /vmlinuz-version ro root=/dev/hda11
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
#title Red Hat Linux 9.0 (2.4.20-8smp)
# root (hd0,9)
# kernel /vmlinuz-2.4.18-3smp ro root=/dev/hda11 hdd=ide-scsi
# kernel /vmlinuz-2.4.20-8smp ro root=/dev/hda10 hdd=ide-scsi
# initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up 9.0 (2.4.20-8)
root (hd0,9)
# kernel /vmlinuz-2.4.18-3 ro root=/dev/hda11 hdd=ide-scsi
kernel /vmlinuz-2.4.20-8 ro root=/dev/hda10 hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
#title Red Hat Linux 7.3 (2.4.18-3smp)
# root (hd0,6)
# kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/1 hdd=ide-scsi
# kernel /vmlinuz-2.4.20-8smp ro root=/dev/hda8 hdd=ide-scsi
# kernel /vmlinuz-2.4.18-3smp ro root=/dev/hda7 hdd=ide-scsi
# initrd /initrd-2.4.18-3smp.img
title Red Hat Linux-up 7.3 (2.4.18-3)
root (hd0,6)
# kernel /vmlinuz-2.4.20-8 ro root=LABEL=/1 hdd=ide-scsi
# kernel /vmlinuz-2.4.20-8 ro root=/dev/hda8 hdd=ide-scsi
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda7 hdd=ide-scsi
initrd /initrd-2.4.18-3.img
---------------------------------------
Yes, I changed it. May be I thought I am doing the right thing. But every change is leading me no where.
It always gives me....
When I select Linux 7.3 on (hd0,6)
----------------------------
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 280k freed
Kernel Panic: No init found. Try passing init= option to kernel.
----------------------------
And when I select Linux 9.0 on (hd0,6)
----------------------------
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 132k freed
Kernel Panic: No init found. Try passing init= option to kernel.
----------------------------
And: the grub configuration (that you changed) already looked like that before that windows crashed and you reinstalled grub? I ask because the initrd lines changed e.g. from "initrd /initrd-2.4.20-8smp.img" to "initrd /initrd-2.4.20-8.img". If you mount the boot partition using linux rescue do you see a file called "initrd /initrd-2.4.20-8.img"?
And: if I look at the partition layout...
Quote:
/dev/hda1 * 1 2550 20482843+ c Win95 FAT32 (LBA)
/dev/hda2 2551 9729 57665317+ f Win95 Ext'd (LBA)
/dev/hda5 2551 6374 30716248+ b Win95 FAT32
/dev/hda6 6375 8454 16707568+ 7 HPFS/NTFS
/dev/hda7 8455 8467 104391 83 Linux
/dev/hda8 8468 8913 3582463+ 83 Linux
/dev/hda9 8914 9043 1044193+ 82 Linux swap
/dev/hda10 9044 9056 104391 83 Linux
/dev/hda11 9057 9599 4361616 83 Linux
/dev/hda12 9600 9729 1044193+ 82 Linux swap
...I could suppose that:
this is your Windows stuff:
Quote:
/dev/hda1 * 1 2550 20482843+ c Win95 FAT32 (LBA)
/dev/hda2 2551 9729 57665317+ f Win95 Ext'd (LBA)
/dev/hda5 2551 6374 30716248+ b Win95 FAT32
/dev/hda6 6375 8454 16707568+ 7 HPFS/NTFS
...this belongs to one of the two Linux distributions:
Quote:
/dev/hda7 8455 8467 104391 83 Linux
/dev/hda8 8468 8913 3582463+ 83 Linux
/dev/hda9 8914 9043 1044193+ 82 Linux swap
...and this belongs to the other Linux distribution:
Quote:
/dev/hda10 9044 9056 104391 83 Linux
/dev/hda11 9057 9599 4361616 83 Linux
/dev/hda12 9600 9729 1044193+ 82 Linux swap
4 /dev/hda7 8455 8467 104391 83 Linux
5 /dev/hda8 8468 8913 3582463+ 83 Linux
6 /dev/hda9 8914 9043 1044193+ 82 Linux swap
7 /dev/hda10 9044 9056 104391 83 Linux
8 /dev/hda11 9057 9599 4361616 83 Linux
9 /dev/hda12 9600 9729 1044193+ 82 Linux swap
...I could assume that the partitions 4 and 7, being so small could contain your kernel and the initrd image. Therefore when the Grub-menu pops up (where you can choose which OS you would like to start) you could scroll to the OS you would like to start, press "e", and edit the "root (hd0,6)" entry to be either "root (hd0,4)" or "root (hd0,7)" or you could even try them all out from 0 to 9 (press Enter to make Grub accept your changes).
Btw. you could just use 1 single swap partition, if you don't use both Linux OS at the same time and don't use software suspend.
Dear Sir,
Yes, I made a mistake.
My Linux 9.0 is on (hd0,9), more specifically, the boot partition of Linux 9.
And I have just commented out the smp images only, in my grub.conf
Mine is a normal comp. Not a multiprocessor. So I thought I do not need these images.
Yes, I tried all of them, i.e. from 0 to 11.
And I can see both 20-8 and 18-3 images in their respective partitions.
Sorry, what do you mean with "20-8" and "18-3"?
That you see e.g. "initrd-2.4.20-8.img" on hda10?
And mmhh, why do you state in e.g. "kernel /vmlinuz-2.4.18-3 ro root=/dev/hda7 hdd=ide-scsi" that root resides on hda7? As hda8 is much bigger I would bet that your root, so where you have all the "/bin/" and /usr/" directories, is on hda8.
So, in the end I would personally try with e.g. this:
Code:
title Red Hat Linux-up TEST 7.3 (2.4.18-3)
root (hd0,4)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda8 hdd=ide-scsi
initrd /initrd-2.4.18-3.img
But only after doublechecking with Linux rescue that "mkdir /mnt/test; mount /dev/hda7 /mnt/test; ls -ltrh /mnt/test/initrd-2.4.18-3.img;" really returns that filename and that the file size is not 0.
Last edited by Pearlseattle; 02-13-2008 at 12:28 PM.
THANK YOU ALL.
FOR YOUR PATIENCE.
I am really very much happy to tell every one concerned with my little problem.
Though it was a very big problem at some point of time.
But now it was just a little silly mistake.
Result of my messing up with the grub.conf
My new grub.conf is like this
------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,9)
# kernel /vmlinuz-version ro root=/dev/hda11
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,9)/grub/splash.xpm.gz
title Red Hat Linux-up 7.3 (2.4.18-3)
root (hd0,6)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda8 hdd=ide-scsi
initrd /initrd-2.4.18-3.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
title Red Hat Linux-up 9.0 (2.4.20-8)
root (hd0,9)
kernel /vmlinuz-2.4.20-8 ro root=/dev/hda11 hdd=ide-scsi
initrd /initrd-2.4.20-8.img
-------------------------------------------
I really very much sorry, for all the trouble that I gave you, especially Mr. PearlSeattle.
Now, I have the system back to its normal state.
That is, Windows XP, Linux 9.0, and Linux 7.3, all on the same harddisk.
I think this matter is closed.
Once again thanks every one.
And Thank you very much Mr. PearlSeattle.
And Thank you all guys in LinuxQuestions.org.
Wish you all the best.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.