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

Saturday, October 11, 2008

Ubuntu Hardy - How To Build Lustre and its own Kernel (english version)

First of All, we have to create our own kernel.
The last version of Lustre, supports only kernel 2.6.22.19, and that`s the one we will use here!

1) Install Some basic packages:
apt-get install quilt gcc kernel-package libncurses5-dev fakeroot bzip2

2) Download Lustre v1.6.5.1 [1] and 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) Unzip these files to /usr/src
bunzip2 (linux source)
tar -xf (linux source)
tar -xf (lustre source)

4) Create some symlinks for the sources (just to make it ease)
ln -s (linux source path)
ln -s (lustre source path)

5) in linux source's directory, create symlinks for /patche e /series from Lustre path.
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) Redirect SH (to use some new features)
rm -f /bin/sh
ln -s /bin/bash /bin/sh

7) Copy your actual boot configuration file to the linux source directory.
cp /boot/config-2.6.24-19-server ./.config

8) make-kpkg clean

9) make menuconfig (go to the LOAD option and save your new .config file)

10) Let`s rock... (after that, go take a coffee, take your dog for a walk...)
fakeroot make-kpkg -initrd -append-to-version=-(nome qualquer) kernel_image kernel_headers

11) The previous command will create 2 packages with .deb extension (headers and image). Execute the following command for each:
dpkg -i (file names, first headers and after the imagem)

12) Reboot your computer and let`s install LUSTRE (remember to keep the compiled files of your kernel)
cd /usr/src/lustre
./configure --with-linux=/usr/src/linux-2.6.22 (important to put the hole kernel path!!!)
make
make install

Voila!!! We are done ...
Now you just have to configure your cluster!

Have a Good job...
- Renato Leite