FAI multi-distribution: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(fix link)
(remove obsolete information, add infos about CentOS)
Line 1: Line 1:
== Status ==
== Status ==


It's possible - and many people do it - to install many distributions with FAI successfully: Redhat (especially RHEL5, others should not be a major problem), Fedora, SuSE/Novell, Ubuntu, Debian. They might have some glitches (depending on distribution, it might be that softupdates and/or fai-cd are a bit problematic) but in general it's stable and usable.
It's possible - and many people do it - to install many distributions
with FAI successfully: Redhat (especially RHEL5, others should not be a major problem), Fedora, CentOS, SuSE/Novell, Ubuntu, Debian. They might have some glitches (depending on distribution, it might be that softupdates and/or fai-cd are a bit problematic) but in general it's stable and usable.


Since FAI 3.1.8 already has the most important things integrated:
Since FAI 3.1.8 already has the most important things integrated:
Line 7: Line 8:
* unpacking a base.tgz named CLASS.tar.gz from the configspace directory "basefiles"
* unpacking a base.tgz named CLASS.tar.gz from the configspace directory "basefiles"
** Alternative to this, via hook: http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02001.html
** Alternative to this, via hook: http://www.mail-archive.com/linux-fai@uni-koeln.de/msg02001.html
* using other package managers (see install_packages or it's doc - I am not sure where and if there exists docs but the sources)  
* using other package managers (see install_packages or it's doc)  




Line 23: Line 24:


=== Distribution specific stuff ===
=== Distribution specific stuff ===
==== Ubuntu ====
* some hints on Grub stuff: [[FAIUbuntuGrubProblems]]
* [[FAIUbuntuSudo]]
* [[FAIUbuntuLikeDVD]]
There are some ubuntu classes here: http://wiki.fai-project.org/images/b/b1/Fai-configspace.tar.gz


==== SuSE ====
==== SuSE ====
a more verbose description on how to do this with SLES9 is [[Installing_SLES9_32Bit_and_Smart_PackageManager_with_FAI | available here]]
a more verbose description on how to do this with SLES9 is [[Installing_SLES9_32Bit_and_Smart_PackageManager_with_FAI | available here]]
==== CentOS ====
Currently (2/2011) Michael Goetze works on this. Will be included into
trunk soon.


==== RHEL5 ====
==== RHEL5 ====
Line 39: Line 38:
Your need a redhat specific basefile - see below.
Your need a redhat specific basefile - see below.


You need cfengine from here(or somewhere else) to do softupdates on a running system:  http://ftp.rpmforge.net/pub/dag/redhat/el5/en/i386/dag/RPMS/cfengine-2.2.1-1.el5.rf.i386.rpm
You need cfengine to do softupdates on a running system:  http://ftp.rpmforge.net/pub/dag/redhat/el5/en/i386/dag/RPMS/cfengine-2.2.1-1.el5.rf.i386.rpm


And you need a config space with some specific stuff for the redhat systems.
And you need a config space with some specific stuff for the redhat systems.
Line 50: Line 49:


== Bootstrapping the base images for other distributions ==
== Bootstrapping the base images for other distributions ==
The stuff previously mentioned on [http://svn.debian.org/wsvn/fai/people/lazyboy/fai-distributions/ svn://svn.debian.org/svn/fai/people/lazyboy/fai-distributions] helps with other Debian-like distributions.


For Fedora/Redhat like distributions, you can use yum.
Have a look at examples/simple/basefiles/Makefile. Works for Debian,
Ubuntu, CentOS.
 


For example, to bootstrap rhel5, after having created a local mirror, I create such a yum.conf file:
For example, to bootstrap rhel5, after having created a local mirror, I create such a yum.conf file:
Line 112: Line 112:
[[Category:RedHat]]
[[Category:RedHat]]
[[Category:SuSE]]
[[Category:SuSE]]
[[Category:CentOS]]

Revision as of 22:42, 10 February 2011

Status

It's possible - and many people do it - to install many distributions with FAI successfully: Redhat (especially RHEL5, others should not be a major problem), Fedora, CentOS, SuSE/Novell, Ubuntu, Debian. They might have some glitches (depending on distribution, it might be that softupdates and/or fai-cd are a bit problematic) but in general it's stable and usable.

Since FAI 3.1.8 already has the most important things integrated:


Installing other distributions

A Quick overview:

  • build a minimal base image (here, the make-fai-base-tgz from svn://svn.debian.org/svn/fai/people/lazyboy/fai-distributions can help you, but is not required - you can build your base image as you wish) and put it into MY-DISTRIBUTION-NAME.tar.gz in the configspace/basefiles
  • add the install host to the class MY-DISTRIBUTION-NAME
  • write a hook prepareapt.MY-DISTRIBUTION-NAME to replace the stuff specific for the distribtuion of the fai server with something suitable to get your specific distribution ready to install packages. the actual prepareapt task must be skipped
  • check that the package lists of the classes of that host are compatible for your distribution. read man install-packages to learn about available package managers for non-dpkg distributions
  • install as usual

As we have not much feedback on this topic, which makes it hard to know if it works, or to make it better, please report success or failure of this methods on the FAI mailing lists!

Distribution specific stuff

SuSE

a more verbose description on how to do this with SLES9 is available here

CentOS

Currently (2/2011) Michael Goetze works on this. Will be included into trunk soon.

RHEL5

Redhat Enterprise Linux 5

Should work with more recent versions, too. Your need a redhat specific basefile - see below.

You need cfengine to do softupdates on a running system: http://ftp.rpmforge.net/pub/dag/redhat/el5/en/i386/dag/RPMS/cfengine-2.2.1-1.el5.rf.i386.rpm

And you need a config space with some specific stuff for the redhat systems.

Check out http://svn.debian.org/wsvn/fai/people/lazyboy/rhel-install-fixes_3.1.8/examples/rhel-install-demo and add ths stuff you need to your current config space.

It should be no problem to mix this into your existing Debian configspace.

And there is a RHEL5 example configspace here: http://svn.debian.org/wsvn/fai/people/lazyboy/rhel-install-fixes_3.1.8/

Bootstrapping the base images for other distributions

Have a look at examples/simple/basefiles/Makefile. Works for Debian, Ubuntu, CentOS.


For example, to bootstrap rhel5, after having created a local mirror, I create such a yum.conf file:

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
exclude=*-debuginfo
gpgcheck=0
obsoletes=1
reposdir=/dev/null
plugins=1


[base]
protect=0
name=Red Hat Enterprise Linux 5
#baseurl=file:///nfs/rhel5/Server
#baseurl=http://localhost/mirrors/rhel/5/Server/
baseurl=file:///var/www/mirrors/rhel/5/Server/
enabled=1

Then I call this script:

#! /bin/sh
tmp=`mktemp -d`

yum -c yum.conf --installroot=$tmp -y install yum dhclient
cp rhel5.repo  $tmp/etc/yum.repos.d/
mount -o bind /proc $tmp/proc
chroot $tmp yum groupinstall -y Core
chroot $tmp yum clean packages

echo "chroot created in tmp=$tmp"
oldpwd=$PWD
cd $tmp
umount ./proc

tar cvfz $oldpwd/DIST-RHEL_5.tar.gz . 

cd -

echo "chroot created in tmp=$tmp"

And I'm done. This leads to a working install when using my example configspace mentioned above.

There are some issues left, so this currently works for dirinstall, only, out of the box. I had to install some additional packages (will add the list later) manually in the nfsroot, and then netinstall via pxe worked, too.

To know what you have to install manually in the nfsroot, check the output of make-fai-nfsroot -v - at one point, quite some packages are dropped with the message that they aren't available, but they can be installed just normal, and are perfectly there. Without this, make-fai-nfsroot finishes with "success", but is unable to install a machine nicely via network install.