Using make-fai-bootfloppy on an Ubuntu Hoary 5.04 FAI nfsroot

Henning Sprang henning_fai at gmx.de
Sun Apr 24 18:06:41 CEST 2005


Hy Martin,


On Thu, 2005-04-21 at 22:58 +0200, Martin Tanzer wrote: 
>     Doploying Ubuntu(Hoary) with FAI
> 
> 
>         Introduction
> 
> The method discribed at
> http://www.sprang.de/wiki/index.php/Ubuntu_install_with_FAI did not
work
> for me at all with the following spcifications:
> 
>     * FAI 2.8
>     * Install Server: sarge
>     * Target System: Ubuntu hoary

I admit and am aware of, my description is not tested with the newest
FAI version and only with hoary about 4 weeks before release and I would
have to look to say something about how up to date my sarge mirror is...
(just added these words to my wiki page introduction :) )


> 
> /fai-setup/ does not finish, because there are lots of unresolvable
> depencies und missing packages. Even if I tweaked in the /chroot/ and
> installed missing packages from other distributions, I ran into perl
> (and other) troubles ion the targetsystem. So I decided to change the
> strategy.
> 

This sounds really strange - did you do everything exactly as written
and used the config files I provide for download? The standard FAI
debootstrap command line has some includes which are not in hoary or
only in universe, so you really need to use the config file provided by
me, and/or add universe to the fai sources.list plus adjust the .


> 
>       The way it works
> 
>     * Install fai on a sarge system
>     * Run fai-setup and set it up to your needs
>     * Chose an install kernel - I think it is better to build it from
>       2.6 because the target system will use a kernel 2.6
>     * Run make-fai-bootfloppy
>     * Test it  ;-) 
>     * Move /usr/lib/fai/nfsroot to /usr/lib/fai/nfsroot.sarge

If you run make-fai-bootfloppy before make-fai-nfsroot, you will end up
with a bootfloppy matching "some" older nfsroot but not the one you will
create later. I am not sure if this causes trouble in any cases, but
it's just not the same.


>     * Install ubuntus debootstrap
>     * Set FAI_DEBOOTSTRAP="hoary http://$mirrorhost/ubuntu" (or
>       something) in make-fai-nfsroot
>     * Set /etc/fai/source.list to ubuntu sources
>     * Run /make-fai-nfsroot/. If it fails, execute
> 
> cd /usr/lib/fai/nfsroot
> mount -t proc /proc proc
> chroot .
> 
>     * Try to install the missing packages from where ever. Leave the
>       chroot with CTRL-D
>     * Rerun
> 
> make-fai-nfsroot -v -r
> 
>     * As long as you don't get a message /Building base.tgz/ repeat
the
>       chroot trick.

For the first time, I had to do that also, that's why i provided the
example configs. I tweaked FAI variable FAI_DEBOOTSTRAP_OPTS
in /etc/fai/make-fai-nfsroot.conf (included in the download file) plus,
instead of installing those packages manually from "where ever", I would
guess to try adding universe and multiverse apt sources lines
to /etc/fai/sources.list first. Some packages where simply not needed or
at least my installs just ran even if they where removed. The example
provided by me for download should really help here.

>     * Once base.tgz is buildt, you are done. Move nfsroot to
nfsroot.hoary
>     * Move nfsroot.sarge back to nfsroot
>     * Copy the content of /nfsroot.hoary/var/tmp/ to /nfsroot/var/tmp/
>       (base-pkgs.lis base.tgz packages.arch)
>     * Set /nfsroot/etc/apt/source.list/ to ubunto sources

I don't understand why you needed to do these moving actions, I can't
remember of doing this. The hoary nfsroot should have nothing to do and
work completely independent of any other sarge nfsroot.

If you want the hoary nfsroot just reside in another place
like /usr/lib/fai/nfsroot-hoary you just need to change the correlating
variables in /etc/fai (or, like I did put it in /etc/fai-hoary) and if
you control your dhcp  and NFS server on your own, you can easily tell
each client to use a different nfsroot (which must be exported by nfs),
with a dhcpd.conf paragraph like that, for my example files it should
be:


host montego {
        hardware ethernet  00:90:F5:2B:AB:37;
        fixed-address montego;
        option root-path
"/usr/lib/fai/ubuntu-nfsroot,rsize=8192,wsize=8192,acregmin=1800,acregmax=1800,acdirmin=1800,acdirmax=1800";
}


(attention the root-path line must be one line with the following
variable, this is crippled by my mail program)
You can adjust the location of your nfsroot easily here.


>     * Its safe to restart the nfs-server
>     * Change the kernel to /linux-image-686/ in DEFAULT
>     * To build a desktop system add somewhere the
package /ubuntu-desktop/

Yes, agreed - in the fai-2.8 ubuntu package, I will change that so this
will not be needed, the ubuntu package should be usable in sarge, too.

>     * Start the target system, get a bier and enjoy the unattended
>       installation. After a reboot your desktop should come up with a
>       configured xserver.



Thanks for the feedback, I hope, with some other testers, we can get a
kind of documentation together that works for more than just one or two
people, and is good enough to get into the original FAI docs, that's why
I'm very interested in your answers.

My long term goal is to integrate all that so well into FAI that FAI can
do that out of the box, so it should be just a matter of classes which
distribution you install, but that's quite a way to go :)

Henning



More information about the linux-fai mailing list