LinuxQuestions.org
Help answer threads with 0 replies.
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 12-10-2004, 07:50 AM   #1
doctorwebbox
Member
 
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117

Rep: Reputation: 15
Newbie compiling a kernel


I have now been trying to get this to work for about 3 months with no success at all. I have submitted my problems on many forums, and tried IRC rooms for help but no joy at all. I can understand that people are busy and I am in no position to demand anyones help but surely other people must be having the same problems. So if anyone can spare me a little time and doesn't mind explaining what's going on, that would be great. A lot of these forums have solutions to problems without explanation. I find it very frustrating when I get a problem I don't understand, seek help and fix it with a solution I don't understand, this is not the way to get to know my system.

I have been using Linux for a couple of years know and have been learning bits and pieces as I go along. There are a lot of things I would like to do but the guides all say start by compiling a kernel with x, y and z support included.

I had a word with my mate who knows what he's doing and he said, no problem, Debian make it really easy for you. Just:

Download the source.

Untar it and cd into the folder that is created.

run make xconfig or make menuconfig.

Pick the features you would like built in and which you would like to be loaded as modules.

Run make-kpkg kernel_image.

cd ../ and run dpkg -i whatevernewpackageiscalled.deb

It sorts everything out and updates grub for you.

It sounds so simple. Doesn't it? When I manage to go through the procedure without it bailing out and giving me an error I always get this error when I try to boot using the new kernel:

VFS: Cannot open root device "hda2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount fs on unknown-block(0,0)

I was advised to check that support for my filesystem is built in and not modular, I checked and it is, my filesystem is ext3. Other than that I am told "Well, it SHOULD work", so I have put Linux onto my Laptop to try doing the same there just in case the problem is something particular to my home computer but EXACTLY the same happens.

I have compared the new grub entry that is created with exisiting ones to check that nothing looks amiss there, they are the same other than the new entry has no line refering to initrd. But I have been assured that this doesn't matter.

The only other thing I could think to do was to try adjusting some things during the make menuconfig bit, but, and I don't mean to sound lazy, but I have no idea at all what 99% of the options in there actually do, how do I know which of the hundreds of options I need? As far as I know any one of those could be stopping it from working but surely I'm not expected to go through changing them one by one to see if it works, as it takes pretty much all day to have one attempt at compiling I would be here for a lifetime.

So I'm stuck, I've tried every avenue I can think of for help but nothing. It is so frustrating.
 
Old 12-10-2004, 08:16 AM   #2
LauroMoura
Member
 
Registered: Feb 2004
Location: Carpina, PE, Brazil
Distribution: Ubuntu 5.10
Posts: 44

Rep: Reputation: 15
Try the "old" method (non-dpkg)

I do (for 2.6.9 in slack 10.0):

(on /usr/src)
- Download the code.
- Untar (tar -xjf ....)
(now on /usr/src/linux-2.6.9)
- make mrproper
- make xconfig (or any config you like)
- make bzImage
- make modules
- make modules_install

To finish install, I tried 'make install', but it copied vmlinuz to the root ( / ), not boot ( /boot ) directory. Then I just moved it to /boot and added to /etc/lilo.conf. (The last step was running lilo and rebooting)
 
Old 12-10-2004, 01:56 PM   #3
doctorwebbox
Member
 
Registered: Jun 2003
Location: Rotherham, South Yorkshire, England
Distribution: Debian
Posts: 117

Original Poster
Rep: Reputation: 15
Thanks

Thanks a lot. I will certainly give that a go. Can I ask how you go about choosing your options in the config part, do you understand all of the options or do you just assume most of them are already set correctly?

Also, does anyone use the debian tools, I have been told that they're great and simple to use, I m just obviously not using them correctly. Can anyone tell me what I am doing wrong with the Debian tools?
 
Old 12-10-2004, 02:03 PM   #4
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
Re: Thanks

Quote:
Originally posted by doctorwebbox
Thanks a lot. I will certainly give that a go. Can I ask how you go about choosing your options in the config part, do you understand all of the options or do you just assume most of them are already set correctly?
You'll sometimes come across options that you miss and need for a program. Then you know you have to recompile it in. For other stuff it helps to know your hardware. There's a help function which often says what you should do if you don't know what to do with the option. Just assuming some are OK works pretty good as well. It'll make your kernel a bit larger but chances you did something wrong are less. Often you'll notice soon enough from error messages that you forgot something or did something wrong.

Quote:

Also, does anyone use the debian tools, I have been told that they're great and simple to use, I m just obviously not using them correctly. Can anyone tell me what I am doing wrong with the Debian tools?
I tried using the debian tools but they never worked for me. Now I always do (a bit different from above but I don't have to copy the kernel image to /boot myself):

download sources
untar sources in /usr/src
make a symbolic link linux to the source directory ("ln -s linux-(version) linux")
cd into the directory
make menuconfig
make && make modules
make modules_install
make install
 
  


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
Newbie Guide To Compiling A Kernel! DrOzz Linux - General 318 08-20-2008 06:21 AM
need help compiling - newbie digitalgravy Linux - Newbie 2 12-08-2003 07:36 PM
Compiling ??? NEWBIE LinuxOG Slackware 4 08-19-2003 06:29 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM
Newbie kernel compiling toolkit Linux - General 1 11-19-2002 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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