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

    • When will the Photos app be updated to remember the window size and position when reopened? They addressed this issue in a 2024 version of the app (though I can't recall the build number). Unfortunately, after that specific version, the problem persists! Please prioritise this fix in your K2 schedule. Additionally, the Snipping Tool has lost the ability to capture the Windows Taskbar starting from the 2024 version!
    • Same, never saw it on Android or iOS. Guess only some people got it *shrugs*
    • Anthropic pulls Fable 5 and Mythos 5 after US export control order by Pradeep Viswanathan In April this year, Anthropic launched the Claude Mythos Preview frontier model with state-of-the-art cyber and coding capabilities for a select set of companies around the world. After preparing appropriate guardrails, early this week, Anthropic launched Claude Fable 5 and Mythos 5, its most capable AI models. Claude Fable 5 is for general users and comes with strict safeguards, while Mythos 5 is designed with fewer safeguards for cybersecurity and biology use cases. Today, Anthropic abruptly suspended access to its Fable 5 and Mythos 5 AI models for all customers after receiving an export control directive from the US government. The company received the directive from the government today at 5:21 p.m. ET, and the received letter did not provide any details regarding the national security concern. Anthropic understands that the government became aware of a method to bypass, or “jailbreak,” Fable 5, which might be the reason behind the directive. The order was issued under national security authorities and requires the company to suspend all access to Fable 5 and Mythos 5 by any foreign national, whether they are inside or outside the United States. The restriction also applies to foreign national employees working at Anthropic. As a result, the company has disabled both models for all customers to ensure compliance. Access to previous Anthropic models like Opus and Sonnet is not affected by this government order. The company highlighted that it had developed strong safeguards to reduce the possibility that Fable is misused for tasks related to cybersecurity. In fact, many developers are complaining that the safeguards are going overboard. Additionally, the company worked with the US government, the UK AISI, multiple private third-party organizations, and internal teams to red-team Fable’s safeguards for thousands of hours. Finally, Anthropic noted that no testers have yet been able to find a universal jailbreak on Fable 5. As expected, Anthropic disagrees that a narrow potential jailbreak should lead to the recall of a commercial model used by hundreds of millions of people. It warned that applying this standard across the AI industry could effectively halt new frontier model deployments. Anthropic concluded by mentioning that it is working to restore access to Fable 5 and Mythos 5 as soon as possible and plans to share more details within the next 24 hours.
    • Brave Browser 1.91.172 is out.
  • Recent Achievements

    • Contributor
      MarkHughes4096 went up a rank
      Contributor
    • Dedicated
      jordanspringer earned a badge
      Dedicated
    • Rookie
      Rimplesnort went up a rank
      Rookie
    • One Year In
      Markus94287 earned a badge
      One Year In
    • One Month Later
      Markus94287 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      503
    2. 2
      +Edouard
      176
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      92
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!