Kernel Compile Guide for 2.6.0
Hey all...just went through a few compiles to see what's what, and wanted to share with you since alot of you refer to the Sticky which was based on 2.4 kernels. The Sticky is HERE
First...the same applies as far as editing lilo.conf and the Makefile (uncomment "export INSTALL_PATH=/boot"). I know...it's not line 74 anymore...it is now line 450. Now, make install still works great as long as the above is done. So...once the kernel source is downloaded and extracted to /usr/src, you can then create a new link. From /usr/src rm -f linux ln -s linux-2.6.0 linux cd /linux make mrproper Then copy your existing .config to your new kernel source tree... cp /usr/src/linux-2.4.?/.config /usr/src/linux make oldconfig (to use your old config and choose to add/not add the new options) or... make menuconfig (to use your old config and tweak further) or... make whatever other type you like (xconfig,gconfig,etc.) Just exit and save the configuration, then... make su -c "make modules_install" make install That's it...reboot, take 2 aspirins, and call someone else in the morning :D |
my kernel compiling Question
DaOne,
make oldconfig (to use your old config and choose to add/not add the new options) make menuconfig (to use your old config and tweak further) make whatever other type you like (xconfig,gconfig,etc.) Q1: Why must i must this all at the same time? Q2: Can i rename my config file to other name beside .config? can it be found if i rename it to other name? Q3:Why you didn't do this: ln -s System.map-ide-2.6.0 System.map |
What is the use of System.map file??? does it important?? or i can just ignore it???
i have a problem... the modules of snd_emu10k1 (soundblaster live) doesnt load automatically, when it is booting... i have read somewhere that, i have to install modules_init_tools... how can i make use of this...., pls advise??? |
I compiled all I needed into the kernel following the steps as posted. When rebooting I get a strange (long list) of errors stating that iptables can't be loaded. No clue if that has something to do with the mentionend tools? Why is the kernel looking for modules anyway? I didn't compile any in the new kernel. Final question: should I comment all the uncommented modules in the config file? This wouldn't be nice, since I'd like to keep the 2.4.22 kernel for a while aswell (hate to comment and uncomment all the time when changing)
Regards |
Re: my kernel compiling Question
Quote:
Second, when you copy your existing .config into the new kernel source tree, the original stays in the old kernel tree. Basically, you are just using your existing kernel config as a starting point for configuring the new kernel. The old config and kernel remains as it was. And...yes, if you rename .config, it will not be found. Third, I have never created a link to System.map...when you run make install, everything that needs to be copied, renamed, etc. will be done (as long as you properly edit the Makefile)...make install also runs lilo for you. Hope this helps. |
Quote:
modprope snd_emu10k1 then just uncomment it in /etc/rc.d/rc.modules, or if it isn't there, add the line /sbin/modprobe snd_emu10k1 As for modules_init_tools...don't know. I didn't install this and had no problems. However...I do believe that this is NOT backwards compatable. So your old kernel may not work if you install this if you are not careful...maybe someone else has more info on this. |
Quote:
Are you refering to the rc.modules file? You only need to uncomment the modules that you know you need if they are not automatically loaded by the kernel. You shouldn't have to uncomment too many if any at all if the kernel is properly configured. |
Quote:
Quote:
|
kc00l...I didn't see this before. Thanks.
|
Thanks for your guide too. It has made me think about using "make install" instead of doing the manual post kernel building procedure.
This is what I love about Linux users community, you don't and you can't afford to stop learning. OTOH you feel you can't help telling others your way of doing something, maybe just to know this isn't the right way to do that. Anyway don't listen to me, I'm just a mad doctor! :) |
Quote:
|
DaOne, great guide on how to compile the new kernel. It was my first ever serious attempt to upgrade and get it to work. I now have 2.6.0 on my machine.
To my problems. I encountered a problem with Nvidia drivers after the install... ERROR: The kernel header file '/lib/modules/2.6.0/build/include/linux/modversions.h' does not exist. The most likely reason for this is that the kernel header files in '/lib/modules/2.6.0/build/include' have not been configured. Thats one problem. A second problem is the | character. I have a Swedish keyboard and to be able to get | I press a button labelled Alt Gr. It allows me to use a third symbol in Windows. I have read a million pages and newsgroup posts about how to enable it in the console mode but it has never worked. I have tried the 2 Swedish keymaps but not the Finnish - Swedish ones. I guess I should check those first. Anyway, it hasnt been that much of a problem since I havent really needed the key for commands so far. I used the framebuffer mode so I had a 1024x768 resolution in console mode. But after the new kernel install that mode is gone and im limited to the standard resolution. If anyone have any ideas to fix any of my problems, feel free to enlighten me... I know the last 2 problems doesnt really have anything to do with the kernel deal but I felt its pretty pointless to start a new thread just because of them... |
powadha,
Does your firewall script load the modules explicitly? I had a problem with a script that errored out while checking for the modules since it was looking for modules with the .o extension whereas in 2.6 the modules have the .ko extension. Perhaps this helps. HC |
Dodgy --
The first time I compiled the 2.6.0-test11 kernel and tried to apply the nVIDIA driver update that I had originally downloaded for my 2.4.22 kernel, I got the same error message. I got around this by cheating a little bit and located the modversion.h file for my previous kernel (2.4.22) and copied it to the location indicated by the nVIDIA installer. However, once I did that and tried reapplying, I got a different error stating that the nVIDIA installer was not intended for the 2.6.0 kernel series and it aborted. Solution? You need to patch your nVIDIA installer package with a patch from this site: www.minion.de After installing the new 2.6.0 kernel yesterday and applying the appropriate patch, the module compiled and installed correctly and I was once again in the land of 3d acceleration. :) As for the other problems you mentioned... I don't have any advice on the keyboard issue. As for the start-up resolution, that is controlled through /etc/lilo.conf. Perhaps the setting got changed somehow? |
I have the nVidia problem too... and minion.de 's installer doesnt work yet... I followed the README verbatim, and I end up with some
' /lib/2.6.0/modules/build/xxxx - unable to find file/directory' error.... ok, thats not a quote... but u get what I mean... :-) Anyways, then I tried to do a manual copying of nvidia.ko and stuff, like I woulda done it if it was for a DIFFERENT kernel than the one I was running... but that didnt work either! Not sure what to do... |
I've been running the 2.6 kernel on my Slack machine ever since the 2.6-test3 series.
A bit of advice: although the .config file from the 2.4.22 kernel source will work, I find that you get a better build with fewer errors if you build your kernel from the base 2.6 .config (just run menuconfig or whatever you prefer against a clean 2.6 source). It's really not that difficult to do, and so long as you keep a lilo entry for your old 2.4 kernel, you can always go back and fix anything you might have missed. Just keep in mind these things: 1.) To prevent the "blank screen" that most new 2.6 kernel users often get on their first build, make sure that the following options are enabled: # Graphics support # CONFIG_FB=y CONFIG_FB_VESA=y CONFIG_VIDEO_SELECT=y # # Console display driver support # CONFIG_VGA_CONSOLE=y CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y CONFIG_PCI_CONSOLE=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y # # Logo configuration # CONFIG_LOGO=y CONFIG_LOGO_LINUX_MONO=y CONFIG_LOGO_LINUX_VGA16=y CONFIG_LOGO_LINUX_CLUT224=y Note: these settings are not default in 2.6 and often do not carry-over properly from the 2.4.22 config file and must be double-checked! 2.) Kernel panic: this is because Reiserfs (if you use it) is not enabled by default. Make sure it is enabled under "Filesystems". 3.) AGPGART is compiled-in by default. If you plan on using the NVIDIA AGP drivers, then I suggest either selecting AGPGART as a module or unselecting it alltogether. 4.) If you plan on using modules, take note that module unloading is not enabled by default. You won't be able to unload modules (like AGPGART mentioned above) when needed. Select the option under Loadable Modules Support. 5.) Sound: here's where everyone has problems: if you're scared of Alsa, then deselect it and select OSS. I've tried both and I can't tell which sounds better (if at all). All I know is that OSS works with all 4 channels of my SBLive! and that controlling the mixer levels with rexima is simple and hassle-free (no alsamixer settings to have to set and store). It's OK, nobody's gonna hate you for using OSS over Alsa. 6.) Firewall/NAT: if you plan on using an iptables firewall, note that you need to select Network packet filtering and (to make it easy) everything under IP:Netfilter Config (I select them as modules). 7.) IDE-SCSI is no longer necessary with 2.6...you can use /dev/cdrom when using cdrecord or whatever CD-R software you use. I have a Plextor drive, and it works fine WITHOUT SCSI-EMULATION set in the kernel. 8.) Install correctly: a.) make bzImage && modules && modules_install b.) cp -v arch/i386/boot/bzImage /boot/vmlinuz-2.6 c.) cp Sytem.map /boot/Sytem.map-2.6 d.) rm -rf /boot/System.map e.) ln -sf /boot/System.map-2.6 /boot/System.map d.) mcedit /etc/lilo.conf e.) Make an exact copy of the entry for your 2.4.22 kernel just below it, and then change: image=/boot/vmlinuz ----to---> image=/boot/vmlinuz-2.6 and... label=Linux ----to---> label=Linux-2.6 f.) /sbin/lilo If there are no errors, then you're ready to boot. |
Quote:
Try the manual installion: 1) download: NVIDIA-Linux-x86-1.0-4496-pkg0.run (nvidia) NVIDIA_kernel-1.0-4496-2.6.diff.bz2 (minion.de) 2) install the kernel module (as root): # sh NVIDIA-Linux-x86-1.0-4496-pkg0.run --extract-only # cd NVIDIA-Linux-x86-1.0-4496-pkg0 # cd usr/src/nv # bzcat ../../../../NVIDIA_kernel-1.0-4496-2.6.diff.bz2 | patch -p1 # ln -s Makefile.kbuild Makefile # make install The instructions assume that you are running the target kernel. If that is not the case, you can still build the kernel module for that kernel, but since the KBUILD Makefile only respects the KERNDIR directive when it builds the module, you'll have to install the module manually; as an example (instead of 'make install'): Copyed from http://www.minion.de/files/NVIDIA_ke....0-4496.README |
Quote:
|
DaHammer... Thats EXACTLY what I did... And next, I even tried to copy nvidia.ko manually, and run depmod and stuff, like the next part in the readme... neither worked!!! I'll post the EXACT error messages sometime tonight, when I get back into Linux...
|
Thanx for the reply Tino27. I tried messing with LILO and settings things there but it doesnt help. Nothing happens. I actually might have forgotten something important in my kernel so I'm compiling a new today using the tips from Jymbo. I did it 3 times yesterday so at the end I might have been a little too tired to think with stuff like that. When I get the framebuffer to work in console, I'm gonna give the Nvidia deal a try, which I also found out about a little before I went to bed...
|
If u ever wanted to know about system.map I'd stucked with it:
http://www.dirac.org/p/linux/system.map/ |
DaHammer, ok, I just recompiled the 2.6 kernel, without the agpgart, and with some other inclusions I needed, and tried the nvidia install from minion, and it worked.... everythings setup now, and Im thinking of deleting all my other kernel compilations.... system is faster too now... thanks for ur help... c ya round...
|
Quote:
The question is, do I still need SCSI emulation to play DVD's? I managed to "fix" everything by returning to the "ide-scsi" version of lilo, but I want to make sure I have to indeed have it in order for all my CD/CDRW/DVD functionality to work. |
karthikrr, glad you got it worked out and yeah, I thought the 2.6.0 series was much faster as well.
|
one last question ... any idea how to get that damn boot logo working?
|
Hmm, not exactly sure what you mean by "boot logo", you mean the pengiun that sits atop the screen while the boot messages scroll? Or are you talking about a custom lilo boot logo? If the former, then check jymbo's post above. If the later, I'm not sure as I've never played with that much since I'd rarely see it anyway..hehe...But I do know that for the custom animated ones, you need a special version of lilo, I think the Suse version.
|
Quote:
Regards |
no no... The 2.6.0 kernel has a 'Bootup Logo' section in it during the config! Three logos, b&w, 16 colour and 256 colour (I think) are available... I chose all three, but none appear... I do have the penguin which comes when u enable fb during the bootup...
|
there are no modules loaded. When I try
insmod, lsmod, modprobe QL_MODULES - function not implemented What's this? |
Quote:
|
/dev/pts is no longer added by default, so you must select it (Device Drivers->FS->Pseudo FS)....
Unless you plan to never use a terminal. |
Compile Guide
Some excellent advice in the thread - got me up and running with the new kernel after I had a few problems first time round!
For my future reference I put together a quick guide from everyones advice and have posted it on my site - http://www.randomwire.com/articles.p...cle=kernel.php - hope it might be of help to someone else! :) |
Nice Compile Guide
I've read your compile guide for kernel 2.6.0, beyondzero.
That's a complete and quick guide to solve all those problems pointed out by a number of post in this forum. I would suggest to put the kernel source tree in a home directory and then: $su -c "ln -s /home/username/linux-2.6.0 /usr/src/linux" This kind of procedure is even in the kernel source tree README Quote:
Feel free to add other advantages as indeed there are more. |
Compile Guide update
Good advice, I've updated the guide with your suggestions
|
Instead of "make install"
Here's a little script I wrote and run everytime after I compile new kernel.
Note: You still need to edit lilo.conf and run lilo!!! Code:
#!/bin/sh Code:
cd /usr/src/linux Code:
image = /boot/vmlinuz-2.6.0 |
Re: Compile Guide
Quote:
http://www.linuxquestions.org/questi...hreadid=128144 The procedure you describe is basically the same procedure I've been following for years and I'm puzzled as to why I'm having problems with the "asm" directories and locating errno headers. :( Thanks... Peace... |
Re: Instead of "make install"
Quote:
Oh, and why don't you put something in the second line to get some credit? Code:
#!/bin/bash |
i cant still hget rid of the blank screen problem ???
can someone help |
Quote:
The main point is, boot the box and get X started. Once X is started login and open a shell window and edit your lilo.conf file and change the "vga =" line to "vga = ask". Save the file and reboot. Now, when lilo starts it will prompt you for the video mode to use for the boot process. :) Good luck! Peace... |
thank you it really helps, but still is there some way to get vga console working ? Has anyone got it or not
|
Quote:
If the "vga = ask" works for you, then you will at least NOT have a blank screen until you get your VGA frambuffer console issues worked out. What kind of graphics card do you have and how do you have the kernel configured for framebuffer console support? Peace... |
Quote:
|
dont bother with riva... just enable only vesa...
|
ok but still - i have one major problem - i can't get my tv card working. It Leadtek winfast TV 2000 XP deluxe it ran very good with 2.4.23, but now it doesnt work .
I use tvtime and it says " Cannot open capture device /dev/video0 " ??? |
maybe the problem is that there is no option with kernel compiling because a i used to need this option:
Multimedia Devices -> Video For Linux -> V4L Information in the proc filesystem (Y) But now there is no |
Dodgy:
For SVGA modes make sure you check this when configuring: Device Drivers -> Graphics Support -> Support for Framebuffer.... choose Vesa VGA graphics support Device Drivers -> Graphics Support -> Support for Framebuffer.... -> Console... check 'Video Mode Selection Support' and 'Framebuffer Console Support' If these options aren't visible, go to 'Code Maturity level Options' and check 'Prompt for development...' Recompile, it should work now... The keymap: You should be a keymap called "fi-latin-1", in the kernel configuration it is also known as: File Systems -> Native Language Support -> NLS ISO 8859-1 (Western European...) Also make sure that the Default NLS Option is set to iso8859-1 (Top of the Native Language Support page). Hope this helped! Merry X-mas! God Jul! |
Thank you Kadaver or should I say tack. I'm gonna try that out in a minute or two. Merry x-mas to you all and god jul to Kadaver...
Edit: Using VESA VGA did the trick for me. I had all the rest already. Finally I can also use | which I didnt had before. Sweet. I might even stick with Slack now since I like it quite a bit... |
On the nvidia front, it may be useful:
"These are ready-to-go Nvidia installers for kernel 2.6 made by Christian Zander (http://minion.de/nvidia.html). No need to patch anything. Simply run them as you would the 2.4 version Nvidia installers." go here: http://www.sh.nu/download/nvidia/ I just found the link above, and am about to try it out... tobyl |
I'm having some problems... Everything seemed to work out without a problem until a I booted into the new kernel. When it starts, its kinda of hard to explain, but the top half of my screen is a bunch of penguins although they are all cut in pieces diagonally and strewn across the screen and the 'text' is just a bunch of white gibberish. Looks odd, but it looks like its running through the basic startup stuff. Could it have anything to do with AGPGART? I didn't think that would cause problems until I installed the nVidia drivers (I couldn't find the AGPGART part in the kernel config, I did gconfig, although that shouldn't make a difference). Any ideas?
|
Ok... I have compiled the 2.6 kernel and so far so good... untill I ran into this gem... the ATI fglrx drivers would not work so I upgraded to the new 3.7 drivers and now I only get a black screen after I type startx... bummer.
|
All times are GMT -5. The time now is 06:48 PM. |