LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-12-2008, 05:22 AM   #1
amroz
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
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.
----------------------------


Please Help.
Regards,
Amroz
 
Old 02-12-2008, 12:35 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Is it possible that you wrote...
Quote:
And when I select Linux 9.0 on (hd0,6)
...instead of...
Quote:
And when I select Linux 9.0 on (hd0,9)
?

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
So, starting counting from the top...
Quote:
0 /dev/hda1 * 1 2550 20482843+ c Win95 FAT32 (LBA)
1 /dev/hda2 2551 9729 57665317+ f Win95 Ext'd (LBA)
2 /dev/hda5 2551 6374 30716248+ b Win95 FAT32
3 /dev/hda6 6375 8454 16707568+ 7 HPFS/NTFS

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.

Good luck
 
Old 02-13-2008, 04:39 AM   #3
amroz
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for replying, but....

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.

?
 
Old 02-13-2008, 12:16 PM   #4
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
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.
 
Old 02-13-2008, 06:34 PM   #5
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
Why are you still using RH 7.3 and RH 9, the support for them ended in 2004, its the equivlent of running windows 95.
 
Old 03-03-2008, 03:34 AM   #6
amroz
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
  


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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
Common problems explained: "kernel panic - not syncing", "unable to mount..." sundialsvcs Linux - Newbie 2 03-01-2006 12:17 PM
Kernel question: difference between Patch and "regular" kernel source kopikat Linux - Software 1 01-26-2005 05:24 PM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM
"kernel panic!......" message is seen (slightly different problem than the 1s here) neonair Linux - General 4 03-05-2004 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:16 PM.

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