Kernel Compilation Issue


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Kernel Compilation Issue
# 1  
Old 06-28-2012
Kernel Compilation Issue

I have installed ubuntu 11.04 on my system.
After this when I used to give uname -r it showed me kernel version as 2.6.38.

Now I had downloaded kernel 2.6.34.12 from kernel.org and installed it using the following steps:
Code:
make
make modules
make modules_install
make install

This created files:
Code:
System.map-2.6.34.12
vmlinuz-2.6.34.12
config-2.6.34.12

In /lib/modules also I can see the new kernel 2.6.34.12 folder.

Next to create initrd.img I fired:
Code:
update-initramfs -c -k 2.6.34.12

Then I checked the grub.cfg and it showed me an entry for 2.6.34.12.
Next I updated grub:
Code:
update-grub


But after reboot uname -r still shows me the previous version 2.6.38.
What is the issue and why new kernel version is not installed?

Moderator's Comments:
Mod Comment Code tags for code, please.

Last edited by Corona688; 06-28-2012 at 05:23 PM..
# 2  
Old 06-28-2012
This is why I dislike the excessive automation ubuntu's put in the process, none of those commands are standard so we can't tell if you're using them right, and there's little way to tell whether they even succeeded, or what success even means...

What did your grub.cfg actually look like in the end?
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 06-29-2012
Thanks coronna for the reply.

grub.cfg contents are as follows:

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=aff29280-0f0d-4a9e-b692-cecd22f321ca ro   
	initrd	/boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	echo	'Loading Linux 2.6.38-8-generic ...'
	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=aff29280-0f0d-4a9e-b692-cecd22f321ca ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.38-8-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.34.12' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	linux	/boot/vmlinuz-2.6.34.12 root=UUID=aff29280-0f0d-4a9e-b692-cecd22f321ca ro   
	initrd	/boot/initrd.img-2.6.34.12
}
menuentry 'Ubuntu, with Linux 2.6.34.12 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	set gfxpayload=$linux_gfx_mode
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	echo	'Loading Linux 2.6.34.12 ...'
	linux	/boot/vmlinuz-2.6.34.12 root=UUID=aff29280-0f0d-4a9e-b692-cecd22f321ca ro single 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.34.12
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos1)'
	search --no-floppy --fs-uuid --set=root aff29280-0f0d-4a9e-b692-cecd22f321ca
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
  if sleep --verbose --interruptible 10 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

fortran compilation issue

Hi, I am getting following error when i try to compile : Error: Expected variable in READ statement at (1) read(12,*) ((l1to2(l,j),j=1,2),l=1,ngl(2,4)) Also i am getting following error : Error: Syntax error in COMMON statement at (1) at some statements. I am using mpif90... (1 Reply)
Discussion started by: aksharb
1 Replies

2. Linux

Linux kernel compilation

I have complied the kernel with a default settings... now if I load this kernel , it'll load perfectly but the INTERNET is not workink... I think in the default settings The network modules are not included.. Can anybody help me out with the selection of the network module when i give "make... (1 Reply)
Discussion started by: naresh046
1 Replies

3. Red Hat

Kernel compilation for s3c2440

Hi All, I am trying to compile Kernel 2.6.31 with arm-linux-gcc3.2.2 for s3c2440a, but I am not able to perform the task. I am using Redhat 9 firstly i am using the following commands $make s3c2410_defconfig // there is no error in execution of this command next i run $make ... (0 Replies)
Discussion started by: niranjanvg
0 Replies

4. UNIX for Advanced & Expert Users

Kernel module compilation problem

I have one big module 2.6.18 kernel mod.c I want to divide this to several files. The problem is to write right Makefile lib1.h lib1.c mod.c mod.c works fine normally but when I divide into several files and try to compile with this makefile obj-m := mod.o mod-objs := lib1.o ... (3 Replies)
Discussion started by: marcintom
3 Replies

5. Red Hat

kernel compilation: ncurses issue

Hi, While trying to build the linux kernel - 2.6.24.2, i get the following error message during initial phase(make menuconfig) : scripts/kconfig/lxdialog/dialog.h:32:20: error: curses.h: No such file or directory <=== In file included from scripts/kconfig/lxdialog/checklist.c:24: It seems... (1 Reply)
Discussion started by: amit4g
1 Replies

6. UNIX for Advanced & Expert Users

postfix compilation issue with make

Hi guys, I'm in trouble to do postfix compilation on a Solaris. SunOS 5.10 Generic_118833-33 sun4u sparc SUNW, Sun-Fire-V440 I'm trying to compile postfix-2.4.5 which make replay /usr/ccs/bin/make and it's in the profile When I launch make install clean it replies make: Fatal... (2 Replies)
Discussion started by: moustik
2 Replies

7. UNIX for Dummies Questions & Answers

Issue with makefile compilation

All, I am facing problem with one makefile compilation. The following is the error I am getting, Before proceeding to this I want to let you know all, only last week onwards I started working in solaris10, the same code is working in solaris 9. I dont know any link has to be created, or any path... (3 Replies)
Discussion started by: nsurendiran
3 Replies

8. Programming

Issue with Makefile compilation

All, I am facing problem with one makefile compilation. The following is the error I am getting <Code> /applns/ora10/rdbms/bin/proc sqlcheck=semantics userid=/ CHAR_MAP=VARCHAR2 DBMS=V7 DEFINE=UNIX DEFINE=SUN_SRC_COMPAT iname=mm5900.pc sh: /applns/ora10/rdbms/bin/proc: not found *** Error... (1 Reply)
Discussion started by: nsurendiran
1 Replies

9. UNIX for Dummies Questions & Answers

Kernel compilation

I have re-compiled kernel source code available in /usr/src/linux.2.4.20 with "make" command. The compilation is succesful. Now the problem is create the image for this. The documentation in the same folder says that now you have compile "make image". There is no option for image in Makefile. ... (3 Replies)
Discussion started by: mankrish
3 Replies

10. Red Hat

New kernel Issue

root@pr # iptables -L modprobe: QM_MODULES: Function not implemented modprobe: QM_MODULES: Function not implemented modprobe: Can't locate module ip_tables iptables v1.2.8: can't initialize iptables table `filter': iptables who? (do you need to insmod?) Perhaps iptables or your kernel... (5 Replies)
Discussion started by: prashant_ohol
5 Replies
Login or Register to Ask a Question