Recompilando o Kernel
Um simples artigo tentando explicar como recompilar o kernel a partir de seus fontes. Usa LILO como gerenciador de boot.
Parte 3: Chegou a hora do Lilo
Agora vamos editar o lilo:
# vim /etc/lilo.conf (use seu editor de texto favorito)
Salve e rode um:
# lilo
Reinicie o computador.
** Tantan... Fácil? não?
E0F
# vim /etc/lilo.conf (use seu editor de texto favorito)
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# boot = /dev/sda
# message = /boot/boot_message.txt
# prompt
timeout = 30
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Linux
read-only
image = /boot/meu-novo-kernel
root = /dev/sda1
label = Linux2
read-only
# Linux bootable partition config ends
# generated by 'liloconfig'
#
# Start LILO global section
# boot = /dev/sda
# message = /boot/boot_message.txt
# prompt
timeout = 30
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Linux
read-only
image = /boot/meu-novo-kernel
root = /dev/sda1
label = Linux2
read-only
# Linux bootable partition config ends
Salve e rode um:
# lilo
Reinicie o computador.
** Tantan... Fácil? não?
E0F
Só acrescento algumas informações:
- Desde o kernel 2.6.11 (acho) o comando xconfig não abre mais um programa que usa a innterface Tk, mas agora usa Qt, o que exige que o usuário tenha esta lib instalada no sistema.
- Há outro configurador gráfico, que usa interface gtk+, que pode ser chamado pelo comando make gconfig
- Não é obrigatório renomear a pasta antiga dos módulos do kernel. Basta só compilar o novo kernel com um "nome" diferente. Para isso, basta modificar o arquivo Makefile. Fica legal além de "bonitinho" ;-)