LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-14-2010, 05:05 AM   #1
ukwho
Member
 
Registered: Feb 2009
Posts: 37

Rep: Reputation: 15
Cannot boot after compiling and installing kernel


Hello,

I have a virtual box running CentOS 5.3. I am experimenting with compiling and installing a kernel 2.6.33 on this.

However, the kernel compiled ok, but when I did the install it gave me these warning, not sure if they are important or not.
The steps I did was:
Code:
make
make modules
make modules_install
make install
Code:
root@localhost linux-2.6.33.2]# make install
sh /usr/src/linux-2.6.33.2/arch/x86/boot/install.sh 2.6.33.2 arch/x86/boot/bzImage \
		System.map "/boot"
WARNING: No module dm-mem-cache found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-message found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-raid45 found for kernel 2.6.33.2, continuing anyway
In my grub.conf I have the following:
Code:
[root@localhost grub]# cat grub.conf
# 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,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.33.2)
	root (hd0,0)
	kernel /vmlinuz-2.6.33.2 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.33.2.img
title CentOS (2.6.18-128.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
	initrd /initrd-2.6.18-128.el5.img
When I try and boot I get the following problem:
Code:
Red Hat nast version 5.1.19.6 starting
insmod: error inserting '/lib/dm-region-hash.ko': -1 file exits
   Reading all physical volumes. This may take a while...
   Volume group "VolGroup00" not found type 0x83
Unable to access resume device (/dev/VolGroup00/LogVol101) rhgb quiet
mount: cound not find filesystem '/dev/root'c0]
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: Attemped to kill init!
Many thanks for any advice,
 
Old 04-14-2010, 09:41 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Did you changed some kernel options?
You might have disabled some modules that you need to boot. For example modules for md (software raid), lvm, disk controllers, ...
The first 2 seem to be the most logical in this situation.
The messages you are getting are maybe because your config file has them enabled, while this is not in the kernel anymore or the name has changed.
If I am correct you are trying to compile a non RHEL kernel (probably the vanilla kernel from kernel.org) on a RHEL machine.
I would strongly discourage this. Mostly the default kernel is ok and you can recompile the kernel with extra features if needed.
What is the reason you want to do this? If it is just for trying to compile your own kernel go and find the kernel-xxxx.src.rpm file and install it. This should give you the source code from where you can continue.The RHEL deploy guide probably gives you extra info on any specific things for compiling a kernel on RHEL/CentOS

Normally you should also recreate the initrd file.
You can do this using
mkinitrd command. The output file should be in /boot/ and correctly referenced in the initrd line in menu.lst.
(note that this is /initrd-xxxx.img and not /boot/initrd-xxxx.img)

What is clear here is that your root filesystem cannot be mounted. THis makes that /dev, /proc, ... and other directories which are needed to mount other filesystems could not be mount.
 
1 members found this post helpful.
Old 04-14-2010, 09:59 AM   #3
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
That is correct, deadeyes.
ukwho, why would you want latest kernel from kernel.org? It is not yet been fully tested while RHEL kernels are stable.
In your situation, you misconfigured your kernel and it seem to lack LVM or RAID support.
 
Old 04-14-2010, 01:04 PM   #4
ukwho
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Hello,

This is just for my own learning and experimenting, that is why I am doing this on virtual box and not a real system.

I unzipped the kernel and ran:
make menuconfig

However, I did make some changes but I didn't see anything about raid and LVM, and I am sure that I didn't disable anything, I only enabled a few options. However, from the messages I posted how do you know that this is the problem? From the messages I see no references for raid or LVM.

So, to solve this problem I will have to go back into the 'make menuconfig' and enable raid and LVM?

Many thanks for any more advice,
 
Old 04-14-2010, 01:31 PM   #5
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
Exactly, you need to fix your kernel config so it will have modules you need for system to boot & work.
There are many results for this on google... like
* http://www.linuxtopia.org/online_boo...n/ch09s05.html
* http://en.gentoo-wiki.com/wiki/LVM

If you enabled lvm but still unable to boot, post back error messages you get and your kernel config. HTH
 
Old 04-15-2010, 04:05 AM   #6
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by ukwho View Post
Hello,
I unzipped the kernel and ran:
make menuconfig

However, I did make some changes but I didn't see anything about raid and LVM, and I am sure that I didn't disable anything, I only enabled a few options. However, from the messages I posted how do you know that this is the problem? From the messages I see no references for raid or LVM.
You might not have changed it, but in the vanilla kernel this option is probably disabled.
So you would have to enable it.

No references?
Quote:
WARNING: No module dm-mem-cache found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-message found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-raid45 found for kernel 2.6.33.2, continuing anyway
dm is software raid

Quote:
Volume group "VolGroup00" not found type 0x83
Unable to access resume device (/dev/VolGroup00/LogVol101) rhgb quiet
Volume groups are part of how lvm works.
This shows it can't find the VolGroup00 partition.
You can boot using a rescue cd (systemrescue cd for example).
vgchange -ay
And then use commands like:
lvdisplay and vgdisplay.
This should give you the lvm config.
If /dev/VolGroup00 is there then you don't have lvm configured in your kernel.
If you used software raid when you installed CentOS then you also need MD modules and rebuilding your initrd.
 
1 members found this post helpful.
Old 04-15-2010, 10:51 AM   #7
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
You might want to take a look here too:
http://wiki.centos.org/HowTos/Custom_Kernel
 
Old 04-25-2010, 11:27 AM   #8
ukwho
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Hello,

I have tried again with this. This time I copied the .config file from the /boot/ directory to my /usr/src/ where the kernel was uncompressed. There I loaded this .config and made sure that all the setting for LVM, RAID, device mapper was selected. I then saved this and compiled.

However, when I did the make install I got the following warning:
Code:
[root@localhost linux]# make install
sh /usr/src/linux-2.6.33.2/arch/x86/boot/install.sh 2.6.33.2 arch/x86/boot/bzImage \
		System.map "/boot"
WARNING: No module dm-mem-cache found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-message found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-raid45 found for kernel 2.6.33.2, continuing anyway
When I tried to reboot using the new kernel I got the following problem:
Code:
Red Hat nash version 5.1.19.6 starting
insmod: error inserting '/lib/dm-region-hash.ko': -1 File exists
	Reading all physical volumes. This may take a while..
	Volume group "VolGroup00" not found type 0x83
mount: could not find filesystem '/dev/root'up00/LogVol00 rhgb quiet
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: Attemped to kill init!
I have uploaded my .config file in case there is a problem with it.

Many thanks for any further advice,
Attached Files
File Type: txt .config.txt (86.0 KB, 15 views)
 
Old 04-26-2010, 07:44 AM   #9
deadeyes
Member
 
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
Quote:
Originally Posted by ukwho View Post
Hello,

I have tried again with this. This time I copied the .config file from the /boot/ directory to my /usr/src/ where the kernel was uncompressed. There I loaded this .config and made sure that all the setting for LVM, RAID, device mapper was selected. I then saved this and compiled.

However, when I did the make install I got the following warning:
Code:
[root@localhost linux]# make install
sh /usr/src/linux-2.6.33.2/arch/x86/boot/install.sh 2.6.33.2 arch/x86/boot/bzImage \
		System.map "/boot"
WARNING: No module dm-mem-cache found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-message found for kernel 2.6.33.2, continuing anyway
WARNING: No module dm-raid45 found for kernel 2.6.33.2, continuing anyway
When I tried to reboot using the new kernel I got the following problem:
Code:
Red Hat nash version 5.1.19.6 starting
insmod: error inserting '/lib/dm-region-hash.ko': -1 File exists
	Reading all physical volumes. This may take a while..
	Volume group "VolGroup00" not found type 0x83
mount: could not find filesystem '/dev/root'up00/LogVol00 rhgb quiet
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: Attemped to kill init!
I have uploaded my .config file in case there is a problem with it.

Many thanks for any further advice,
As said before here 2.6.33 is not a RHEL/CentOS supported kernel.
You copied a 2.6.18(or something) config to a 2.6.33 kernel.
Maybe the names of these dm-mem-cache, ... are changed in more
recent kernels.

Code:
insmod: error inserting '/lib/dm-region-hash.ko': -1 File exists
	Reading all physical volumes. This may take a while..
	Volume group "VolGroup00" not found type 0x83
mount: could not find filesystem '/dev/root'up00/LogVol00 rhgb quiet
Maybe you can search in the kernel config for "dm" and activate the correct one.
cat /usr/src/linux/.config | grep -i dm

You also need your initram image updated. (mkinitrd)

It seems the dm-region-hash.ko module cannot be loaded for some reason (it surely does exist). This might be that the kernel module in the initrd image is for another kernel or there might be other causes.
Volume group "VolGroup00" not found type 0x83:
This seems as there are no ext3 filesystems found in VolGroup00.

could not find filesystem '/dev/root'up00/LogVol00 rhgb quiet:
It is rather strange that the kernel thinks this whole string is a device file.
It might be that you need to change your kernel line in GRUB.
For example rhgb is IIRC a RHEL/CentOS specific thing.
/dev/root up00/..... this seems not to be a good path.

In the end I still would encourage you to use the RHEL/CentOS stock kernel.
 
Old 04-26-2010, 11:12 AM   #10
ukwho
Member
 
Registered: Feb 2009
Posts: 37

Original Poster
Rep: Reputation: 15
Hello,

Thanks for your reply,

Yes, I understand that the vanilla kernels are just the source code that distributions build on by adding their own features and fixing bugs. However, I could find any specific kernels for CentOS that is why I went back to the vanilla kernel. However, this is challenging in trying to get this to work, so not ready to give in yet.

The closest I got to downloading a CentOS specific kernel was from this website.
Code:
http://vault.centos.org/5.3/updates/SRPMS/
Do you know where I can download the CentOS kernels?

Many thanks,
 
Old 04-26-2010, 12:19 PM   #11
this213
Member
 
Registered: Dec 2001
Location: ./
Distribution: Fedora, CentOS, RHEL, Gentoo
Posts: 167

Rep: Reputation: 34
Quote:
Originally Posted by this213 View Post
You might want to take a look here too:
http://wiki.centos.org/HowTos/Custom_Kernel
Section 1 of http://wiki.centos.org/HowTos/Custom_Kernel tells you to look at "Section 2" of http://wiki.centos.org/HowTos/I_need_the_Kernel_Source

If you don't read the rest of these pages you're going to have even more issues
 
Old 10-12-2010, 03:17 PM   #12
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS
Posts: 179

Rep: Reputation: 27
Hi,

Try this solution https://www.centos.org/modules/newbb...forumpost97305.
 
  


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
installing configuring and compiling a kernel vidya75 Linux - Software 1 02-27-2006 05:18 PM
compiling and installing a new kernel ramakrishna sura Linux - Newbie 2 01-23-2006 08:25 AM
Installing (Compiling?) the new 2.6.1 kernel LilGryphMaster Linux - Newbie 9 01-31-2004 10:45 PM
Compiling and Installing Linux Kernel 2.4.18 kramk2 Linux - Software 4 09-04-2003 08:01 PM
Compiling and installing a new kernel in RedHat7.2 RCarter Linux - Software 10 07-13-2002 10:39 PM


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