Difference between revisions of "RHEL5 Kernel HOWTO"

From Funtoo Linux
Jump to: navigation, search
(I put this in the howto category.)
(pointed to the renamed category)
Line 53: Line 53:
 
7. Reboot your computer and enjoy
 
7. Reboot your computer and enjoy
 
reboot
 
reboot
[[Category:Howto]]
+
[[Category:HOWTO]]

Revision as of 17:39, 6 November 2010

1. Downgrade udev to a version compatible with kernels previous than 2.6.27: echo ">=sys-fs/udev-147" >> /etc/portage/package.mask emerge -u udev

2. Mask any openvz-sources version equal or newer than 2.6.27: echo ">=sys-kernel/openvz-sources-2.6.27" >> /etc/portage/package.mask

3. openvz-sources-2.6.18* needs gcc-4.1*, so you must install it prior build your future downgraded kernel. If you have newer versions than gcc-4.1* then you must install this one. Also check your CFLAGS if you are using gcc-4.3* or later *AND* your make.conf CFLAGS has -march=native, due previous GCC versions doesn't allow it. Check [1] and put a correct -march directive in your CFLAGS. You also need to change CXXFLAGS in the same way, ie: CFLAGS="-march=amd64" CXXFLAGS="-march=amd64" emerge =sys-devel/gcc-4.1.2

That may take a while, take a cup of your favourite beverage and wait until finish.

[1] http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options

4. Switch to gcc-4.1* on your system: localhost ~ # gcc-config -l

[1] x86_64-pc-linux-gnu-4.1.2
[2] x86_64-pc-linux-gnu-4.4.3 *

localhost ~ # gcc-config 1

  • Switching native-compiler to x86_64-pc-linux-gnu-4.1.2...

>>> Regenerating /etc/ld.so.cache... [ok]

  • If you intend to use the gcc from the new profile in an already
  • running shell, please remember to do:
  • # source /etc/profile

localhost ~ # source /etc/profile localhost ~ # gcc --version gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.3) gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.3) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

localhost ~ #

5. Rebuild your sources: cd /usr/src/linux make menuconfig [do your work] make cp arch/x86/boot/bzImage /boot/linux-2.6.18-openvz-028.068.9

6. Update /etc/boot.conf to point to your new kernel, ie: vi /etc/boot.conf [inside /etc/boot.conf now] "Funtoo Linux" {

       kernel linux-2.6.18-openvz-028.068.9
       params root=/dev/sda3

}

7. Reboot your computer and enjoy reboot

Personal tools
Namespaces

Variants
Actions
Categories
Toolbox
Stuff