LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-14-2009, 06:32 PM   #1
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Rep: Reputation: 15
compiling a new kernel


Hi all. I have slackware 12.2 installed and am trying to compile and run kernel 2.6.31. I want to start poking around in the kernel source and possibly start contributing eventually so I thought the first step would be to be able to compile and run with a new kernel.

I followed a couple guides which make it sounds pretty easy.

I simply did a standard compile using make menuconfig, copied the kernel binary into /boot and added it to lilo. After doing this trying to boot with 2.6.31 resulted in an error message something like this:
"Kernel panic, unrecognized VFS unable to mount the root filesystem".
After doing some more reading I found that this may be a result of not having the proper modules loaded. My root filesystem is ext3, and I thought that I had compiled support for ext3 into the kernel when I was choosing options for make menuconfig. Nonetheless I created an initrd with ext3 in it and I can now "sort of" boot.

When I boot with 2.6.31 I see no error messages but the boot only goes up to the point where it's collecting my USB devices. At that point it stops and if I hit <return> I get a bash shell. From this shell I see a more or less empty filesystem with not too much in it. Does anyone have an idea as to what's going on? I've included my lilo.conf as it stands now:

[edit]
I forgot to mention. I'm using the kernel sources pulled down via git into a repository on an internal raid1 array.

Code:
# LILO configuration file   
# generated by 'liloconfig' 
#                           
# Start LILO global section 
# Append any additional kernel parameters:
append=" vt.default_utf8=0"               
#boot = /dev/sda                          
boot = /dev/disk/by-id/scsi-SATA_WDC_WD2500KS-00_WD-WCANK1307402

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/slack.bmp       
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,0,255,0,255,0                          
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many  
# entries must be in the first column before the next begins to  
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16                                          
# Timer location x, timer location y, foreground color,          
# background color, shadow color.                                
  bmp-timer = 65,27,0,255                                        

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:        
#message = /boot/boot_message.txt                   

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):                                 
prompt                                                      
# Timeout before the first entry boots.                     
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Windows bootable partition config begins
#other = /dev/sda1
 other = /dev/disk/by-uuid/E0201A49201A2756
  label = Windows
#  table = /dev/sda
  table = /dev/disk/by-id/scsi-SATA_WDC_WD2500KS-00_WD-WCANK1307402
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
#  root = /dev/sdc3
  root=/dev/disk/by-uuid/eaf96b13-7de3-4cb4-9ffc-41e49455a169
  label = Linux
  read-only
# Linux bootable partition config ends
#linux kernel with BFS scheduler
  image = /boot/vmlinuz-kernel-2.6.31
  root=/dev/disk/by-uuid/eaf96b13-7de3-4cb4-9ffc-41e49455a169
  initrd = /boot/initrd-kernel-2.6.31
  label = Linux-2.6.31
  read-only
#linux 2.6.31 config ends

Last edited by icarus127; 09-14-2009 at 06:34 PM.
 
Old 09-14-2009, 06:53 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

In your '/etc/lilo.conf' use the device name instead of the 'id'.
 
Old 09-15-2009, 02:35 AM   #3
piratesmack
Member
 
Registered: Feb 2009
Distribution: Slackware, Arch
Posts: 519

Rep: Reputation: 142Reputation: 142
It might help to use the config file of a working kernel as a base.

Boot the default kernel and run
Code:
cd /usr/src/linux
make mrproper
zcat /proc/config.gz > .config
make menuconfig
make
It's important that you have support for your filesystem built into the kernel and not as a module. If not, you'll have to use an initrd. (see /boot/readme.initrd)
 
Old 09-15-2009, 02:39 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
It's hard to to say what happens, not knowing how you did configure your kernel.

A safe way is:
- download kernel source for 2.6.31, put it in /usr/src and untar it
- cp the generic Slackware config file in /boot as /usr/src/linux-2.6.31/.config
- make oldconfig and answer questions appropriately
- make xconfig only to include your root file system built-in
- make bzImage
- make modules
- make modules_install
- copy the relevant files to /boot
- edit lilo.conf accordingly and run lilo

More details in this article from Eric Hameleers aka Alien BOB
 
Old 09-15-2009, 08:38 AM   #5
liuguobiao
Member
 
Registered: Dec 2008
Location: china
Distribution: slackware
Posts: 32

Rep: Reputation: 16
Hi , I have the same problem when I compile kernel 2.6.30 ,I just want try to recompile it
follow what piratesmack said. I think it must be something wrong in ".config" file before I failed.
 
Old 09-15-2009, 08:47 AM   #6
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Quote:
Originally Posted by liuguobiao View Post
Hi , I have the same problem when I compile kernel 2.6.30 ,I just want try to recompile it
follow what piratesmack said. I think it must be something wrong in ".config" file before I failed.
Use one of the config files from /boot
 
Old 09-15-2009, 11:02 PM   #7
joegumbo
Member
 
Registered: Sep 2006
Distribution: MX-16 Modified using TDE
Posts: 239

Rep: Reputation: 32
This really helped me, too.

Thank you, Didier Spaier.

Last edited by joegumbo; 09-16-2009 at 09:42 AM.
 
Old 09-16-2009, 09:26 AM   #8
liuguobiao
Member
 
Registered: Dec 2008
Location: china
Distribution: slackware
Posts: 32

Rep: Reputation: 16
piratesmack said "zcat /proc/config.gz >.config"
I do this and I find a link file /boot/config link to /boot/config-huge-smp-2.6.27.7-smp ,Then I copy it to the kernel compile directory. then recompile the kernel .Then I successful.
Thank you folks !
Code:
dream@LIU:~$ uname -a
Linux LIU 2.6.30.5-smp #3 SMP Wed Sep 16 16:29:12 CST 2009 i686 Intel(R) Celeron(R) CPU 2.66GHz GenuineIntel GNU/Linux
 
  


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
Good but sorta easy guide to Kernel compiling/Re-Compiling? linus72 Linux - General 1 07-13-2009 01:37 PM
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 01:45 AM
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Góes Slackware - Installation 2 04-15-2007 08:42 PM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:46 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