Sunday, October 12, 2008

Ubuntu Hardy - Como construir o Kernel e Instalar o Lustre (versão em português)

Sabendo que a ultima versão do Lustre suporta apenas a versão de kernel 2.6.22.19, iremos utilizar essa mesma para nossa instalação.

Qualquer comentário ou dificuldade, é só postar...

1) apt-get install quilt gcc kernel-package libncurses5-dev fakeroot bzip2

2) Download do Lustre v1.6.5.1 [1] e Linux Kernel v2.6.22.19 [2]
[1] wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.19.tar.bz2
[2] wget http://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/VerifyItem-Start/lustre-1.6.5.1.tar.gz?BundledLineItemUUID=SPxIBe.oR9wAAAEcxT42deOP&OrderID=MlNIBe.o4.4AAAEclj42deOP&ProductID=rSBIBe.odnoAAAEa0ZoGct.T&FileName=/lustre-1.6.5.1.tar.gz

3) Descompacte os arquivos em /usr/src
bunzip2 (linux source)
tar -xf (linux source)
tar -xf (lustre source)

4) Crie atalhos para os sources (pra facilitar)
ln -s (linux source path)
ln -s (lustre source path)

5) no diretório do source do linux, crie atalhos para os /patche e /series do lustre
ln -s /usr/src/lustre/kernel_patches/series/2.6.22-vanille.series series
ln -s /usr/src/lustre/kernel_patches/patches patches
quilt -av push

6) Redirecione o sh
rm -f /bin/sh
ln -s /bin/bash /bin/sh

7) Copie o arquivo de configuração atual do kernel para o que será construido
cp /boot/config-2.6.24-19-server ./.config (vc deve estar no diretório do source do linux)

8) make-kpkg clean

9) make menuconfig (dê um load e salve)

10) Agora, só nos resta esperar!
fakeroot make-kpkg -initrd -append-to-version=-(nome qualquer) kernel_image kernel_headers

11) Isso irá criar 2 arquivos .deb. Executar neles:
dpkg -i (nome dos arquivos, sendo primeiro os headers e depois a imagem)

12) reiniciar o computador e instalar o lustre (lembrar de deixar os arquivos originais)
cd /usr/src/lustre-1.6.4.2
./configure --with-linux=/usr/src/linux-2.6.22 (importante colocar o caminho completo!!!)
make
make install

2 comments:

André Barcelos Silva said...

Cara, parabéns pelo seu blog, bastante técnico, muito interessante mesmo. Aprovado, continue assim que o sucesso é certo.

Olha, quanto ao seu convite para desenvolvimento de aplicativos móveis, muito me interessa. Eu poderia saber mais a respeito do que pretenderia nesse tipo de projeto?

barcelos.ds@gmail.com
http://andrebarcelos.zip.net

Douglas Macedo said...

Olá amigo!

Obtive um erro na instalação da solução. Quando vou para dar o "make" no lustre, vem o erro:

Applying patch ext3-mmp-2.6.22-vanilla.patch
Applying patch ext3-fiemap-2.6.22-vanilla.patch
Applying patch ext3-statfs-2.6.22.patch
Applying patch ext3-lookup-dotdot-2.6.9.patch
Applying patch ext3-export-journal-api.patch
Applying patch ext3-max-dir-size.patch
Applying patch ext3-print-inum-in-htree-warning.patch
Applying patch ext3-xattr-no-update-ctime-2.6.22-vanilla.patch
Applying patch ext3-check-bad-inode.patch
Applying patch ext3-get-raid-stripe-from-sb.patch
Applying patch ext3-big-endian-check-2.6.22-vanilla.patch
1 out of 5 hunks FAILED
Patch ext3-big-endian-check-2.6.22-vanilla.patch does not apply (enforce with -f)
make[5]: *** [sources] Error 1
make[5]: Leaving directory `/usr/src/modules/lustre/ldiskfs/ldiskfs'
make[4]: *** [all-sources] Error 2
make[4]: Leaving directory `/usr/src/modules/lustre/ldiskfs'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/modules/lustre/ldiskfs'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/modules/lustre/ldiskfs'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/modules/lustre'
make: *** [all] Error 2

Tem alguma sugestão?

Um abraço!