Recommended Posts

How-To: Compile a 2.6.9 Kernel

Also posted on http://www.eth0.us

December 22nd:

Updated up2date so it would not overwrite module utilities preventing the kernel from booting

This guide is to be used completely at your own risk! It was designed with an ev1 dual xeon hardware configuration in mind but will also work on some of the P4 models. I am not going to try and support every possible hardware combination. I started this because I wanted a kernel for my own use but decided to share my work. Upgrading a kernel from rpm is easy and doing it as i have below is pretty easy as I have already done much of the hard configuration work. I was able to use the following guide on multiple servers with no problem and I know that it works. The key that makes this much easier is that you are using the .config file I have already created which contains all of the variables and configuration options. If you would like to view the .config file and offer any input please feel free! I have a little experience with compiling kernels but I am sure there are a few more things here and there I can remove.

I do plan on adding grsecurity when it becomes available for 2.6.9 and I get time.

Now that is done the guide is below, good luck!

First compile module-init-tools which is needed to compile a 2.6.* kernel on a system currently running a 2.4.* kernel. Do note that this may cause rkhunter to bring up false positives.

-----command-----

cd /usr/local/src/

wget http://www.kernel.org/pub/linux/ker...ools-3.1.tar.gz

tar -zxf module-init-tools-3.1.tar.gz

cd module-init-tools-3.1

./configure --prefix=""

make moveold

make install

./generate-modprobe.conf /etc/modprobe.conf

cd ..

-----command-----

-----command-----

cd /usr/local/src/

wget http://www.kernel.org/pub/linux/ker...ux-2.6.9.tar.gz

tar -zxf linux-2.6.9.tar.gz

cd linux-2.6.9

wget http://eth0.us/.config

-----command-----

At this stage you can configure the kernel how you like it. By running "make menuconfig" you will be presented by a huge menu of options that you can try to comile into your kernel. After you do your changes click exit and continue. Not making changes is fine as I have already removed a lot of the extra stuff in the kernel. If you change the configuration after you have compiled it you will need to run the below rm commands to delete the kernel files you have created. They will be regenerated next time you run make. Also know that if you have trouble with the kernel booting you can just delete the .config and redownload mine.

-----command-----

rm -rf /boot/config-2.6.9-eth00

rm -rf /boot/vmlinuz-2.6.9-eth00

rm -rf /boot/System.map-2.6.9-eth00

rm -rf /boot/initrd-2.6.9-eth00.img 2.6.9-eth00

-----command-----

Now to actually compile the kernel

-----command-----

make

make modules_install

-----command-----

Make sure there are NO errors after this! If you do get errors the below is not going to work. The next step is going to copy the kernel into your /boot directory so you are able to use it.

-----command-----

cp .config /boot/config-2.6.9-eth00

cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.9-eth00

cp System.map /boot/System.map-2.6.9-eth00

mkinitrd /boot/initrd-2.6.9-eth00.img 2.6.9-eth00

-----command-----

All of he ev1 servers I have worked on have lilo installed so below is what you need to add to the file to allow you to boot. The append elavator deadline should help with the IO of your server. If after recompiling you have trouble with the IO remove the line and reboot to see if that is what is causing the trouble.

image=/boot/vmlinuz-2.6.9-eth00

label=2.6.9-eth00

append="root=LABEL=/ elevator=deadline"

read-only

initrd=/boot/initrd-2.6.9-eth00.img

Make sure when you run this lilo command that you can see no errors. If there are something is configured wrong and the server is not going to boot.

-----command-----

lilo -v -v

-----command-----

Make SURE there are no errors! Now have your server reboot into the new kernel.

-----command-----

lilo -R 2.6.9-eth00

-----command-----

Ok you are ready to reboot and test it out. Go ahead and shutdown via "shutdown -r now". If it does not come up after 10 minutes you are going to have to get the server rebooted. Since we used the -R it will boot back to the old kernel last time. If it fails you can check the logs to see if anything is shown but many times nothing does and the only way to do it is have a tech look at the screen or use a kvm/drac. If it does work for you change the default= in the lilo.conf to your new kernel.

Now up2date needs to be updated so that redhat will not overwrite the module-init which will cause the kernel to not load. Edit the up2date config file

-----command-----

pico -w /etc/sysconfig/rhn/up2date

-----command-----

Next look for the skiplist, my old skiplist looked like this:

pkgSkipList=kernel*;httpd*;perl;mysql*;php*;mod_ss

l*;

Add the following entry::

modutils*

It should look something like this:

pkgSkipList=kernel*;httpd*;perl;mysql*;php*;mod_ss

l*;modutils*;

Save and you are all done.

Link to comment
https://www.neowin.net/forum/topic/272034-compile-kernel-269/
Share on other sites

Just as an FYI the guide you posted above is old. I have a 2.6.10 +grsec + a kernel patch listed on my website right now. I would highly suggest that you use the new kernel over the 2.6.9 kernel.

585301072[/snapback]

Whats the link and i will post it..

  • 3 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Oh, it's happening on more than one dialog? This is the dialog that I'm unable to interact with.
    • WSCC - Windows System Control Center 10.0.3.8 by Razvan Serea Windows System Control Center is a free, portable program that allows you to install, update, execute and organize the utilities from various system utility suites. WSCC can install and update the supported utilities automatically. Alternatively, WSCC can use the http protocol to download and run the programs. WSCC is portable, installation is not required. Extract the content of the downloaded zip archive to any directory on your computer. Free for personal use. The setup packages and updates are downloaded directly from their author's website! This edition of WSCC supports the following utility suites: Windows Sysinternals Suite (including support for "Sysinternals Live" service) NirSoft Utilities Mitec and more... WSCC - Windows System Control Center 10.0.3.8 changelog: [NEW] update progress is now visible on the Windows taskbar [FIXED] fixed an issue with the Update dialog [FIXED] minor fixes Download: WSCC (64-bit) | 5.4 MB (Free for personal use) Download: WSCC (32-bit) | 6.3 MB View: WSCC Homepage | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • The level of stupidity at Google and Microsoft is beyond belief. All they are doing by killing this is forcing people to jump over to Firefox and ditch them all together, therefore giving Firefox the market boost it needs to finally crush them all in the end.
    • HWMonitor 1.64 by Razvan Serea HWMonitor is a hardware monitoring program that reads PC systems main health sensors : voltages, temperatures, fans speed. The program handles the most common sensor chips, like ITE® IT87 series, most Winbond® ICs, and others. In addition, it can read modern CPUs on-die core thermal sensors, as well has hard drives temperature via S.M.A.R.T, and video card GPU temperature. Special hardware monitors such as abit® uGuru and Gigabyte® ODIN™ power supplies serie are supported too. HWMonitor 1.64 changelog: Intel Arc G3 & G3 Extreme (Panther Lake). Intel Core Ultra 5 250KF Plus (Arrow Lake Refresh). AMD Ryzen 7 7700X3D (Raphael). AMD Ryzen AI Max+ 495, 492, 488 (Gorgon Halo). AMD Ryzen AI Max 490, 485 (Gorgon Halo). AMD Ryzen AI Max PRO 495, 490, 485, 480 (Gorgon Halo). AMD Ryzen 9 9950X3D2 (Granite Ridge). AMD Ryzen 9 PRO 9965X3D, PRO 9945 (Granite Ridge). AMD Ryzen 7 PRO 9755, PRO 9745 (Granite Ridge). AMD Ryzen 5 PRO 9645 (Granite Ridge). AMD Ryzen AI 7/PRO 450G/GE (Gorgon Point 2). AMD Ryzen AI 5/PRO 440G/GE (Gorgon Point 2). AMD Ryzen AI 5/PRO 435G/GE (Gorgon Point 3). Support of HUDIMM and HSODIMM memory modules. New themes. New real-time graphs. Download: HWMonitor 1.64 | 3.4 MB (Freeware) Download: Portable HWMonitor 1.64 | 2.7 MB View: HWMonitor Homepage | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I have had a request since 2017 and so have many others that requested too and nothing has been done about it except its on our list to do.
  • Recent Achievements

    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Week One Done
      Timaximus earned a badge
      Week One Done
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      497
    2. 2
      PsYcHoKiLLa
      172
    3. 3
      +Edouard
      163
    4. 4
      Steven P.
      86
    5. 5
      ATLien_0
      77
  • Tell a friend

    Love Neowin? Tell a friend!