LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-21-2008, 07:14 AM   #1
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
problem in kernel compilation


Hello,
I am new to linux...i tried to compile the kernel version 2.6.22.14....i compiled all the things and i installed all the modules...after typing "make install" i am getting this following things...

root@sharief-desktop:/usr/src/linux-2.6.22.14# make install
sh /usr/src/linux-2.6.22.14/arch/i386/boot/install.sh 2.6.22.14 arch/i386/boot/bzImage System.map "/boot"
In order to use the new kernel image you have just installed, you
will need to reboot the machine. First, however, you will need to
either make a bootable floppy diskette, re-run LILO, or have GRUB
installed.

Checking for ELILO...No

GRUB is installed. To automatically switch to new kernels, point your
default entry in menu.lst to /boot/vmlinuz-2.6.22.14
root@sharief-desktop:/usr/src/linux-2.6.22.14# cd /boot
root@sharief-desktop:/boot# ls
abi-2.6.22-14-generic grub System.map vmlinuz-2.6.22.14
config initrd.img-2.6.22-14-generic System.map-2.6.22.14 vmlinuz-2.6.22-14-generic
config-2.6.22.14 initrd.img-2.6.22-14-generic.bak System.map-2.6.22-14-generic
config-2.6.22-14-generic memtest86+.bin vmlinuz



i dont what to do next...how to change the boot file....please help me....
 
Old 11-21-2008, 07:29 AM   #2
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
Right, so you have installed the modules and the kernel is in place on /boot.

From root open /boot/grub/grub.conf in an editor. You should already find the new entry for vmlinuz-2.6.22.14.
You should formally also find an entry like "default=0" in there towards the top. Assuming it says 0, you can either move the new entry to the top, or change the default to the new one (remember the entries, each starting with "title", is counted from 0).
Third alternative is to reboot and choose your new entry in the menu before Linux starts booting (you might have to press ESC to see the menu at the start).

Mons
PS! If you get problems, post your grub.conf file and we'll have a look

Last edited by monsm; 11-21-2008 at 07:30 AM.
 
Old 11-21-2008, 11:15 AM   #3
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
no..there is nothing in /boot/grub/grub.conf.....when i give this command "vi /boot/grub/grub.conf" the file is opening......nothing is there...help me
 
Old 11-21-2008, 11:32 AM   #4
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
i am not having any lilo.conf and grub.conf in my system...i dont know what to do...help me....
 
Old 11-21-2008, 11:37 AM   #5
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
Strange. So whats the content of the /boot/grub folder (post "ls -l" preferably)? Do you have a menu.lst by any chance?
 
Old 11-21-2008, 12:16 PM   #6
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 492

Rep: Reputation: 50
Quote:
/boot/grub/grub.conf
Maybe the grub configuration file is /boot/grub/menu.lst
 
Old 11-21-2008, 07:38 PM   #7
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
This is the content of the /boot/grub/menu.lst


title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST


when i type "ls -l" i found the below things

root@sharief-desktop:/boot/grub# ls -l
total 204
-rw-r--r-- 1 root root 197 2008-09-28 14:08 default
-rw-r--r-- 1 root root 15 2008-09-28 14:08 device.map
-rw-r--r-- 1 root root 8660 2008-09-28 14:08 e2fs_stage1_5
-rw-r--r-- 1 root root 8452 2008-09-28 14:08 fat_stage1_5
-rw-r--r-- 1 root root 15 2008-09-28 14:09 installed-version
-rw-r--r-- 1 root root 9152 2008-09-28 14:08 jfs_stage1_5
-rw-r--r-- 1 root root 4265 2008-11-21 18:37 menu.lst
-rw-r--r-- 1 root root 7860 2008-09-28 14:08 minix_stage1_5
-rw-r--r-- 1 root root 10132 2008-09-28 14:08 reiserfs_stage1_5
-rw-r--r-- 1 root root 512 2008-09-28 14:08 stage1
-rw-r--r-- 1 root root 110292 2008-09-28 14:09 stage2
-rw-r--r-- 1 root root 9980 2008-09-28 14:08 xfs_stage1_5

Last edited by shariefbe; 11-21-2008 at 07:46 PM.
 
Old 11-22-2008, 03:03 AM   #8
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
yes...i edited in the /boot/grub/menu.lst.....
then i got the newly compiled kernel in the menu while i reboot the system....but when i enter into that i am getting this following error........

starting up.....
uncompressing linux...ok,booting the kernel
[ 53.987716]kernel panic - not syncing: VFS : unable to mount root fs on unknown -block(0.0)


wher will be the root fs...how to mount that....
 
Old 11-22-2008, 11:31 PM   #9
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
how to boot the new kernel please do favour for me.....i dont know what to do....when i boot from new kernel i am getting the error message..i mean in the last post.....somebody help me to clear this
 
Old 11-23-2008, 12:51 AM   #10
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Quote:
Originally Posted by shariefbe View Post
yes...i edited in the /boot/grub/menu.lst.....
then i got the newly compiled kernel in the menu while i reboot the system....but when i enter into that i am getting this following error........

starting up.....
uncompressing linux...ok,booting the kernel
[ 53.987716]kernel panic - not syncing: VFS : unable to mount root fs on unknown -block(0.0)


wher will be the root fs...how to mount that....
That error message is almost always because you compiled file system support for the file system type support of your linux partition as a module. If the root fs type support is a module then you _must_ use an initrd with that module included. Since making an initrd is rather complicated, the best solution for a beginner is to simply compile it into the kernel, not as a module. Recompile your kernel, this time selecting compiled in for the root fs type. In fact, to make things simpler just compile in any fs type support you intend to use.
 
Old 11-23-2008, 02:34 AM   #11
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
Actually i didnt select the kernel as module..in fact i dont know too...but you told that the kernel is selected as module....how to clear this..and how to remove the compiled kernel and please can you give the correct step by step procedure to compile the kernel?Thanks for your patience
 
Old 11-23-2008, 02:44 AM   #12
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
Quote:
Originally Posted by shariefbe View Post
Actually i didnt select the kernel as module..in fact i dont know too...but you told that the kernel is selected as module....how to clear this..and how to remove the compiled kernel and please can you give the correct step by step procedure to compile the kernel?Thanks for your patience
If you're not sure whether you selected it as a module, then probably you shouldn't be messing around in your kernel. Just fire up your distro with your "normal" (working) kernel and from there change the dysfunctional kernel as you did before (making the necessary changes) and then recompile it.
 
Old 11-23-2008, 03:03 AM   #13
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Original Poster
Rep: Reputation: 31
thats what how to fire up that kernel...whats the procedure....and please send me steps by step procedure to compile the kernel...so that i can easily compil it...cause i was confused by searching in net..Thanks
 
Old 11-23-2008, 05:05 AM   #14
unihiekka
Member
 
Registered: Aug 2005
Distribution: SuSE Linux / Scientific Linux / [K|X]ubuntu
Posts: 273

Rep: Reputation: 32
When GRUB comes up, hit ESC and then select the usual kernel, i.e. the one you did not compile yourself. Then you should be able to go into linux with the right kernel.

Regarding the compilation question: google is your friend!
 
Old 11-23-2008, 08:02 AM   #15
monsm
Member
 
Registered: Feb 2005
Location: London, UK
Distribution: Gentoo
Posts: 568

Rep: Reputation: 37
If you have deleted you old kernel entry in the menu.lst file, you will have to boot with a DVD, mount the hard drive there and then put in the old kernel line again. You might find the old entry in the backup file (menu.lst~ or menu.bak).
Also when you get into the harddrive again, check the /etc/fstab file. You should at least have a root there (with the'/' character). It should either use the same UUID or the device itself (e.g. /dev/sda1 or /dev/hda1).

Also are you sure the UUID is exactly the same as it was? If you notice during boot, before the kernel panic try to see what the hard drive is recognised as, or whether you have other error messages before the panic.

If you haven't got the old kernel and you have compiled in the correct file system in the kernel, you can try to replace the root=UUID=7ef4f8ec-7dd3-4c02-9f24-c9438e6b8bce from grub with the root=/dev/xxxx. To find the correct name you can try fdisk -l /dev/sda (or again with hda instead of sda). If you have only got one hard-drive its mostly likely one of the two. In addition to the hda/sda you will need to add the partition number to it. Let us know how it goes.

Mons
 
  


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
Kernel Compilation Problem nsampath Linux - Software 5 10-27-2007 12:56 PM
kernel compilation problem ddaas Suse/Novell 2 06-12-2007 06:07 AM
Kernel compilation problem alephnull Slackware 11 04-19-2006 10:38 PM
kernel compilation problem vishalbutte Programming 6 02-07-2006 10:55 PM
Kernel Compilation Problem 2.6.7 ultrix Slackware 4 08-11-2004 05:31 AM


All times are GMT -5. The time now is 11:20 AM.

Main Menu
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