HowTo:PostInstall:kernel-2.6.28-gentoo-r4

De Luispa

Actualización a kernel-2.6.28-gentoo-r4

Según este blog se ha liberado la versión -r4 del kernel y corrige posibles problemas importantes, en el caso de que se apagase el equipo podría corromperse el file system EXT4.


Instalación

  • Modifico el fichero /etc/portage/package.keywords
# Kernel 2.6.28 con soporte EXT4
=sys-kernel/gentoo-sources-2.6.28-r4                  ~amd64
  • Actualizo el sistema. Detectará que se puede usar una versión más moderna (r4) y la instalará.
# emerge -DuvN world
  • El enlace simbólico en /usr/src está apuntando a -r1.
# ls -al 
total 144
drwxr-xr-x  6 root root  4096 Mar 27 07:41 .
drwxr-xr-x 17 root root  4096 Mar 22 19:07 ..
lrwxrwxrwx  1 root root    23 Feb  7 01:07 linux -> linux-2.6.28-gentoo-r1/
drwxr-xr-x 23 root root  4096 Feb  6 21:32 linux-2.6.27-gentoo-r8
drwxr-xr-x 23 root root  4096 Mar 22 12:18 linux-2.6.28-gentoo-r1
drwxr-xr-x 22 root root  4096 Mar 27 07:42 linux-2.6.28-gentoo-r4
  • Cambio el enlace simbólico a -r4
# cd /usr/src
# rm linux
rm: remove symbolic link `linux'? y
# ln -s linux-2.6.28-gentoo-r4/ linux
# ls -la
total 144
lrwxrwxrwx  1 root root    23 Mar 27 08:28 linux -> linux-2.6.28-gentoo-r4/
drwxr-xr-x 23 root root  4096 Feb  6 21:32 linux-2.6.27-gentoo-r8
drwxr-xr-x 23 root root  4096 Mar 22 12:18 linux-2.6.28-gentoo-r1
drwxr-xr-x 22 root root  4096 Mar 27 07:42 linux-2.6.28-gentoo-r4
  • Copio el fichero ".config" de mi último kernel (-r1) al nuevo directorio.
# cp linux-2.6.28-gentoo-r1/.config linux

Aviso: El siguiente paso es muy importante. Se trata de usar el comando "make oldconfig". Siempre que voy a compilar un nuevo kernel partiendo del fichero .config de un kernel anterior, utilizo este comando. En este ejemplo el "upgrade" es muy sencillo porque sólo se trata de una "revisión" más moderna que aplica nuevos parches, pero cuando el upgrade sea más significativo, este "make oldconfig" es muy importante. Realiza preguntas sólo sobre los parámetros nuevos del nuevo kernel.

  • Entro en el nuevo directorio y ejecuto la "config"uración del nuevo kernel.
# cd /usr/src/linux
# make oldconfig
 HOSTCC  scripts/basic/fixdep
 HOSTCC  scripts/basic/docproc
 HOSTCC  scripts/basic/hash
 HOSTCC  scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function 'conf_askvalue':
scripts/kconfig/conf.c:104: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function 'conf_choice':
scripts/kconfig/conf.c:306: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
 HOSTCC  scripts/kconfig/kxgettext.o
 SHIPPED scripts/kconfig/zconf.tab.c
 SHIPPED scripts/kconfig/lex.zconf.c
 SHIPPED scripts/kconfig/zconf.hash.c
 HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2486:
scripts/kconfig/confdata.c: In function 'conf_write':
scripts/kconfig/confdata.c:501: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c: In function 'conf_write_autoconf':
scripts/kconfig/confdata.c:739: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
scripts/kconfig/confdata.c:740: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
In file included from scripts/kconfig/zconf.tab.c:2487:
scripts/kconfig/expr.c: In function 'expr_print_file_helper':
scripts/kconfig/expr.c:1090: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
 HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -o arch/x86/Kconfig
#
# configuration written to .config


  • A partir de aquí sigo las mismas pautas generales de compilación del Kernel, aunque en este ejemplo me saltaría el make menuconfig dado que sólo quiero compilar, no necesito modificarlo. No olvidar que al copiar el kernel tengo que usar el nuevo "-r4".
# cp arch/x86_64/boot/bzImage /boot/bzImage-2.6.28-gentoo-r4 
# cp System.map /boot/System.map-2.6.28-gentoo-r4 




Enlaces y Créditos

[1] http://wiki.luispa.com/ Página principal de LuisPa.

Volver a la Indice post-instalación

--Luis 08:19 27 mar 2009 (CET)