Buscador

miércoles, 22 de diciembre de 2010

Compilación de una nueva versión de Kernel

  1. Vamos a: http://www.kernel.org/pub/Linux/kernel
  2. Nos descargamos el paquete: linux-2.6.20.21.tar. (en nuestro caso)
  3. Lo descargamos sobre  la ruta /usr/src o /usr/src/kernels en red hat.
  4. Se pueden dar dos casos:
  • - En suse:
  1. bunzip2 linux-2.6.20.21.tar.bz
  2. tar -xvf linux-2.6.20.21.tar
  3. ln -s linux-2.6.20.21 linux
  4. ls -la  -> lrwxrwxrwx 1 root root 15 Nov 11 13:01 linux -> linux-2.6.20.21 
  5.              drwxrwxr-x 19 root root 792 Nov 11 13:08 linux-2.6.20.2
  6. cd linux

  • - En red hat:

  1. cd kernels
  2. bunzip2 linux-2.6.20.21.tar.bz
  3. tar -xvf linux-2.6.20.21.tar
  4. mv linux-2.6.20.21 2.6.20.21-default
  5. cd 2.6.20.21-default

- Realizamos los siguientes pasos :
  1. make mrproper
  2. cp /boot/config- ./.config 
  3. make menuconfig
  4. (Dentro se despliega un grafico elegimos Load an Alternate.. -> .config -> General setup -> -default y salimos guardando cambios).

  • Make rpm (nos crea el rpm en: /usr/src/packages/RPMs/ o /usr/src/redhat/RPMs/). 
  • rpm –ihv kernel-xxx.rpm
  • mkinitrd o mkinitrd /boot/initrd-2.6.20.21.img 2.6.20.21(red hat).(Esto nos crea una entrada en el /boot para el nuevo kernel (vmlinuz-2.6.20.21-default, initrd-2.6.20.21-default)).
  • Editando /etc/sysconfig/selinux y cambiando SELINUX=permissive por SELINUX=disabled, verificamos que no lo tenemos activo.

  • Finalmente, tendremos que cambiar el orden de arranque:

Cat /boot/grub/menu.lst(suse)

default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-53.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-53.el5PAE ro root=/dev/rootvg/rootlv rhgb quiet
initrd /initrd-2.6.18-53.el5PAE.img

title Red Hat Enterprise Linux Server (2.6.20-21.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.20.21-default ro root=/dev/rootvg/rootlv rhgb quiet
initrd /initrd-2.6.20.21.img

cat / boot/grub/menú.lst

color white/blue black/light-gray
default 1
timeout 8
gfxmenu (hd0,1)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE Linux (2.6.5-7.244-smp) with MPP support
kernel (hd0,1)/boot/vmlinuz root=/dev/sda2 vga=0x317 selinux=0 splash=silent console=tty0 resume=/dev/sda1 elevator=cfq showopts
initrd (hd0,1)/boot/mpp-2.6.5-7.244-smp.img
title Linux
kernel (hd0,1)/boot/vmlinuz root=/dev/sda2 vga=0x317 selinux=0 splash=silent resume=/dev/sda1 elevator=cfq showopts
initrd (hd0,1)/boot/initrd
title Linux-new
kernel (hd0,1)/boot/vmlinuz-2.6.20.21-default root=/dev/sda2 vga=0x317 selinux=0 splash=silent resume=/dev/sda1 elevator=cfq showopts
initrd (hd0,1)/boot/initrd-2.6.20.21-default


###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
kernel (hd0,1)/boot/vmlinuz root=/dev/sda2 showopts ide=nodma apm=off acpi=off vga=normal noresume selinux=0 barrier=off iommu=noforce 3
initrd (hd0,1)/boot/initrd


Adjunto informacion del entorno gráfico.

No hay comentarios:

Publicar un comentario