LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 03-14-2006, 05:39 AM   #1
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Rep: Reputation: 15
Question Kernel Panic for New Installation


hello,
i am a new user to Red Hat Linux Enterprise Edition 4.1
I am trying to install a new kernel 2.6.15.6 on my Linux.

I have compiled the kernel and copied bzImage to /boot partition.
Also I have modified the grub.conf file
it is listed as

# 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,2)
# kernel /vmlinuz-version ro root=/dev/sda6
# initrd /initrd-version.img
#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux 2.6.15.6
root (hd0,2)
kernel /vmlinuz-2.6.15.6.img ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.15.6.img
title Red Hat Enterprise Linux AS (2.6.9-5.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.6.9-5.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-5.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-5.EL)
root (hd0,2)
kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-5.EL.img
title windows xp
rootnoverify (hd0,0)
chainloader +1

this is listing of /dev/sda

[root@localhost grub]# fdisk /dev/sda

Command (m for help): p

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ c W95 FAT32 (LBA)
/dev/sda2 2551 5100 20482875 c W95 FAT32 (LBA)
/dev/sda3 5101 5138 305235 83 Linux
/dev/sda4 5139 9729 36877207+ 5 Extended
/dev/sda5 5139 7688 20482843+ 83 Linux
/dev/sda6 7689 8963 10241406 83 Linux
/dev/sda7 8964 9090 1020096 82 Linux swap
/dev/sda8 9091 9729 5132736 83 Linux

I am unable to understand the problem.
Could anybody please help???
 
Old 03-14-2006, 11:15 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Two things, first with Red Hat the installation of a new compiled kernel is handeled by using 'make install' instead of copying/renaming and editing the grub.conf file by hand. The process I build with after extacting the compressed file (see the RHEL3 Red Hat Enterprise Linux System Administration Guide for the details);

(apply any wanted/needed patches first)
make mrproper
cp /boot/config-<version_number> .config
make xconfig ;to do any needed tweaking and checking
make ;this differs from the manual something to get used to
make modules_install
make install


Second (the one your most interested in) it seems that either your missing one of the tools to compile kernels (parition labels) in Red Hat Linux or you forgot something with your kernel configuration. The workaround is to edit the /boot/grub/grub.conf file for the new kernel. Change the root=LABEL=/ in the kernel line to reflect the actual drive/partition for the root partition.

From; kernel /vmlinuz-2.6.15.6.img ro root=LABEL=/ rhgb quiet

To; kernel /vmlinuz-2.6.15.6.img ro root=/dev/sda6 rhgb quiet

Thanks for posting the entire grub.conf file, which provided the information to make the change in the kernel line example above (from the top comments section); # kernel /vmlinuz-version ro root=/dev/sda6
 
Old 03-15-2006, 10:44 PM   #3
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks so much for the reply.
can you please answer one of my question.
why do we require .config file in /boot partition?

I changed the grub.conf file -- LABEL=/dev/sda6
but it gave me following error

mkrootdev : label /dev/sda6 not found
Mounting root filesystem
mount : error 2 mounting ext3
mount : error 2 mounting none

switchroot : mount failed : 22
umount /initrd/dev failed :2

and then the Kernel Panic...

How do i proceed now?
 
Old 03-15-2006, 10:54 PM   #4
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Original Poster
Rep: Reputation: 15
There is one more thing i would like to add.

if you observe grub.conf i have posted there are total 4 installations.
3 - linux
1 - win XP

out of those three, two linux installations are working perfectly fine.
So with the same parameters in grub.conf why is it not booting the linux?

this is extract of df -h command i run

[root@localhost ~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda6 9.7G 7.2G 2.0G 79% /
/dev/sda3 289M 19M 256M 7% /boot
none 248M 0 248M 0% /dev/shm
/dev/sda5 20G 190M 19G 2% /home
/dev/sda8 4.9G 42M 4.6G 1% /opt
/dev/sda1 20G 4.9G 15G 25% /mnt/win_1
/dev/sda2 20G 733M 19G 4% /mnt/win_2

i dont know if this would help...

this is extract from /var/log/messages

Mar 14 19:28:18 localhost kernel: Vendor: ATA Model: WDC WD800BD-22LR Rev: 06.0
Mar 14 19:28:18 localhost kernel: Type: Direct-Access ANSI SCSI revision: 05
Mar 14 19:28:18 localhost kernel: SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
Mar 14 19:28:19 localhost kernel: SCSI device sda: drive cache: write back
Mar 14 19:28:19 localhost kernel: sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 sda8 >
Mar 14 19:28:19 localhost kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

so even SCSI disk is detected by the kernel.
so where is the problem ???
 
Old 03-15-2006, 11:59 PM   #5
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Original Poster
Rep: Reputation: 15
Hey guys,

thanx a lot for all your support.
I have cracked the problem.
It was due to SELinux.
I disabled SELinux in /etc/selinux/config file.
And now my installation worked perfectly fine

Thanks a lot....

Last edited by rajtendulkar; 03-16-2006 at 12:30 AM.
 
Old 03-16-2006, 10:20 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
First, glad you got the problem resolved.

Now to answer your questions.........

why do we require .config file in /boot partition?

This file (config-version_number) is used by the 'make xconfig' command to create a working .config file (hopefully) automagically. It is not really needed but is helpful.

So with the same parameters in grub.conf why is it not booting the linux?

This one is hard to tell, most likly you missed something in your kernel configuration or something (like selinux) has changed from the older kernels to your new one.
 
Old 03-16-2006, 10:09 PM   #7
rajtendulkar
Member
 
Registered: Mar 2006
Posts: 34

Original Poster
Rep: Reputation: 15
Lenard,

you are simply the best .... Thanx a lot....

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
installation - kernel panic niezdrowywglowe Slackware - Installation 8 11-15-2005 11:40 PM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 04:28 AM
Redhat 9 installation causes kernel panic Colonel_Panic Linux - Newbie 2 05-24-2004 11:36 PM
kernel panic during installation otio23 Red Hat 0 02-14-2004 03:16 PM
Kernel Panic on installation mobius69 Linux - Software 45 08-18-2002 12:51 AM


All times are GMT -5. The time now is 04:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration