LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-19-2005, 07:00 PM   #1
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
n00b kernel compile problems


Hi, I'm giving Slackware a shot on my desktop. Anyhoo, I thought it was about time I tried my first kernel compile.
Well, I downloaded kernel 2.6.12, unpacked it and linked it to /usr/src/linux. Then I did "make menuconfig" and tried my best to get most stuff right. In the cases of modules I wasn't too sure about, I just followed the recommended advice to compile them in or not.

Then "make"
Then "make modules_install"
Then "make install"

I edited lilo.conf - It all looks ok to me

then rebooted.

It got through a fair bit of the boot process then hit a snag

Code:
VFS: Cannot open root device "305" or unknown-block(3,5)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,5)
I installed the support for Reiserfs and Ext2 and Ext3, so it's nothing to do with that

Well, not sure what's going on, but I'd really appreciate some help.
Cheers
 
Old 06-19-2005, 07:03 PM   #2
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
And here's my lilo.conf

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda
#compact        # faster, but won't work on all systems.
prompt
timeout = 50
# 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
# ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/hda5
  label = slack
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hda1
  label = win2k
  table = /dev/hda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-ide-2.4.26
  root = /dev/hda5
  label = SlackOld
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
 
Old 06-19-2005, 07:28 PM   #3
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
maybe some other thing missing, like ide-support.
what config file did you use as a startpoint.
you might want to recompile, but use the config-file that comes with a slackware-2.6-x kernel.
you can find such on the cd in /testing, or at any slackware mirror.

copy the file to /usr/src/linux-2.6.12/.config ( mind the dot )
and the run " make xconfig ".
( i think you keep your kernel-src in /usr/src/ )
recompile&reinstall and it should boot

btw.: there's no need for the " /usr/src/linux " symlink.
( it's kind of folklore )

egag

Last edited by egag; 06-19-2005 at 07:58 PM.
 
Old 06-19-2005, 07:41 PM   #4
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
I didn't actually use a pre-configured config file, I generated a new one with "make menuconfig". Is it best to use a different one as a template? I've got a pretty standard system.
To remove the kernel I've just installed so I'm ready to compile and install a new one, can I just do "make uninstall" or something? What's the best way to do this?
Thanks
 
Old 06-19-2005, 07:56 PM   #5
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
i don't think you need to uninstall those.
" make install "will just overwrite the old files
( it's only the /boot/vmlinuz ; /boot/System.map and the module tree in /lib/modules )

egag
 
Old 06-19-2005, 08:06 PM   #6
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
ok, I'll get back stuck into it tomorrow. It's fun, but kinda disappointing to see it fail after spending so long on make menuconfig. I'm pretty sure I compiled everything to do with ide support, so if anyone has any extra suggestions for the possible source of the kernel panic, I'd be very interested to hear them.
Thanks for the helpful advice, egag.
Cheers
 
Old 06-19-2005, 08:54 PM   #7
DaOne
Member
 
Registered: Jan 2003
Location: USA
Distribution: Slackware
Posts: 498

Rep: Reputation: 30
Did you edit the Makefile to uncomment the install (export) path? Otherwise "make install" won't rename, copy, install the newly compiled kernel where it needs to be.

And...sorry if you already had all that covered, but sometimes I find myself so involved, that I forget the most basic tasks. Just a thought

Last edited by DaOne; 06-19-2005 at 08:55 PM.
 
Old 06-19-2005, 11:44 PM   #8
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
Quote:
Did you edit the Makefile to uncomment the install (export) path? Otherwise "make install" won't rename, copy, install the newly compiled kernel where it needs to be.
I did check makefile, and it seems that line is uncommented by default in this version of the kernel (2.6.12)
You're right about it being an involving process. I can see the possibility of getting addicted to kernel compilation.

Cheers
 
Old 06-20-2005, 07:12 AM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Did you enable PC BIOS (MSDOS partition tables) support ?

And maybe Windows Logical Disk Manager (Dynamic Disk) support

File systems --->Partition Types
 
Old 06-20-2005, 07:23 AM   #10
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
Quote:
Did you enable PC BIOS (MSDOS partition tables) support ?

And maybe Windows Logical Disk Manager (Dynamic Disk) support

File systems --->Partition Types
Err, now I've got to be honest here and say that I don't quite remember, and I'm on my way out to work so I haven't got time to check the .config file, but I'll have a look into it later. I do remember the section though, and I'm pretty sure I did enable both.

VFS: Cannot open root device "305" or unknown-block(3,5)

What would device "305" or (3,5) point to anyway?

Thanks
 
Old 06-20-2005, 08:08 PM   #11
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
Errr, I've tried a few different .config files now, but nothing's working. I tried the one off a slackware /testing mirror, and I also used someone else's that I found - I edited them a bit for my hardware, but I still end up with the same error when I boot:

Code:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,5)
I'm at a bit of loss until I have some idea what the error means. What the hell is block(3,5)?

I can post sections of my .config file if anyone's interested, but there's nothing really obvious that's amiss.

Cheers!
 
Old 06-20-2005, 10:20 PM   #12
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
You're either missing the driver for your IDE/SATA hdd or the filesystem support built-in into the kernel instead as module OR you're not initializing in the right way the initrd image in case you use it.
 
Old 06-21-2005, 07:03 PM   #13
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
OK, still not sure what I was doing incorrectly originally, but I ended up using the .config file for 2.6.10 off the mirrors, which I edited and I'm now using my new kernel.

Just a couple o' questions though to start. If I want my slackware lilo to boot another linux distro on my box, how should I do it? Do I need to copy some files/directories from the /boot directory of the other distro to the /boot directory of Slack, and if so, what?

Also, even though I thought I compiled all of the necessary nvidia support, it still seems I have to reinstall the NVidia driver. When I try to, however, it says it can't install properly. Here's some of the log

Code:
 Building modules, stage 2.
   make -rR -f /usr/src/linux-2.6.12/scripts/Makefile.modpost
   /usr/src/linux-2.6.12/scripts/Makefile.modpost:38: .config: No such file or 
   directory
   make[4]: *** No rule to make target `.config'.  Stop.
   make[3]: *** [modules] Error 2
   make[2]: *** [modules] Error 2
   NVIDIA: left KBUILD.
   nvidia.ko failed to build!
   make[1]: *** [module] Error 1
   make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.
OK, now I haven't exactly sifted through the nvidia README yet, but I will if noone here has a quick answer for what may be wrong.

Cheers!
 
Old 06-21-2005, 08:02 PM   #14
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Quote:
/usr/src/linux-2.6.12/scripts/Makefile.modpost:38: .config: No such file or
directory
As that says, check that you've your kernel .config file in it's place (/usr/src/linux-2.6.12/.config).

Regarding lilo, mount your other distro somewhere like /mnt
and use in lilo, image=/mnt/thatdistrokernel.
 
Old 06-21-2005, 08:38 PM   #15
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Original Poster
Rep: Reputation: 30
Quote:
Regarding lilo, mount your other distro somewhere like /mnt
and use in lilo, image=/mnt/thatdistrokernel.
I copied the /boot directory from my other distro into the /boot directory of Slackware and changed lilo.conf accordingly. Is there anything bad about doing it this way?

Quote:
As that says, check that you've your kernel .config file in it's place (/usr/src/linux-2.6.12/.config).
Ahh, so that's what it said

As for NVidia, I copied the .config file back to /usr/src/linux-2.6.12 but the module still won't load. The error I get now is

Code:
ERROR: Unable to load the kernel module 'nvidia.ko'.  This is most likely
       because the kernel module was built using the wrong kernel source files.
       Please make sure you have installed the kernel source files for your
       kernel; on Red Hat Linux systems, for example, be sure you have the
       'kernel-source' rpm installed.  If you know the correct kernel source
       files are installed, you may specify the kernel source path with the
       '--kernel-source-path' commandline option.
-> Kernel module load error: insmod: error inserting './usr/src/nv/nvidia.ko':
   -1 No such device
-> Kernel messages:
   nvidia: module license 'NVIDIA' taints kernel.
   NVRM: The NVIDIA probe routine was not called for 1 device(s).
   NVRM: This can occur when a driver such as rivafb or rivatv was
   NVRM: loaded and obtained ownership of the NVIDIA device(s).
   NVRM: Try unloading the rivafb (and/or the rivatv) kernel module
   NVRM: (or reconfigure your kernel without rivafb support), then
   NVRM: try loading the NVIDIA kernel module again.
   NVRM: No NVIDIA graphics adapter probed!
   NVRM: The NVIDIA probe routine was not called for 1 device(s).
   NVRM: This can occur when a driver such as rivafb or rivatv was
   NVRM: loaded and obtained ownership of the NVIDIA device(s).
   NVRM: Try unloading the rivafb (and/or the rivatv) kernel module
   NVRM: (or reconfigure your kernel without rivafb support), then
   NVRM: try loading the NVIDIA kernel module again.
   NVRM: No NVIDIA graphics adapter probed!
ERROR: Installation has failed.  Please see the file
       '/var/log/nvidia-installer.log' for details.  You may find suggestions
       on fixing installation problems in the README available on the Linux
       driver download page at www.nvidia.com.
I added the kernel source path option (pointed it to /usr/src/linux-2.6.12) to the installation command, but it didn't help. I did compile rivafb as a module for some not very good reason, but it's not in the output of lsmod, so I can't see how it can be that which is causing this problem.

Appreciate all the help!
 
  


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
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
Problems after kernel 2.6.3 compile limiter Linux - Software 5 03-11-2004 05:31 PM
2.6 kernel compile problems frieza Linux - Software 8 02-19-2004 07:50 PM
Kernel compile problems 2.4.24 and 2.6.1 Evilone Linux - Software 2 01-12-2004 06:05 AM
a n00b who needs a little more hand holding to compile his own kernel... cmack Slackware 9 08-04-2003 01:16 PM

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

All times are GMT -5. The time now is 06:21 AM.

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