Another Kernel Guide 2.6.11
Here is my complete newbie guide to building a kernel in slackware taken from all the other compile guides I found on this site and cleaned them up:
*Either logon to root into your gui or use the su command because you need root access. 1. First go and download the kernel source at kernel.org and download what you wish mine was linux-2.6.11.5.tar.bz2.A good directory is /usr/src 2. Change into the directory by cd /usr/src. Now you need to extract the file so we will do tar -xjvf linux-2.6.11.5.tar.bz2. This will create a directory named linux-2.6.11.5/ 3. change directories into linux-2.6.11.5 now by doing cd linux-2.6.11.5/ and now we are ready for the fun part: NOTE: if you want to use your existing config file do this now or otherwise skip this. We need to copy the old config file in the /boot directory. So type cp /boot/config-ide-2.4.29 .config. (your config file name could differ) Here is a list of ways to pick the kernel options the way some do it which is inside the console and don't need a gui running so you can do it straight from the shell is: make menuconfig (uses the .config file) Here are a few other options which provide graphical way of doing it: make gconfig make xconfig (I like this option better) NOTE: Circles are modules and check marks are built into the kernel, you don't want stuff like your filesystem as a module or you will need to do an extra step which is not covered here. NOTE: lspci -v or cat /proc/pci cat /proc/cpuinfo will help identify your hardware. I can't really help you much more with this part but all I have to say is research your equipment and know what is in your computer, make sure you have some basic support for your kernel like: filesystem (ext2, ext3) usb support for keyboard and mouse (like OHCI) framebuffer support for graphics card After you are done with your selections save and close the window out or hit exit in menuconfig. make bzImage (builds the kernel) make make modules_install (installs the modules) NOTE: On a 1.6Ghz computer with 512mb of ram it took 10-15 minutes for make bzImage to finish, on slower computers this could take a while. UPDATE: ALTERNATIVE STEP (UNTESTED) http://www.linuxquestions.org/questi...13#post1552913 after following the above link run make install and it should do step 4 for you. Please tell me if this worked. NOTE: You can skip step 4 if you followed this. 4. Now we need to move our files into the /boot directory to be used. cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.6.11.5 cp System.map /boot/System.map-2.6.11.5 cp .config /boot/config-2.6.11.5 5. Now that we have all of this setup we need to tell lilo to boot our new kernel. open your favorite text editor and load /etc/lilo.conf. heres what it should look like (yours is going to be a bit different, but this should work on a default 10.1 install) image="/boot/vmlinuz-ide-2.4.29" root="/dev/hda2" label="Slack-2.4.29" read-only Copy this and paste it right below we are going add the new kernel and it should look like this: image="/boot/vmlinuz-ide-2.4.29" root="/dev/hda2" label="Slack-2.4.29" read-only image="/boot/vmlinuz-2.6.11.5" root="/dev/hda2" label="Slack-2.6.11.5" read-only Make sure image= points to your bzImage you compiled in the /boot directory Make sure root= points to your harddrive partition Make sure label= anything you want without spaces, this is how it will appear in the menu selection on lilo menu Add read-only at the end. 6. Save and exit lilo.conf and then run lilo and it shouldn't display any errors. 7. Reboot and hope for the best! Thank you everybody here for helping me out with this! |
Very nice review.
Might i suggest that you don't have to 'make modules' (afaik?) you can do it safely with make make modules_install make install EDIT: ======== Also, to save on point 5 and 6, you could edit the Makefile pico /usr/src/linux/Makefile search for the line '# export INSTALL_PATH=/boot' ctrl + w type 'boot' and uncomment the line get rid of the # so it looks like export INSTALL_PATH=/boot save and exit ctrl + x + enter So after you compile, it will automatically copy everything to /boot, and update your boot loader (lilo), and all you have to do is reboot. This will save you the hassle especially everytime you recompile the kernel to enable/disable something. |
hmmm....we had another guide a few weeks ago , buy anyway....
------------------ 3. Now we want to create a symbolic link to this to make the job easier. Type ln -s linux-2.6.11.5/ linux (you might have to use -sf to force it to overwrite your existing link which was pointing to 2.4.29 on slack 10.1) ------------------ there's no reason to do that, just skip it. i wonder why everybody is parrotting about that link. it's never used. and not advicing that link will prevent us for programs that will use it. ( newbie of today = programmer of tomorrow ) ----------- 6. Now we need to redo our symbolic links in /boot directory so you can Type cd /boot and do this and again you might have to do ln -sf to force/overwrite the old. ln -s System.map-2.6.11.5 System.map ------------ that's also not needed. if you name the kernel : vmlinuz-2.6.11.5 you name the map : System.map-2.6.11.5 it's just better to not talk about symlinks, they are just confusing. i think compiling your own kernel is one of the basics of linux so a guide is ok. egag |
this is somewhat of the guide I made for myself and has worked so far, I've tryed before using other guides but failed so I took everything I understood from the others and put them together. I guess symbolic links are kinda pointless but every other guide seemed to use it so I built mine up like that also and learned that way.
|
well...i understand that, but they are redundant steps.
people might think that they are important and give a lot of attention/time to those points when they are troubleshooting, and that's just a waste of time ( as making the links is. ) egag |
true, true, thats why I posted here so you guys can pick it apart to make it better :D
I've been messing with slackware maybe 3 months at the most off and on and have compiled my own kernel but sure i've missed some stuff, because I still don't understand it all. Long live linux. |
then you made a good start eh...
but with linux you can do things ( almost ) allways in 2 or more ways. ( you can also compile the kernel in your home- dir. and some people edit the " makefile " to install directly into the /boot dir. ) i think when you found a way that works, you want to stick to that. and that's ok :) ( but don't mention the " links " ) egag |
I'll rewrite it later thanks for the tips
|
Ok, firstly this looks pretty good, one issue I am going to point out.
reiserjfs format drives and jfs.s kernels IPv6 configuration Document found on Google Search for this (spcifications in PDF format) SCSI Configurations if the rieserjfs format and jfs.s is being used, especially if the drive is IDE, can the scsi be disabled and not affect the kernel's performance or the drive format? so far I have figured out, display, sound, ports, mouse, other tty devices. The Drive format and kernel information and IPv6 is a bit on the daunting side. This is where I am going to neen some rela help in configuring this. Networking too, I have some idea here but this Linux thing is somewhat still new. Especially when it comes to the kernel settings. I won't baffle or bs you, I am just a lot afraid of making this jump to 2.6.11.5 yet because these configurations are VERY important to make it work first try. |
The 2.6.x kernels need the initrd.img file to boot unlike the 2.4.x kernels. You need to do a mkinitrd....I'm still figuring kernel building out myself, but that's what I've read on the net and the man page:
man mkinitrd |
Quote:
|
Quote:
just make sure that all functions needed at boot time, are compiled in the kernel and not as module. some examples : -ide support if you've got ide -disks, and scsi for scsi; -framebuffer-support for the graph. card you use; ( you'll find this under "graphics support" ) -the file-system you use for the root directory. - basic mouse & keyboard support ( i guess a lot more , but with these a lot of people make mistakes ) such things i allways choose to be part of the bzImage. and also some examples of things i choose as modules : -agpgart; drm-manager ( these are under " character devices " ) - all alsa parts ( some time ago they *had* to be modular, but i don't know if that's still true ) -drivers for network, modem etc -all network filtering parts. -tv-card drivers etc....... and if you follow the howto above , ( editing lilo.conf and running lilo allways ), you'll have your old kernel to boot incase the new one is not yet correct. you can just trial and error until you have a config that's ok for your hw. so, when you have some time, just try one ..... egag |
Quote:
|
Quote:
|
Quote:
From what you posted if you put vmlinuz-xxxxxxx then it would look for System.map-xxxxxxx. Or is that completely wrong? |
All times are GMT -5. The time now is 04:14 AM. |