LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 08-23-2005, 04:19 PM   #1
shotokan
Member
 
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Rep: Reputation: 30
Non-modular Kernel from scratch Help


Ok, I've successfully Installed LFS 6.0 and Hotplug but, I ran into a problem in BLFS with ALSA as the instructions seem to only work with a non modular kernel. (Mine Had lots of loadable modules).

So I recompiled the kernel in Slackware 10 several times trying to get various things to work (with out modules) I generally got my internet connection, usb mouse, the screen (the CLI), and the CD-RW drive working.

But for some reason my CD-ROM drive won't work and I went back to the Old Kernel with several loadable modules and realized it didn't work in there either.

--That was just the back-story for the following question.--

Are there any Tips and Tricks for compiling a non-modular kernel from scratch? (In a 2.6 kernel)
 
Old 08-23-2005, 04:37 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Wel the only two I can think of are fairly obvious. Install pciutils from BLFS, run update-pciids and then use lspci to see what the main hardware you've got is. The other thing to try is to boot into a distro where the functionality you want works and then run lsmod to see what modules are loaded. Those are probably the modules you'll want to build into your kernel.
 
Old 08-26-2005, 02:07 AM   #3
shotokan
Member
 
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Original Poster
Rep: Reputation: 30
Thanks, I worked through all the problems in the kernel
It's now non-modular, and has little more support than I need.

These are tips I came up with for debugging while doing this:
  • First figure out If the kernel is the problem.
    (by switching to another one)
  • If the kernel is the problem, figure out what section of the kernel config the problem is in.
    (by copying from the working kernels sections one by one)
  • After that, Figure out if it is something that needs to be enabled or disabled.
    (by enabling or disabling all or most of the things in that section)
  • Finally that zero in on the problem.
    (by enabling or disabling things one by one)
 
Old 08-28-2005, 06:12 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,706
Blog Entries: 4

Rep: Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030
CD-ROMs can be particularly problematic, because the old way of using them generally involved "faking SCSI." Now, most IDE CD-ROMs can be supported directly, as the IDE devices that they really are. (The old magic involved a strange kernel-parameter which is also no longer required.)

This might require some adjustment to, e.g. /etc/fstab entries.

I just stuck a disk into the drive (lots of drives won't get too far if they're empty) and fiddled with mount.

I also did dmesg | grep hd[a-d] to get an idea of what messages might appear that involved the CD-ROM device. Mine turned out to be /dev/hdc.

It's definitely true that "2.6 is different, sometimes subtly different," and when "something doesn't work that used to work before" (inevitably, of course), one tends to "panic and reboot" just to get back to normalcy. But the actual problem and its solution might prove to be simpler. And you basically need to be in the 2.6-kernel in order to fully diagnose what's not-quite-right.

If, in the dmesg output, the kernel can see the device, then "it's probably not a kernel-problem." That narrows your range of possibilities right there.

Also, device-handling in 2.6 is considerably different than it was before. Those "thousands of unused entries in /dev" are finally going away for good.
 
Old 08-29-2005, 05:05 AM   #5
shotokan
Member
 
Registered: Mar 2005
Distribution: slackware, LFS
Posts: 204

Original Poster
Rep: Reputation: 30
In my case it was /dev/cdrom was linked to hdd (my CD-RW) instead of hdc (my CD-ROM) because of Udev.

The problem would only be noticed in a 2.6 kernel.
 
Old 08-31-2005, 01:08 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,706
Blog Entries: 4

Rep: Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030
Ahh, udev ... I'm looking about for a really-good tutorial on that.

Oh, I should know to Google first about such things...

Last edited by sundialsvcs; 08-31-2005 at 02:56 PM.
 
Old 09-18-2005, 10:12 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 8,706
Blog Entries: 4

Rep: Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030Reputation: 3030
To follow-up on this one... no, I didn't have to keep using fake-SCSI to access the (IDE) CD-ROM. Before doing anything rash, I checked around a little bit and saw that, indeed, the CD-ROM had really been there all along.

Furthermore, while utilities like cdrecord still say they want devices to be identified in "SCSI-speak," the current versions will accept ordinary "/dev/.." syntax, although with a rather-curious message to the effect that their ability to support this alternate syntax is some kind of an accident.

It helped a lot to roll-out the liveCD and thus to look at the machine from the point-of-view of a Linux installation that had nothing to do with the original host. Device-handling in particular is markedly different from 2.4 to 2.6, and it's rather hard to grok what's going on when the /dev directory is still filled with thousands of (useless, never needed in the first place) entries.
 
  


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
how to compile a kernel with modular sound? darkleaf Linux - Software 3 07-07-2004 04:38 PM
Network doesn't start on Laptop boot (modular NIC / pcmcia kernel drivers) Swad Debian 1 11-09-2003 09:46 AM
ALSA and Kernel Modular Drivers digital abuzer Linux - Hardware 1 10-09-2003 10:52 AM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 06:11 AM
question about kernel compiling from scratch ... purpleburple Slackware 2 03-19-2003 07:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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