next up previous
Next: About this document Up: Passos. Previous: El rovell de l'ou

Recompilar el kernel

El punt 6.2 de Stempin origina una feinada de por:

Cal recompilar el kernel.

Aqui cal seguir

http://www.fagotten.org/daniele/acer-tm630/

per baixar-se el font del kernel.

I pels passos concrets, he seguit

http://www.faqs.org/docs/Linux-HOWTO/Kernel-HOWTO.html

  1. Anar a /usr/src i fer rm linux (si ja hi era)
  2. Anar a /usr/local/src/kernel-source-2.6.8 i posar a lloc segur .config, p.ex. cp .config ../araconfig
  3. Anar a /usr/local/src/kernel-source-2.6.8 i fer rm -r * de tot
  4. pujar .. i fer rmdir kernel-source-2.6.8
  5. tar xvf kernel-source-2.6.8.tar
  6. Anar a /usr/src i fer ln -s /usr/local/src/kernel-source-2.6.8 linux
  7. cd linux
  8. Recuperar cp ../araconfig .config
  9. make clean; make mrproper
  10. make menuconfig. Aqui ve al gran ``jaleo''. Cal anar a Device Drivers -> Networking support -> Networking options -> Aqui poso M a pcket sockets, Netlink device emulation i Unix domain sockets * a TCPIP networking * Network packet filtering -> IP Netfilter configuration i aqui dintre tot M ( o * on no es pugui M)

    * a network device support.

  11. editar Makefile, a la tercera linia on diu EXTRAVERSIONS posar-hi ,p.ex., 24nov2004
  12. O be nohup make bzImage &
    o be make bzImage
    Això triga de 20 a 40 minuts.
  13. O be

    nohup make modules 1> modules.out 2> modules.err  &
    O be make modules
  14. make modules_install
  15. cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage.meuker.24nov2004
  16. cp /usr/src/linux/.config /boot/config-2.6.8-24nov2004
  17. cp /usr/src/linux/System.map /boot/System.map-24nov2004
  18. Amb emacs edito /etc/lilo.conf i afegeixo per la zona on hi han els semblants

    image=/boot/bzImage.meuker.24nov2004
    label=prova24nov
    read-only

  19. lilo -t
  20. lilo
  21. lilo -q
  22. TATXAN !!!! A rebotar.
  23. Després de rebotar anem a veure que hi ha: lsmod.
  24. Com que em surten molts que no vull i fan MOLTA nosa:
    rmmod ipt_LOG
    rmmod iptable_mangle
    rmmod iptable_filter
    rmmod iptable_nat
    rmmod ip_conntrack
    rmmod ip_tables

    i després

    modprobe ip_tables
    modprobe iptable_filter

http://bulma.net/body.phtml?nIdNoticia=1140

Activar el reenviament de paquets:

echo 1 > /proc/sys/net/ipv4/ip_forward

cat /proc/sys/net/ipv4/ip_forward

1

Imposem les regles del iptables:

iptables --flush
iptables --table nat --flush

iptables -P  INPUT ACCEPT 
iptables -P  FORWARD ACCEPT 
iptables -P   OUTPUT ACCEPT 

iptables --table nat --append POSTROUTING  --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface usb0 -j  ACCEPT



iptables -L 

iptables -L -n --table nat

Resolució de les adreces IP

 echo "nameserver  147.83.29.75" >> /etc/resolv.conf
 echo "nameserver  147.83.2.3" >> /etc/resolv.conf

Han ajudat molt Jordi Campos, Ramon Navarro, Josep Vilaplana i Toni Soto.

Lluís Pérez Vidal,
Despatx 8-61 planta 8, ETSEIB
telèfon: 93 401 6670
e-mail: lpv@lsi.upc.es
1a. versió : 14-Maig-2004


next up previous
Next: About this document Up: Passos. Previous: El rovell de l'ou

Lluis Perez Vidal
Wed Jan 12 08:38:55 MET 2005