Quote:
Originally posted by meinzorn
I've done a lot of reading and such with kernel compiling and I've made a few attempts at doing so and I've failed every one of them.. I think one time I actually got the system to boot but I definatly did something wrong because it was really sketchy.
anyways, the main thing that I want to ask is does anyone know of a place where I can find a good step by step guide to compiling a kernel and making it work properly. I'm using Slackware Linux 10. Any help would be greatly appreciated.
just for background information, I wouldn't be messing with this, but I want to get going with the 2.6 kernel because I want to use Dropline Gnome, i've heard some good things about it and want to give it a try, but it claims that I need to have the 2.6 kernel for it to work.
|
Believe it or not the README file that comes with the source is quite good.
However, if that will not suffice for you, check the slackware distro forum, there are a few.
That said,
I'll assume you are compiling 2.6.9 for slackware 10?
If so try this.
Assuming you have a clean install of slack 10
extract the source file to a path in your home/username path.
cd to it and issue the following BOLD commands
cp /usr/src/linux/.config ./.config
copy old config to current working path
make oldconfig
this will get your current config file and adapt it to the new kernel, it helps if you are not 100% up to speed on the various hardware/software features the kernel can support.
make menuconfig
look through and only change things you are 100% positive on. IE you may know you want ext2, ext3, ntfs and vfat file system support only, so turn them on and turn the others off, but be careful, if you are not sure whether you need an option or not, leave it as it is until you become more familiar with linux. You can always compile another kernel witha new config.
see that wasn't so hard right?
Now to finnish it up.
make bzImage
you can actually use any name in place of bzImage you like, even unclefucker if you're some rabid southpark fan. The common names are bzImage, zImage, and vmlinuz, but a kernel by any other name, will run the same. You just need to remember to tell the boot loader which kernel name to boot is all.
su
you need root access to finnish this up. If you are logged in as root you are a brave [or foolish] man. You do not need to su if you are already root, consequently you will not need to exit the su environmetn at the end.
make modules_install install
making the modules and installing whats needed, now we have to copy the image to the boot partition and configure lilo. But furst we need to rename the old kernel just in case. I will assume
you have a default name of vmlinuz, do a ls of the /boot partition and try to determine your kernel's name if its not vmlinuz.
mv /boot/vmlinux /boot/vmlinux.old
cp ./linux/arch/i386/boot/bzImage /boot/vmlinuz
Note if you changed directores from where you extracted the tar source to, then change back BEFORE you try to copy the compiled new kernel to the /boot partition.
vim /etc/lilo.conf
Edit your lilo.conf file you should just need to copy the exact entry for linux, and then change the title to linux.old and the image= to vmlinuz.old.
Then exit the editor, also note you don't have to use vim, I prefer jed myself, you can use any text editor you like
lilo
YOU MUST run lilo after editing lilo.conf or it will not use the new info and you will fail at this task.
reboot
if you have other stuff to do, don't issue this command, issue exit to get out of su instead if you went into su, otherwise, carry on. When you reboot you should see a new option on lilo, select linux not linux.old and watch the sparks fly.
You will very likley see some errors appear, especially if you moved some thigns from being modules [like the NIC card] to being embedded in the kernel becasue your rc.d config may still be trying to load the kernel. You can safely ignore them for the moment. If you can log in, and everything seems to actually run, you suceeded. Gather a list of any concerning errors you can not undestand and fix yourself and post a help request in the slackware distro forum.
My only errors were where rc.local was loading a module and running dhcpcd, from when they were modules, in the new kernel my NIC was driver embedded and DHCP was started elsewhere for it. Removing 2 lines from the rc.local config and I was all set.
Good luck.