FAI How to build a i386 and x86 64 compatible FAI server on Debian Etch x86 64: Difference between revisions
Jump to navigation
Jump to search
(FAI Cross-Architecture) |
No edit summary |
||
Line 1: | Line 1: | ||
<h3> FAI 3.1.8 Etch cross architecture NFSROOT build </h3> | |||
I was installing an installserver for my company and looking for a way to build and i386 NFSROOT on a amd64 Etch. | |||
Thought FAI 3.1.8 was not really designed for cross architecture, it is possible to use it this way. | |||
Here is the <i>workaround</i>. | |||
<ul> | |||
<li> Step 1 : Create arch specifics fais configuration direcories | |||
<pre> | <pre> | ||
for dir in /etc/fai-i386 /etc/fai-amd64 ; | for dir in /etc/fai-i386 /etc/fai-amd64 ; | ||
Line 19: | Line 18: | ||
done | done | ||
</pre> | </pre> | ||
</li> | |||
<li> Step 2 : Build a local <code>apt_arch.conf</code> file inside <code>/etc/fai-i386</code> or <code>/etc/fai-amd64</code> | |||
<ul> | |||
<li> Simply add thoses lines to <code>/etc/fai-i386/apt_arch.conf</code> ( for <code>/etc/fai-amd64/apt_arch.conf</code>, replace i386 by amd64) | |||
<pre> | <pre> | ||
APT { | APT { | ||
Line 28: | Line 28: | ||
} | } | ||
</pre> | </pre> | ||
</li> | |||
<li> You can create automagicaly those file running the following script | |||
<pre> | <pre> | ||
for arch in i386 amd64 ; do | for arch in i386 amd64 ; do | ||
Line 36: | Line 36: | ||
done | done | ||
</pre> | </pre> | ||
</li> | |||
</ul> | |||
</li> | |||
<li> Step 3 : Install fai-kernels packages for the different architectures | |||
<ul><li> Configure and Run this little script for your different architectures | |||
<pre> | <pre> | ||
rm /tmp/fai-kernel* | rm /tmp/fai-kernel* | ||
Line 64: | Line 64: | ||
done | done | ||
</pre> | </pre> | ||
</li> | |||
</ul> | |||
</li> | |||
<li> Step 4 : Configure make-fai-nfsroot.conf to be architecture specific | |||
<ul> | |||
<li> Add <code>--arch i386</code> or <code>--arch amd64</code> to <code>FAI_DEBOOTSTRAP<code</li> | |||
<li> Modidy <code>KERNELPACKAGE</code> with the good fai kernel package.</li> | |||
</ul> | |||
</li> | |||
<li> Step 5 : Build the arch dependant NFSROOT | |||
<ul> | |||
<li> Execute this commands | |||
<pre> | <pre> | ||
export APT_CONFIG=/etc/fai-i386/apt_arch.conf | export APT_CONFIG=/etc/fai-i386/apt_arch.conf | ||
make-fai-nfsroot -C /etc/fai-i386 -V vmlinuz-install-i386 -v | make-fai-nfsroot -C /etc/fai-i386 -V vmlinuz-install-i386 -v | ||
</pre> | </pre> | ||
</li> | |||
</ul> | |||
</li> | |||
<li> Step 6 : Configure network Install for a particular architecture | |||
<ul> | |||
<li> Run the command below | |||
<pre> | <pre> | ||
FAI_CHBOOT_ARCH=i386 | FAI_CHBOOT_ARCH=i386 | ||
Line 94: | Line 96: | ||
fai-chboot $FAI_CHBOOT_OPT computer | fai-chboot $FAI_CHBOOT_OPT computer | ||
</pre> | </pre> | ||
</li> | |||
</ul> |
Revision as of 10:20, 16 April 2007
FAI 3.1.8 Etch cross architecture NFSROOT build
I was installing an installserver for my company and looking for a way to build and i386 NFSROOT on a amd64 Etch. Thought FAI 3.1.8 was not really designed for cross architecture, it is possible to use it this way. Here is the workaround.
- Step 1 : Create arch specifics fais configuration direcories
for dir in /etc/fai-i386 /etc/fai-amd64 ; do mkdir $dir cd $dir ln /etc/fai/fai.conf ln /etc/fai/NFSROOT ln /etc/fai/apt ln /etc/fai/menu.lst cp /etc/fai/make-fai-nfsroot.conf . done
- Step 2 : Build a local
apt_arch.conf
file inside/etc/fai-i386
or/etc/fai-amd64
- Simply add thoses lines to
/etc/fai-i386/apt_arch.conf
( for/etc/fai-amd64/apt_arch.conf
, replace i386 by amd64)APT { Architecture "i386"; }
- You can create automagicaly those file running the following script
for arch in i386 amd64 ; do CONTENT='APT {\n\tArchitecture "$arch";\n}' echo $CONTENT > /etc/fai-$arch/apt_arch.conf done
- Simply add thoses lines to
- Step 3 : Install fai-kernels packages for the different architectures
- Configure and Run this little script for your different architectures
rm /tmp/fai-kernel* for arch in i386 amd64 ; do echo "Downloading $arch fai-kernels package" echo "--------------------------------------" export APT_CONFIG=/etc/fai-$arch/apt_arch.conf apt-get update apt-cache -f search fai-kernels PACKAGE=$(apt-cache -f search fai-kernels | grep Filename | awk ' { print $2 }') MIRROR=http://ftp.debian.org/debian wget $MIRROR/$PACKAGE -P /tmp done export -n APT_CONFIG apt-get update for file in /tmp/fai-kernels* ; do echo "Unpacking $arch fai-kernels package" echo "--------------------------------------" dpkg-deb -x $file / done
- Configure and Run this little script for your different architectures
- Step 4 : Configure make-fai-nfsroot.conf to be architecture specific
- Add
--arch i386
or--arch amd64
toFAI_DEBOOTSTRAP<code
- Modidy
KERNELPACKAGE
with the good fai kernel package.
- Add
- Step 5 : Build the arch dependant NFSROOT
- Execute this commands
export APT_CONFIG=/etc/fai-i386/apt_arch.conf make-fai-nfsroot -C /etc/fai-i386 -V vmlinuz-install-i386 -v
- Execute this commands
- Step 6 : Configure network Install for a particular architecture
- Run the command below
FAI_CHBOOT_ARCH=i386 FAI_CHBOOT_OPT="-k \"ip=dhcp FAI_ACTION=install \ nfsroot=/srv/fai/nfsroot-$FAI_CHBOOT_ARCH,v3,tcp,rsize=32768,wsize=32768\" \ -F vmlinuz-install-i386 /dev/nfs" fai-chboot $FAI_CHBOOT_OPT computer
- Run the command below