Use nfsroot for diskless clients AND persistent storage

2020-11-01 Diskussionsfäden Thomas
Hi,
after successfully setting up FAI server version 5.9.4 I continued with
configuration for using nfsroot for diskless clients following this

wiki article.

This is working without problems, too.

However, the diskless client (in my case KVM instance for testing) has
*no persistent storage*.
Any change written is gone after client is rebooted.

Therefore my question is:
How can I configure FAI nfsroot to save changes in client persistently?
Is this related to NFS version?
(I'm using NFSv4 only according to this
 guide.)

THX


FAI using for installations AND nfsroot for diskless clients

2020-11-01 Diskussionsfäden Thomas
Hi,
I consider using FAI for 2 scenarios:
- OS deployment on client
- nfsroot for diskless clients

Is my assumption correct, that I need two different nfsroot directories?
/srv/fai/nfsroot
/srv/fai/nfsroot-diskless

If yes, how can I maintain these different nfsroot dirs?
I would then need 2 different /etc/fai/nfsroot.conf, right?

THX



FAI using NFS v4 with the nfsroot

2020-11-01 Diskussionsfäden Thomas
Hi,
if there's no severe downside of using NFSv4 I would like to use it with
nfsroot.
In the docu I found this:
"[...] If you want to use NFS v4 for the nfsroot, you have to remove
this option the the kernel boot options."

On my FAI server I can list the configuration for all hosts:
root@faiserver:~# fai-chboot
-L  
   

[DEFAULT] default localboot -1
[Other] nas vmlinuz-5.8.0-0.bpo.2-amd64 initrd=initrd.pxe ip=dhcp 
root=/dev/nfs nfsroot=faiserver:/srv/fai/nfsroot-nas rootovl
ipv6.disable=1 ip=:eno1 
nas C0A801C9 vmlinuz-5.8.0-0.bpo.2-amd64
initrd=initrd.img-5.8.0-0.bpo.2-amd64 ip=dhcp 
root=/srv/fai/nfsroot-diskless:vers=3 rootovl 
FAI_FLAGS=verbose,sshd,createvt
FAI_CONFIG_SRC=nfs://faiserver/srv/fai/config FAI_ACTION=install

Can you please advise how to remove the kernel boot option with fai-chboot?

THX




Re: Problems deinstalling apache2 (from trac) in FAI

2009-04-08 Diskussionsfäden Thomas Lange
>>>>> On Wed, 8 Apr 2009 16:43:17 +0200, Nico -telmich- Schottelius 
>>>>>  said:

> apache2 | httpd.

> No I try to get rid of the apache, but without success:

> - using "-apache2" just resulted in "package not found" error
apache2- is the correct syntax.

You can also try to write a hook (for instsoft) which installs
httpd. Then there's no need to install apache2 since FAI already
installed httpd.

> - using PACKAGES remove apache2 fails with this message:
No error message? did you use verbose?
-- 
regards Thomas


Re: debian bug 453294 this fix breaks upgrade etch -> lenny

2009-04-08 Diskussionsfäden Thomas Lange
>>>>> On Thu, 9 Apr 2009 00:01:55 +0200, Rudy Gevaert  
>>>>> said:

> The only way arround is when creating the virtual xen machine to let it
> boot with nfsroot options and also set boot=nfs on as an extra option.

> I still don't know why the check was added in the init script.  Thomas?
IIRC, this check is in the package live-initramfs. So I don't know.

-- 
regards Thomas


Re: chroot: cannot run command

2009-04-16 Diskussionsfäden Thomas Lange
>>>>> On Thu, 16 Apr 2009 16:58:22 +0200, Julien Vermet  
>>>>> said:

> After the "fai-setup", I have a lot of "chroot: cannot run command" 
errors.
> I think I configured all configuration files as described in  the
> documentation. Here is the log :

> "fai-setup
> Creating FAI nfsroot in /usr/fai/nfsroot/live/filesystem.dir.
> By default it needs more than 390 MBytes disk space.
> This may take a long time.
> Creating base system using debootstrap version 1.0.10lenny1
> Calling debootstrap lenny /usr/fai/nfsroot/live/filesystem.dir
> http://miroir.dsi.damgm.i2/debian
> chroot: cannot run command `apt-get': No such file or directory

I bet it's a broken mirror. Try with an official mirror.
-- 
regards Thomas


Re: help me out!

2009-04-19 Diskussionsfäden Thomas Lange
>>>>> On Mon, 20 Apr 2009 10:44:09 +0430, Rajesh pant  
>>>>> said:

> This is rajesh, and i need to install linux os inside a small workplace!!!
> how to go about things!!!..could you please tell me about the
> procedure!!!
Start reading the fai-guide.
http://www.informatik.uni-koeln.de/fai/fai-guide/

> Rajesh pant
Please, no html mails!

-- 
regards Thomas


FAI 3.2.18 released

2009-04-20 Diskussionsfäden Thomas Lange
Hi all,

the new version of FAI (3.2.18) is released. It contains a lot of
improvements in setup-storage and a bunch of bug fixes (over
30). Creating an amd64 nfsroot on a system running 32bit (but with
64bit kernel) is now much easier than before.

Many thanks to Michael Tautschnig who did all the setup-storage stuff
and helped a lot with bug fixes and by reviewing my commit
mails. Thanks also to all other people who fixed bugs and helped
creating this release.

You will get the newest FAI packages by adding following line to your
sources.list file:

deb http://www.informatik.uni-koeln.de/fai/download lenny koeln

-- 
regards Thomas


FAI 3.2.19 uploaded, fixes one important bug

2009-04-22 Diskussionsfäden Thomas Lange
The new FAI release 3.2.19 fixes one important bug. From the changelog:

  * subroutines-linux: get-config-dir was never run if -z $monserver,
which may be the case when no DHCP was done (dirinstall, softupdates,
or install using fixed IP); problem was introduced by patch in r5338.
(closes: #525096)

No other things were changes in this release.
-- 
regards Thomas


Re: running out of arp-cache

2009-04-23 Diskussionsfäden Thomas Lange
>>>>> On Tue, 21 Apr 2009 10:41:43 +0200, Henning Fehrmann 
>>>>>  said:

> Do you know the right kernel boot parameter to manipulate the arp cache?

> If this is not possible, one should do it in the live-initrd or, latest,
> in the nfs-chroot environment. Currently, I am not sure whether one runs 
into
> problems already in the initrd.  
> Is there a generic way to add a proper
> /etc/sysctl.conf in the initrd or in the NFS-chroot, configured
> somewhere in the make-fai-nfsroot.conf? 

You could call /etc/init.d/procps start
which is also the way it's done during booting a normal system.

-- 
regards Thomas


Re: running into raid0 and grub-install bugs on lenny

2009-04-24 Diskussionsfäden Thomas Lange
>>>>> On Fri, 24 Apr 2009 11:36:12 -0700, William Francis  
>>>>> said:

> grub-probe: error: Cannot open `/boot/grub/device.map'
> /usr/sbin/grub-install: line 374: [: =: unary operator expected
> Installation finished. No error reported.

> Is there a work around for this problem?
Just ignore this error. I also have this error message, but grub works
perfectly. Have a look at bug report #513216.

-- 
regards Thomas


Re: make-fai-bootfloppy?

2009-04-29 Diskussionsfäden Thomas Lange
>>>>> On Wed, 29 Apr 2009 11:05:22 -0500, "John G. Heim"  
>>>>> said:

> The problem is that I cannot do a PXE boot because I'm blind and I cannot 
> change the  BIOS. But the computers I need to install on are already set 
up 
> to boot from a CD. It doesn't look like fai-cd does what I want. I am 
> wondering if the old functionality of booting from a CD and mounting the 
> root via NFS can still be done.
Hi John,

yes this can be done, but does not work out of the box.
I would try it this way:

Use fai-cd to create a bootable CD, but use an empty mirror. Even if
the nfsroot and the config space is now copied onto the CD, you can
force the initrd to mount the NFSROOT via NFS, and not use the one
from CD. Same applies for the config space. IMO you only have to
change the kernel append parameters in the menu.lst file that will be
put onto the CD.

Following option are responsible that the initrd will NOT search for a
local file system to mount.

ip=dhcp root=/dev/nfs nfsroot=/srv/fai/nfsroot boot=live 

Hope this helps.

P.S: I plan to add an option to fai-cd, that creates such a boot-only
CD, but I don't know when it's finished.
-- 
regards Thomas


FAI 3.2.20 released

2009-05-04 Diskussionsfäden Thomas Lange
FAI 3.2.20 has been released. The command fai-cd has now a new option
-B, which creates a small boot-only CD, which does not contain the
nfsroot, the partitial mirror and the config space. It is meant for
booting from CD or USB stick but then the kernel gets all other parts
via network.

You will get the newest version if you add this line to the sources.list
file:

deb http://www.informatik.uni-koeln.de/fai/download lenny koeln
-- 
regards Thomas


Re: FAI 3.2.20 released

2009-05-04 Diskussionsfäden Thomas Lange
>>>>> On Mon, 04 May 2009 13:26:55 +0200, Jean Spirat  
>>>>> said:

> is there any changelog somewhere ? Is gpt-bios included in this one ? :)
http://packages.debian.org/changelogs/pool/main/f/fai/current/changelog
but it's currently only for 3.2.19. Maybe tomorrow you will see the
changelog for 3.2.20 there.

In the meantime here's the changelog:

fai (3.2.20) unstable; urgency=low

  [ Thomas Lange ]
  * menu.lst: remove year
  * fai-cd: add option -B, that creates a boot-only CD (without containing
the nfsroot, the partitial mirror and the config space)
  * conf/menu.lst.boot-only: new config file for the boot only CD
  * fai-cd.8: add option -B
  * fai-abort: add missing lsb header
  * control: remove duplicate fields
  * copyright: fix lintian warning
  
  [ Michael Tautschnig ]
  * fixed several hyphen-used-as-minus-sign errors in man pages
  * update to standards version 3.8.1, no changes needed
  * replaced dh_clean -k by dh_prep
  * use dh_lintian to install lintian overrides
  * added override for fai-nfsroot (diverts foreign /etc/init.d.rcS)
  * Build-Depends: debhelper (>= 7)
  * setup-storage/Sizes.pm: Clarified error message in cases where the user
specified a partition is larger than the entire disk
  * setup-storage/Parser.pm, setup-storage/Sizes.pm, setup-storage/Volumes.pm:
Added pseudo-disklabel gpt-bios to support GPT on systems with BIOS
instead of EFI. Also installs an additional partition to store whatever
doesn't fit into MBR.
  * setup-storage: bumped version to 1.0.5 (gpt-bios support)

 -- Thomas Lange   Mon, 04 May 2009 10:42:25 +0200

-- 
regards Thomas


Re: FAI 3.2.15+ Error make-fai-nfsroot on amd64 only ?

2009-05-04 Diskussionsfäden Thomas Lange
>>>>> On Mon, 4 May 2009 20:22:03 +0200, Michael Tautschnig  
>>>>> said:


>> 247 yes '' | LC_ALL=C call_verbose debootstrap $FAI_DEBOOTSTRAP_OPTS 
$1 $NFSROOT $2
Just remove the yes '' |
This should fix the problem.

-- 
regards Thomas


Re: Thank you and good bye.

2009-05-05 Diskussionsfäden Thomas Neumann

hiya
[I had to push participation in this mailing list aside for quite some 
time, trying to catch up]


Henning Sprang wrote:

Russ Allbery wrote:

Hm, that's interesting -- I didn't think about trying that route.  How
do I specify a different base.tgz to unpack in the newly created file
system?  It looks like the path to base.tgz is hard-coded into
subroutines-linux, at least in the version I'm currently looking at
(which isn't the latest).


The task extrbase looks in the directory "basefiles" inside the fai
configspace for a file

CLASS.tar.gz - for any of the clases defined for the host currentlyx
being installed.


I disliked this kind of behaviour, that's why I rewrote the hook in my 
configspace. I don't recommend it for the faint of heart, just to show

a different possibility.

I was faced with having to install

 - Debian Etch/Lenny/Speedy/Sid
 - Ubuntu 8.04 8.10 9.04
 - SuSE Linux Enterprise Server 10 / 10SP1 / 10SP2

in 32 and 64 bit which would mean I had to find names for 20 classes, 
(which are never used elsewhere) just to be able pull in the correct
base image. (And _never_ have a base.tgz in your nfs root, or fai would 
always use this one. At least if i recall correctly.)


The most significant change to default behaviour is, that integration
of Debian Speedy (current "testing") was just a question of allowing
the variable OS_VERS to assume the value "speedy". (I set these during 
execution of a different script in class/...) Because no valid base
image can be found, debootstrap is used automatically. Ubuntu 9.04 would 
have been equally easy, but the appropriate debootstrap script was 
missing from my nfsroot. (I blame Debian Lenny.)


Doing it the canonical way would have meant to create 2 new classes e.g. 
BASE-DEBIAN-SPEEDY-X86_32 and -X86_64 and either provide base images or 
also create 2 new files BASE-DEBIAN-SPEEDY-X86_32.var and -X86_64.var

in $FAI/classes which contain the correct FAI_DEBOOTSTRAP variable.


This script assumes there are 3 variables

  OS_TYPE (Debian, Ubuntu, SLES)
  OS_VERS (etch/lenny/speedy/.. or
   gutsy/intrepid/jaunty or
   10/10SP1/10SP2)
  OS_ARCH (X86_32 / X86_64)

which define the operating system to be installed.

hint: You can provide these variables at the boot-prompt.


There's also an unconditional "cat" in line 27 - it's a recent addition 
and I didn't found the time to properly secure this command.







the scary stuff

(Please keep in mind that I controll 4 very different FAI-environments
 with exactly the same config-space.)

There a other variables, most importantly:

  SWREPO  the location of the base-files, it doesn't hurt if it's
  not defined-> the default behaviour kicks: $FAI/basefiles
  (I didn't like to have to carry these multi-megabyte files
   in my config-space all the time.)

  IDENTITYFILE

In my environment a so called IDENTITYFILE is written during execution 
of the scripts in $FAI/class/. It holds a lot of different options and 
is used mostly to limit the number of classes. (I'm using classes mostly 
to define which "major building blocks" this installation should contain 
and define small environment- or host-dependent settings in the identity 
file.)



I'm also patching fai on the fly, so I don't have to remember to 
patch the nfs roots after an upgrade. This behaviour is customizable

via a script in $FAI/class/.

 install_packages -> "and"-patch
 fai-do-scripts   -> "perl"-patch, if necessary

tschüß
thomas
#! /bin/bash

# I found it necessary to modify the default behaviour, because
# fai has some quirks I don't like.
#   - if base.tgz exists then always use it instead of bootstrapping
#   - find a valid base image via a class
# this class is used nowhere else and doesn't have
# other uses.
#  (- always state a Debian base archive is being extracted)
#   - fai barfs on debootstraps exit code 141
# (this still needs a proper analysis)

# read additional information from the environment or from the
# identityfile, values given in identityfile have preference!
# this file must contain:
#   FAI_OSTYPE - which OS to install (Debian, Ubuntu, SuSE?)
#   FAI_OSVERS - which version to install? (etch, lenny, sid, hardy, 10SP2)
#   FAI_OSARCH - x86_32 or x86_64?
if [ -r ${IDENTITYFILE} ] ; then
source ${IDENTITYFILE}
fi

## Preparation - lenny's grub has a small cosmetic flaw
##   it always tries to read the device map from the root
##   device - but an nfsroot doesn't have / need a device map
# PATCHLOCATION is defined in class/DEFAULT
# may have been overwritten by a later definition
cat $PATCHLOCATION/grub-install.patch | patch -p 1 


## Step 1 - check for debootstrap options or create new ones
if [ -z ${FAI_DEBOOTSTRAP} ] ; then
case $

option bootable in setup-storage

2009-05-06 Diskussionsfäden Martin Thomas

Hello list,

there might be a small discrepancy between setup-storage and its man page:

Without explicitly setting the option bootable:1 in our disk_config partition 
files, the boot flag is not set in the MBR, which causes some of our machines 
not to boot, while the setup-storage man page says (at least to my 
interpretation), that / is set as the default boot partition.

To give more information, the following disk_config file does lead to 
non-booting machines in some cases:

# BEGIN
disk_config disk1 disklabel:msdos

#  

primary  /2500   ext3   rw,errors=remount-ro
logical  swap 1000-2000  swap   rw   
logical  /var 1500-2000  ext3   rw  createopts="-m 5" 
tuneopts="-c 0 -i 0"
logical  /tmp 500-1500   ext3   rw  createopts="-m 0" 
tuneopts="-c 0 -i 0"
logical  /usr 10G-20Gext3   rw
logical  /home10G-100%   ext3   rw,nosuid   createopts="-m 1" 
tuneopts="-c 0 -i 0"
# END

So, what's wrong here, the manual or my understanding of it?

Martin


  



Re: FAI 3.2.20 released

2009-05-06 Diskussionsfäden Thomas Lange
>>>>> On Wed, 6 May 2009 13:56:40 +0100, Joel Merrick  
>>>>> said:

> Where abouts do you change the server that the bootcd wants to bootstrap
> from?

> I'm getting a 10.5.x.x address at the moment, where do I specify that? Is 
it
> a kernel option or something, or is it trying to use my office DHCP 
server?
Normally it uses the server-name from dhcpd.conf. It may also look at
next-server. You can also specify it on the kernel command line. 
Have a look at the nfsroot= parameter where you can specify the nfs
server. 

-- 
regards Thomas


Re: Patching kernel with aufs (riding a dead horse?)

2009-05-06 Diskussionsfäden Thomas Lange
>>>>> On Thu, 07 May 2009 08:02:32 +0200, Carsten Aulbert 
>>>>>  said:

> first of all, I think aufs is now required for FAI, right?
Yep. FAI uses the live-initramfs packages, and this uses aufs as
default. MAybe unionfs is also supported.

> Has someone got a patch ready which I can apply to a recent 2.6.27 (or
> later) kernel to get aufs in there? I've been struggling yesterday
> evening without much success to get this into the kernel tree, somehow I
> made something wrong:
Have a look at grml. IIRC they use a very recent kernel, and they also
use FAI and live-initramfs to build their live CD.

-- 
regards Thomas


Re: FAI 3.2.20 released

2009-05-06 Diskussionsfäden Thomas Lange
>>>>> On Wed, 6 May 2009 14:25:22 +0100, Joel Merrick  
>>>>> said:

> Apologies, but I'm still not getting it..

> What files do I need to look in to change these settings? Do I then need 
to
> rerun fai-cd?
man fai-cd. There's a option -g which lets you specify a different
menu.lst. Put the options into this file.

> What I'm trying to achieve is to have a bootcd, where I can specify the
> install server to install from.. without having to rely on DHCP/PXE at all
you can also specify all network parameters using ip=. Have a look at
the kernel source documentation (IIRC nfsroot.txt and
kernel-parameters.txt).

Also
/srv/fai//nfsroot/live/filesystem.dir/usr/share/man/man7/live-initramfs.7.gz
will explain some options.


> >>>>> On Wed, 6 May 2009 13:56:40 +0100, 
Joel Merrick <mailto:joel.merr...@gmail.com";>joel.merr...@gmail.com> said:
Please no HTML mails!
-- 
regards Thomas


Re: System stalls (for 15-30 minutes) during savelog

2009-05-07 Diskussionsfäden Thomas Lange
>>>>> On Thu, 07 May 2009 16:36:38 +0200, Carsten Aulbert 
>>>>>  said:

> It always fails when trying to transfer the content of dmesg, thus on
> the FAI server this file is always of size 0 while other files before
> are transferred fine. This was tested with both rsh and ssh.
Strange.

In the past I also had a machine were I got the strange strings in the
kernel logs (looks a little bit like rot-13). But I can't remember how
I fixed it.

> Also, when I log into the system via ssh and call dmesg interactively,
> it also kills the network interface and the install then of course
Maybe some strange chars in dmesg causes the network break, but I'm
sure that's a kernel problem with your hardware.

Can you try you configuration with another piece of hardware.
Did you run memtest86+ on this machine?
-- 
regards Thomas


Re: System stalls (for 15-30 minutes) during savelog

2009-05-08 Diskussionsfäden Thomas Lange
>>>>> On Fri, 08 May 2009 10:21:19 +0200, Carsten Aulbert 
>>>>>  said:

>> PS: Is there an easy way to enable an accessible terminal on tty2 and 3?
>> I've tried editing /etc/inittab in the live image, but that did not do
>> the trick. I'm currently looking into the main fai cfengine script in
>> there
Additional terminal on tty2 and 3 are created after the red fai logo
appears. If your kernel stops before (when only the initrd is
available), I'm not sure if you can get a shell on tty2 and 3. This
has to be done by live-initramfs.
-- 
regards Thomas


Re: System stalls (for 15-30 minutes) during savelog

2009-05-12 Diskussionsfäden Thomas Lange
>>>>> On Tue, 12 May 2009 15:57:14 +0200, Carsten Aulbert 
>>>>>  said:

> and it seems that there is a autosensing problem between the switch and
> the NIC. it should bee tx:off rx:off. When I put a direct link between
> the FAI server and this node the install went fine.

> Now I've to find a suitable location where to tell the NICs how to react.
> Should this go into the initrd and/or the fai config area?
Since you do not have problems in the early beginning, you should put
the workaround/fix into the config space. This is easier to manange
than putting it into the initrd.

-- 
regards Thomas


Re: setup-storage: error

2009-05-15 Diskussionsfäden Thomas Lange
>>>>> On Fri, 15 May 2009 13:20:20 +0200, Alexander Bugl 
>>>>>  said:

> So disk-info tests if the group of /dev/sda is disk -- and in my case it 
is:
> # ls -al /dev/sda
> brw-rw 1 root floppy 8, 0 May 15 10:36 /dev/sda
Strange. please put your dmesg.log, fai.log and variables.log onto
paste.debian.net. Then We may find the problem.

-- 
regards Thomas


Re: setup-storage: error

2009-05-15 Diskussionsfäden Thomas Lange
>>>>> On Fri, 15 May 2009 13:48:17 +0200, Alexander Bugl 
>>>>>  said:

> Hi!
>> > So disk-info tests if the group of /dev/sda is disk -- and in my case 
it is:
>> > # ls -al /dev/sda
>> > brw-rw 1 root floppy 8, 0 May 15 10:36 /dev/sda
> dmesg.log: http://paste.debian.net/36208/
Your dmesg looks fine. One disk, called sda. So it's not the kernel.
What does cat /proc/partitions say?

P.S.: If you join the #fai channel on irc.debian.org help will be much
quicker than via email.

-- 
regards Thomas


Re: setup-storage: error

2009-05-15 Diskussionsfäden Thomas Lange
>>>>> On Fri, 15 May 2009 16:02:49 +0200, Alexander Bugl 
>>>>>  said:

>> What does cat /proc/partitions say?

> # cat /proc/partitions
> major minor  #blocks  name

>8 0  143247360 sda
Looks fine.
If the ouput of
bash -x /usr/lib/fai/disk-info
is ok, I would guess it's because of the wrong group floppy.
Check why your disk belongs to the group floppy. Maybe a
broken udev configuration.

-- 
regards Thomas


Re: disk name change hda/sda between install and runtime kernel

2009-05-18 Diskussionsfäden Thomas Neumann

Henning Sprang wrote:

I wonder, if I don't have to use device name anywhere, (disk_config
disk1, fstabkey:uuid), if and how I then can circumvent of having to do
something like

"vg data hda5"


vg data disk1.3

?



Re: disk name change hda/sda between install and runtime kernel

2009-05-18 Diskussionsfäden Thomas Neumann

Henning Sprang wrote:

Thomas Neumann wrote:

vg data disk1.3


Do you guess or do you use that?


I'm using it for quite some time now. If you really want you can have a 
look through this list archive. I think Thomas (the other one) told me 
this is what I want/need back then.


/dev/hda
/dev/sda
/dev/xvda
/dev/cciss/c0d0

I don't care.



fai-debconf and softupdate

2009-05-22 Diskussionsfäden Gebhardt Thomas
Hi,

just got the same problem as

Date: Mon, 12 May 2008 16:56:31 +0200
From: Eymen Alyaz 
Subject: exim4-config with debconf fails

and found that this is due to an unexpected behaviour of fai-debconf while 
performing a "fai softupdate" .

I use to keep the vanilla fai config just as it is and tie local modifications
to local classes which superseed the default fai configuration. This policy
helps me to keep in sync with fai upstream updates.

But this does not work with fai-debconf, let's see why:

FAIBASE has the debconf config:
exim4-config exim4/dc_eximconfig_configtype select local delivery only; ...

which is superseeded by MYCLASS:
exim4-configexim4/dc_eximconfig_configtype  select  mail sent by ... 

because MYCLASS follows FAIBASE in the class hierarchy.

So the debconf database of my host has
exim4-configexim4/dc_eximconfig_configtype  select  mail sent by ...

Now comes fai-debconf and softupdate:
fai-debconfig doesn't bother about class hierarchy but only looks for changed
debconf entries. Therefore the MYCLASS debconf line is discarded during the
diff and the debconf database (and the host config) gets reverted to the 
default FAIBASE entry, a behaviour that conflicts with the principle of least 
surprise.

fai-debconf should process conflicting entries in $LOGDIR/debconf.data
(later entries overwrite earlier entries) before performing a diff to the 
current debconf values.

SY, Th. Gebhardt


Re: Detectng sound card

2009-05-22 Diskussionsfäden Thomas Lange
>>>>> On Wed, 20 May 2009 14:24:49 -0500, "John G. Heim"  
>>>>> said:

> I would like to configure my FAI installation to detect the sound card on 
a 
Following file contains the type of codec, that is used inside your
sound card. Sometimes that is also needed.

/proc/asound/card0/codec#0
-- 
regards Thomas


Re: preserve first primary partition

2009-05-23 Diskussionsfäden Thomas Lange
>>>>> On Sat, 23 May 2009 09:18:16 +0200, Gert Huisman  said:

> Here is a working example from our DUALBOOT setup:
> disk_config disk1
> primary  - preserve1 ro,nosuid;
> primary  / 1000-2000 rw,errors=remount-ro ; -c -j ext3
This is an example using the old setup_harddisks tool, but the the new
tool setup-storage.
-- 
regards Thomas


Re: preserve first primary partition

2009-05-23 Diskussionsfäden Thomas Lange
This is my example (using setup-storage) , how I install my notebooks with 
dualboot.

# example of new config file for setup-storage

disk_config disk1  preserve_always:1 preserve_reinstall:7,8,9

primary  /win  15G-17G   ntfs  rw
primary  / 5G-6G ext3  rw,noatime,errors=remount-ro 
createopts="-m15"
logical  swap  500-1000  swap  rw
logical  /tmp  500-2500  ext3  rw,noatime,nosuid createopts="-m1"  
tuneopts="-c0 -i0"
logical  /home 8G-12Gext3  rw,noatime,nosuid createopts="-m1"  
tuneopts="-c0 -i0"
logical  /usr/local6Gext3  rw,noatime createopts="-m1"  
tuneopts="-c0 -i0"
logical  /files/scratch 1G-  ext3  rw,noatime,nosuidcreateopts="-m0" 
tuneopts="-c0 -i0"
-- 
regards Thomas


Re: fai-debconf and softupdate (correction)

2009-05-26 Diskussionsfäden Gebhardt Thomas
On Friday 22 May 2009, i wrote:

> and found that this is due to an unexpected behaviour of fai-debconf while
> performing a "fai softupdate" .

actually fai-debconf is doing quite well, it was all my fault. I was mocked
by a TAB that was transmogrified into separate spaces by cut&paste.

I used the output of getconf-get-selections (TAB separated fields) to feed
my fai debconf config file. By cut&paste the TAB separator was transformed
into two spaces. Debconf interpreted this input as two whitespace separators
with an empty field in between and fell back to a default value (here: local 
delivery only). This was also the default deboconf value from FAIBASE, so I 
blamed fai-debconf for this flaw until I realized what really happened here.

Sorry to bother you all. Cheers, Thomas





Re: make-fai-nfsroot errors

2009-05-26 Diskussionsfäden Thomas Lange
>>>>> On Tue, 26 May 2009 15:59:54 +0200, Ralf Utermann 
>>>>>  said:

> [...]
> Extracting templates from packages: 100%
> Can't call method "exists" on an undefined value at 
/usr/sbin/install_packages line 416,  line 44.
> install_packages exit code: 2

I guess you are missing this package in /etc/fai/NFSROOT

libapt-pkg-perl

-- 
regards Thomas


Re: concerning fai-chboot command

2009-05-28 Diskussionsfäden Thomas Lange
>>>>> On Thu, 28 May 2009 10:52:18 +0530, Rajesh pant  
>>>>> said:

> could anyone give me a detailed format of FAI-CHBOOT command.
The man page give several examples.

> And i have an assignment to install a machine using fai by this evening.
Join the #fai channel on irc.debian.org. There you can get help much
faster than via email.

> One more thing to ask there is no default file inside
> /srv/tftp/fai/pxelinux.cfg.
man fai-chboot tells how to create a default config file.

> eagerly waiting for help and suggestions.
In the meantime, you can read the man page again.

-- 
regards Thomas


Re: Starting a FAI installation using kexec - technical thread

2009-05-28 Diskussionsfäden Thomas Lange
>>>>> On Thu, 28 May 2009 12:56:15 +0200, Torsten Schlabach 
>>>>>  said:

> To ask a simple question:

> There is no FAI install kernel anymore; FAI is using a stock Debian 
> kernel now, right?
Yep, FAI is using a stock Debian kernel, which includes some
hooks/plugins for initramfs. We use the live-initramfs packages that
add some script into the initrd.

> Is there mabye a FAI initrd
You can find the "FAI initrd" inside the nfsroot. /srv/fai/nfsroot/./boot

> system" howto it says "the NFS support must be statically compiled into 
> the kernel".
That's not true nowadays.

> Also quite honestly I could use some pointer to understanding that /live 
> dir in the initrd which is used by FAI today ... What's in there which 
> is no longer in the NFS root for example? Does the whole install run out 
> of the /live dir now?
That's part of live-initramfs, but you do not need to care about this.
FAI is runnung from /. AFAIK /live is only used during boot, before a
pivot_root is done.

-- 
regards Thomas


Re: Starting a FAI installation using kexec - technical thread

2009-05-28 Diskussionsfäden Thomas Lange
>>>>> On Thu, 28 May 2009 15:38:45 +0200, Torsten Schlabach 
>>>>>  said:

> The question may be OT on this list, but has the ip=... kernel parameter 
> any meaning when using an initrd?
Have a look at 
/srv/fai/nfsroot/live/filesystem.dir/usr/share/man/man7/live-initramfs.7.gz

It describes all parameters of the live scripts.

-- 
regards Thomas


Re: Starting a FAI installation using kexec - technical thread

2009-05-28 Diskussionsfäden Thomas Lange
>>>>> On Thu, 28 May 2009 15:59:35 +0200, Torsten Schlabach 
>>>>>  said:

> 
/srv/fai/nfsroot/live/filesystem.dir/usr/share/man/man7/live-initramfs.7.gz
>> 
>> It describes all parameters of the live scripts.

> Where would I have to change them and what command will re-built my 
> initrd image afterwards with the changed parameters? I think I don't 
These are kernel command line parameters, so you do not need to modify
the nfsroot, just append the when booting your kernel.

I may be possible to hardcode them into live.conf, but I'm not sure.
-- 
regards Thomas


Re: FAI - Debian Lenny and Hardware with Multiple Ethernets

2009-06-04 Diskussionsfäden Thomas Lange
>>>>> On Thu, 04 Jun 2009 09:14:30 +0200, Carsten Aulbert 
>>>>>  said:

>> If there is a possibilty to ship a fixed initramfs for lenny inside
>> FAIs .deb repository I'm happy to fix this issue especially for FAI on
>> lenny.

> I would love to see that!
Hi folks,

thanks to Stefan for doing so much debugging on it and writing this
nice summary on this topic.

I could easily add the new version of live-initramfs (or was it
initramfs-tools.) into the koeln FAI repository, as I did this in the
past with mkinitrd-cd. But I'm not sure when I can test this on my
own, maybe not before august (because of work and vacations). So I
like to hear from other people, if this also works in their
environment, and not break a setup which is currently working without
problems. If I get some positive feedback, I will add the new version
into my FAI repository.

P.S.: I need the exact package names and version, I should put into
the koeln repository.
-- 
regards Thomas


Re: help to run FAI

2009-06-11 Diskussionsfäden Thomas Lange
>>>>> On Thu, 11 Jun 2009 11:04:56 +0530, Shankar Dutt  
>>>>> said:

> initrd =initrd.image-2.6.18-6-486
Seems, that you are using an old kernel version.
Which FAI version do you use?

> Mount unionfs on /root faild with option noatfine ,
Nowadays, FAI is using aufs instead of unionfs.

Also check you NFS exports settings.
-- 
regards Thomas


Re: Huh? pxelinux.0 missing after fai-setup

2009-06-11 Diskussionsfäden Thomas Lange
>>>>> On Thu, 11 Jun 2009 22:53:21 +0200, Robert Markula 
>>>>>  said:

> Running fai-setup exits just fine, no error messages, but the
> /srv/tftp/fai/pxelinux.0 file is missing. It just isn't created by
> fai-setup. What am I doing wrong?
Try again with add in -v, it;s ok to only run make-fai-nfsroot -v. The
output or log file should tell you that it copies the pxelinux.0 file.

-- 
regards Thomas


Re: Huh? pxelinux.0 missing after fai-setup

2009-06-12 Diskussionsfäden Thomas Lange
>>>>> On Fri, 12 Jun 2009 09:44:37 +0200, Robert Markula 
>>>>>  said:

> And that's the strange thing - even the verbose log does not show that
> the pxelinux.0 file is created. 
Check that the variable FAI_BOOT is not net, or set to dhcp. This
controls wether pxelinux.0 will be copied.
In the past this variable was set in /etc/fai, but nowadays it's not
set any more by default.
-- 
regards Thomas


Re: Enabling PXE from add-on cards

2009-06-12 Diskussionsfäden Thomas Lange
>>>>> On Fri, 12 Jun 2009 10:10:10 +0200, Carsten Aulbert 
>>>>>  said:

> We received two batches of machines recently and they now all have PCIe
> x1 e1000e based Intel NICs as an add-on card.

> However, I can only seem to get the BIOS to recognize some of these
> cards although they look rather similar to each other, thus my questions:

> * Apart from this, has anyone some link to a guideline for Intel based
> NICs how to ensure that the cards are PXE capable as well as how to make
> them recognized by the systems BIOS?
IMO all newer card should have PXE. With intel cards you can type
ctrl-s to enter the "bios" of the nic, where you can enable the PXE
feature. Some motherboard BIOSes do not show the netbooting option
(often called MBA UNDI), unless you have enabled the BOOT ROM feature
for the onboard network card. I do not know if this also applies for
add-on nics.

-- 
regards Thomas


Re: Huh? pxelinux.0 missing after fai-setup

2009-06-12 Diskussionsfäden Thomas Lange
>>>>> On Fri, 12 Jun 2009 11:40:42 +0200, Robert Markula 
>>>>>  said:

> Hmm, I get exactly the same results with either
> FAI_BOOT=
> and
> FAI_BOOT=dhcp
> and even without this option at all
Did you installed the package syslinux or syslinux-common on your
install server?
-- 
regards Thomas


Re: FAI ignores base.tgz in /basefiles

2009-06-15 Diskussionsfäden Thomas Neumann
hiya

Henning Sprang wrote:
> Jens Classen wrote:
>> It takes notice of the archie though, as
>> renaming the archive to UBUNTU.tar.gz brings up an error message, that
>> only tgz-files are supported.

> Strange. Until recently, it was the exact contrary - only tar.gz was
> supported.

> ( @Thomas: Changing it that way is not a good idea in my opinion,
> because it breaks compatibility with existing setups, and it would be
> simply nice and convenient for users to accept .tar.gz _and_ .tgz. )

I second that motion. The .tar.gz and base.tgz difference is
something that irks me too - but back then I shrugged it off as "It's just
the way it is."

tschüß
thomas




Re: need Debian default password

2009-06-15 Diskussionsfäden Thomas Neumann
hiya

> Debian GNU/Linux 4.0 demohost tty1
> demohost Login:
>
> I tried many combination of user name  and password but could not do login
>
> what is the default username and password ?

Maybe you should have tried reading the documentation instead. Especially
how to configure the base installation. Or ask the one who did this for
you.

The responsible package is fai-server, which installs a config file name
"/etc/fai/make-fai-nfsroot.conf"


# the encrypted (with md5 or crypt) root password on all install clients
during
# installation process; used when log in via ssh; default pw is: fai
FAI_ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'






If you sense a small, light, unpleasant subnote from this mail, then I'm
afraid you are right. Sorry about that, but I get the feeling both of you
(Rajesh pant and you) don't invest at least a little bit of time in
looking and prodding around by yourself. Instead I get the impression both
of you you just ask the list whenever you are stuck at some point.

This may be a false impression on my part and if it is, then please accept
my apology. But it's the impression I get by reading your questions. I
just can give my kudos to all the members who try to stay calm and
diligently answer your questions.


[I will cease the hostilities now. If I see no change I'll just quietly
ignore both of you in the future. If you want to answer on this drivel,
then please write directly to me. If you think I'm a bad bad boy, then
please just ignore me. No-need for a flamewar.

If Michael, Henning or Thomas think I'm acting way out of line - please
unsubscribe me for the sake of all others.

Let's keep the list clean and nicely on-topic!

Thanks for your cooperation.]


Re: Patching kernel with aufs (riding a dead horse?)

2009-06-15 Diskussionsfäden Martin Thomas

Hello list,

I hope this thread is still alive. 

Since the NICs of our new Dell Optiplex 960 are not supported by the Debian 
stock kernel, we have been forced to look for a solution how to get aufs into a 
newer kernel. For Linux 2.6.28.10, the following, which is mostly based on 
Michael's inspirations and the Debian Linux Kernel Handbook, worked out for us 
and might also help others. Any comments, especially advice for improvement, 
are/is highly appreciated.

1. From the configured pristine kernel sources linux-2.6.28.10 create the 
kernel package according to the handbook via:

   $ make-kpkg clean
   $ fakeroot make-kpkg --initrd --revision=build.1.0 kernel_image

2. Then download and install the testing(!) version of aufs-source.

3. Make the aufs-module package for the built kernel via:
   
   # m-a -k  -l 2.6.28.10 build aufs-source

4. Put the two created packages into a local repository which you have access 
to from the chroot environment 
generated during the build process of the nfsroot,
e. g. via http, and add the repository to the FAI sources.list, e.g. via:

   # echo "deb http:/// lenny main" >> 
/etc/fai/apt/sources.list

5. Add kernel image and aufs-modules package to /etc/fai/NFSROOT and remove the 
stock versions of both packages usually to be found there.

6. Rebuild the nfsroot via fai-setup -v.

7. Now you should find both the built kernel and an appropriate initrd in the 
tftproot. 
   You can check whether the latter has aufs support via:

   $ zcat initrd.img-2.6.26.10 | cpio -i.

   In lib/modules/2.6.28.10/kernel/fs/aufs there should be the aufs module.

8. You can now install your clients, for example with

   # fai-chboot -s2.6.28.10  -IFv.

If you want your clients to install the customized kernel too, add the created 
kernel image to the corresponding package list in $CONFIGSPACE/package_config 
(and remove the old one).

Hope this helps.

Martin
   


  



Re: [darkness...@web.de: Re: Using faimond]

2009-06-15 Diskussionsfäden Thomas Lange
>>>>> On Tue, 16 Jun 2009 08:38:00 +0200, Nils Unterweger  
>>>>> said:

> I think for faimond-gui I need an running X-System?
Yep.
man faimond-gui tells you how to call it:

   faimond | faimond-gui -

-- 
regards Thomas


Re: Setup FAI to other distribution

2009-07-12 Diskussionsfäden Thomas Lange
>>>>> On Fri, 10 Jul 2009 10:21:49 +0200, Henning Sprang  
>>>>> said:

> Riza Nuari wrote:

>> E: No such script: /usr/share/debootstrap/scripts/jaunty
>> chroot: cannot run command `apt-get': No such file or directory
>> Creating base.tgz

> It'sd really ugly that FIA continues from here because that'stotally
> useless.
> But it is because debootstrap on hardy cannot bootstrap jaunty.
In newer version of FAI, it is tested if debootstrap had succeded.
If not (it tests if apt-get is available in the chroot),
make-fai-nfsroot will not go on. This was bug #524369 which was
closed in FAI 3.2.18. 
-- 
regards Thomas


Re: Kernel just stops

2009-07-14 Diskussionsfäden Thomas Lange
>>>>> On Tue, 14 Jul 2009 17:53:49 +0200, Christoph Kluenter  
>>>>> said:

> I have a Computer that doesn't want to boot via PXE
> It loads the initrd and the kernel and after the dots it just says
> "Ready" and nothing happens anymore. 
> Other computers boot and work perfectly using the same cable.
> And this computer boots knoppix via PXE just fine.

> Has anybody seen something like this ?
No.
Try memtest86+ and try a 486 kernel.

-- 
regards Thomas


Re: Changing the BIOS boot order in linux

2009-07-18 Diskussionsfäden Thomas Lange
>>>>> On Sat, 18 Jul 2009 18:29:34 +0530, Sridhar Kumar Kotturu 
>>>>>  said:

> It seems in the Linux, it is NOT possible to change BIOS boot order in
> running LINUX box.
AFAIK it's not possible. There may be some hacks, but these don't work
on all machines. In FAI, the machines always boot from network via PXE
(so no changes in the BIOS) and get different configs that told them
to do the installation or to boot from local disk after the
installation finished.

-- 
regards Thomas


Re: No SERVER in my boot.log

2009-07-21 Diskussionsfäden Thomas Lange
>>>>> On Tue, 21 Jul 2009 16:56:32 +0200, Torsten Schlabach 
>>>>>  said:

> I have been digging a bit and I found that faimond variable is set in
> task_confdir() in subroutines-linux. The code tests if $monserver has
> been set (where could I set this) and in case it's not set, it sets this
> to the value of $SERVER.

> Just $SERVER is empty as well while all other variables which I expect
> in boot.log (like $NETMARK, $IPADDR, ...) are set.
Check your dhcpd.conf. IIRC it's server-name.

> I tried setting monserver in my DEFAULT.var so it would not get
> overwritten with the empty value of $SERVER, but this also doesn't seem
> to work.
FAI need the variable monserver before the script class/*.var are
executed. So, it's too late to the this variable there.

-- 
regards Thomas


Re: No SERVER in my boot.log

2009-07-21 Diskussionsfäden Thomas Lange
>>>>> On Tue, 21 Jul 2009 17:23:58 +0200, Torsten Schlabach 
>>>>>  said:

> No if I don't do DHCP, my only option would be to define monserver in
> fai.conf?
Yep. Good idea.

-- 
regards Thomas


Re: fai-quickstart & tftpd-hpa

2009-07-21 Diskussionsfäden Thomas Lange
>>>>> On Tue, 21 Jul 2009 15:54:15 -0500, "John G. Heim"  
>>>>> said:

> Can I safely uninstall fai-quickstart on my FAI server?
Hi John,

sure you can. It's just a package for easier installation packages
that are needed by a default FAI setup.
-- 
regards Thomas


Re: Does setup-storage support lazyformat yet?

2009-07-23 Diskussionsfäden Thomas Lange
>>>>> On Thu, 23 Jul 2009 14:55:14 +0200, Torsten Schlabach 
>>>>>  said:

> http://faiwiki.informatik.uni-koeln.de/index.php/Setup-storage
Not sure, but man setup-storage should be up to date.

-- 
regards Thomas


Re: Problem boot client, nfsmount: need a path

2009-08-07 Diskussionsfäden Thomas Lange
>>>>> On Fri, 07 Aug 2009 17:58:06 +0200, Wim De Geeter 
>>>>>  said:

> I got the pxelinux.0 file from my faiserver.  Get all the info from my 
> DHCP (ip, gateway, dns, ...) but is hanging than with:
> nfsmount: need a path
man fai-chboot

This tells you how to generate a pxelinux.cfg file gor your install
client.

-- 
regards Thomas


Re: ERROR: NFSROOT directory ... is mounted using nosuid or nodev

2009-08-10 Diskussionsfäden Thomas Lange
>>>>> On Mon, 10 Aug 2009 12:10:02 +0200, Peter Bittner 
>>>>>  said:

> I have changed some minor things (such as the server's IP address,
> hostname, fixed the contents of /etc/fai/make-fai-nfsroot.conf as
> pointed out in the mailing list somewhere - TFTPROOT was missing, edited
> make-fai-nfsroot.conf and fai.conf) and then I tried to run `fai-setup
> -v`, but I always get the following error:

>   ERROR: NFSROOT directory /srv/fai/nfsroot/live/filesystem.dir is
> mounted using nosuid or nodev. Aborting

> Any hints what the problem may be and how I can fix this issue?
Read the error message. It says, that you have mounted the directory (maybe
/srv) with options nosuid or nodev. This does not work. Change the
mount options in /etc/fstab, remove nosuid and/or nodev and try again.
-- 
regards Thomas


Re: lenny install: some problems with aptitude, and/or kernel?

2009-08-25 Diskussionsfäden Thomas Neumann
hiya

> 1. Installing a kernel using a class and "PACKAGES aptitude" fails with
> a message about a missing "initrd = yes" statement in
> ${target}/etc/kernel-img.conf
[...]
> I worked around this problem by creating this custom script to install
> the kernel later:

Why don't you use the hooks?

1)


#! /bin/bash
[...]

# copy default kernel config file
[ -s $target/etc/kernel-img.conf ] || fcopy -Bi /etc/kernel-img.conf

-- $FAI/hooks/instsoft.DEFAULT

2)


# Kernel Image management overrides
# See kernel-img.conf(5) for details

# don't create symlinks in boot
# don't need these, since grub offers better options
do_symlinks = NO

# prevent the kernel-image post installation script from
# issuing a warning when installing an  initrd  kernel.
#   formerly known as "do_initrd" with inverted meaning
warn_initrd = NO

$FAI/files/etc/kernel-img.conf/DEFAULT

[My contents is a little bit different, customize to your needs.]


This should do the trick. In short: Before the task_instsoft is run, the
hook get's called and makes sure an appropriate file is copied to
/target/etc/ . Please make sure that the hook and the file both refer to
the same classname, e.g. DEFAULT.


In a later mail you wrote there's some fallout which may be a consequence
of the missing kernel. I'm not sure this is a correct assumption, because
Debian and Ubuntu can both be installed with no kernel at all.


Try the stuff above and tell us if it helped.

tschüß
thomas



Re: Problem with Intel igb network driver on client

2009-08-31 Diskussionsfäden Thomas Lange
>>>>> On Tue, 01 Sep 2009 07:49:22 +0200, Gordon Grubert 
>>>>>  said:

> Supermicro X8DTU. Sorry, but I could not find the exact
> network chipset description. On the server everything is
> running fine.
Run lspci (maybe from a live CD like grml) and you should see which
network card this is.

> In the nfsroot, the module igb.ko is present. Probably, it
> was copied by make-fai-nfsroot from the server (same
> architecture, kernel etc. on the server and the new client).
> Inside the nfsroot, the module is listed in the file
> /usr/share/initramfs-tools/hook-functions in the
> function auto_add_modules(), too.
Yes, in my initrd the igb driver is also available. It seems to be
available by default.

> Booting the client, the PXE boot process begins, the
> initrd is loaded followed by:

> Monting root file system ... ...
> Uniform multi-platform E-ide-driver
> ... ide0 ...
> ... ide1 ...
> Kernel panic - not syncing: Attempt to kill init!
Mmm, did you spacify boot-live in your pxelinux/cfg config file?

> I do not know, why the igb driver is obviously not found.
> IMHO, the testing of the ide modules (to find the root file
> system) is caused by the file (inside the nfsroot)
Why should IDE modules be needed when trying to mount the nfsroot? Do
you boot from network or from CD?

-- 
regards Thomas


Re: Problem with Intel igb network driver on client

2009-09-01 Diskussionsfäden Thomas Lange
>>>>> On Tue, 01 Sep 2009 09:02:19 +0200, Gordon Grubert 
>>>>>  said:

> I'm booting from network. But I'm a little bit confused because there
> is the message to boot the root file system followed by an ide output
> before the kernel panic occurs.
I'm also wondering why this happens. IIRC there's a kernel option that
disables ide probing. Maybe it's not a problem of the network card,
but of a broken ide driver. Try to disable ide support, maybe just
remove the ide driver from the initrd.
-- 
regards Thomas


Re: grub issues during FAI install

2009-09-01 Diskussionsfäden Thomas Neumann
hiya

>> For whatever reason this has happened: it shouldn't. There could be
>> several reasons to have multiple bootable devices (e.g. different
>> OSes), and they should be selectable in the BIOS.
[...]
> As long as we stay with grub (I have no other suggestion to make),
> booting different operating systems should be attainable by modifying
> menu.lst appropriately, and should imho have nothing to do with the
> BIOS settings of the machine(s) in question.

You are both correct?

There are good reasons to have different bootloaders on different disks
(MBRs, partitions, whatever) but there are also good reasons to copy the
same bootloader to different devices.

In my opinion, fai should be able to support both options. I don't mind
the  default behaviour, as long as I'm able to change it to my needs.


Use cases that come to mind:

- single disk / single os
- multiple disk / single os -> raid configuration
- multiple disk / single os -> separate system and data disk
- multiple disks / multiple os -> OS select via grub
- multiple disks / multiple os -> OS select via bios
- no bootloader at all

Also chosing between installing the bootloader in the mbr or in a
partition is a nice feature to keep.

tschüß
thomas



Re: Problem with Intel igb network driver on client

2009-09-01 Diskussionsfäden Thomas Lange
>>>>> On Tue, 01 Sep 2009 13:45:16 +0200, Gordon Grubert 
>>>>>  said:

> General question:
> There are TWO initial ram disks: i) inside the nfsroot and
> ii) located for the tftpd boot process.
> What is the role of both these initrd files?
These must be equal, because fai-setup and make-fai-nfsroot copies the
initrd from inside the nfsroot to the tftp directory.


> But why the root file system cannot be loaded?
Did you check your exports entries on the fai install server? Can you
see any mount requests on the fai install server?

-- 
regards Thomas


Re: Problem with Intel igb network driver on client

2009-09-01 Diskussionsfäden Thomas Lange
>>>>> On Tue, 1 Sep 2009 13:57:41 +0200, Christian Quast  
>>>>> said:

> I took the kernel deb file and the corresponding aufs-modules deb (not 
sure if 
> this was needed) and installed it in the nfsroot (mount proc, dev, 
sys,...; 
Yes, the aufs-modulesdeb is required.

-- 
regards Thomas


Re: Specifying sizes in setup-storage

2009-09-01 Diskussionsfäden Thomas Lange
>>>>> On Tue, 01 Sep 2009 19:22:20 +0200, Michael Goetze  
>>>>> said:

> Hi,
> I'd like to create a swap partition which is 20% of the size of the
> disk, but at most 4GB. I tried the following setup-storage configuration:
Which is the total size of your disk?

> disk_config disk1 disklabel:msdos bootable:1

> primary/boot 192-256ext3   rw
> primary- 4G--  -

> disk_config lvm
> vg vg0 disk1.2
> vg0-swap  swap  20%-4G  swap   rw
> vg0-root  / 80%-ext3   rw,errors=remount-ro

IMO you defined to create a swap partition, which is at least 20% of
your disk, but should not be bigger than 4GB. This may be
self-contradictory for your disk size.
-- 
regards Thomas


Re: Specifying sizes in setup-storage

2009-09-02 Diskussionsfäden Thomas Neumann
hiya

>> IMO you defined to create a swap partition, which is at least 20% of
>> your disk, but should not be bigger than 4GB. This may be
>> self-contradictory for your disk size.

> Sure, I understand why this configuration fails. What I don't understand
> is how to get the desired effect. For instance, if I write 1G-4G, I get
> 3.4G on an 80G disk. But I want 4G in this case...

Write a hook that acts between the disk_config template and setup_storage
and has some more sophisticated logic?

At least that's the way I chose to be able to provide different volume
group names and/or different filesystems for different environments
without creating 25something templates which basically all tell the same
story.

[Added bonus: This way I can control volumegroup names and filesystems
even on a per-host base.]

I've attached the relevant files.
- copy DISKlvm to disk_config/
- copy partition.DISKlvm to hooks/
- define a class DISKlvm during class/ scripts

I think that's it. This hook does not configure filesystem sizes yet, but
that's probably not too hard to implement.

Warning: I wrote this quite some time ago. It worked since then and I
never bothered to review the code.

tschüß
thomas

partition.DISKlvm
Description: Binary data


DISKlvm
Description: Binary data


Re: Fai on Ubuntu 9.10 status?

2009-09-04 Diskussionsfäden Thomas Lange
>>>>> On Thu, 03 Sep 2009 21:42:14 +0200, adrian15  said:

> Thomas Lange and I did some work together on improving the FAI Ubuntu 
> package so that it worked on Ubuntu 9.10.
We (three people) decided to remove the fai packages from Ubuntu 9.10,
since currently there's nobody that has time to care about the
packages and to bring them in a releasable state.

-- 
regards Thomas


Re: Fai on Ubuntu 9.10 status?

2009-09-04 Diskussionsfäden Thomas Lange
>>>>> On Fri, 04 Sep 2009 16:47:51 +0200, Per Foreby  said:

> Our setup depends heavily on softupdate, and we're in the process of
> switching from Debian to Ubuntu on desktop, so this sounds like bad news.
I can only care about FAI in Debian. In the past Ubuntu often changed
things that broke FAI. So I myself will not switch to Ubuntu. But you could
make a lot of people happy by helping care about the FAI packages in
Ubuntu.

> But (as far as I know) fai only consists of shell, perl and cfengine
> scripts, so I suppose we can use the lenny version from the fai 
repository?
"It's not done until tested".

I also would guess that using FAI packages from lenny (or more recent
ones from my repository) for softupdates should work, but you never
know what Ubuntu has changed and what may brake things in FAI. 

-- 
regards Thomas


Re: Profile based installation (not based on MAC address or hostname)

2009-09-08 Diskussionsfäden Thomas Neumann
hiya

Peter Bittner schrieb:
> (Sorry in advance if this question is completely basic and I should have
> found out myself... I didn't find a solution in the documentation.)
>
> I need to set up a FAI server that provides a - what I believe - rather
> flexible installation service based on profiles, not on host names, or
> MAC addresses.
>
>   1. The system administrator should plug in a virgin PC an let it boot
> from the network;
>   2. While the PC broadcasts its MAC address the administrator would
> open a web interface on the FAI server which lists the MAC address of
> the PC requesting installation;
>   3. The administrator selects the MAC address, and specifies what to
> install on this PC: an installation profile (e.g. "DEVELOPMENT",
> "TERMINAL", "CALCNODE", etc.), an IP address, a hostname.

I think that's doable, but you're operating in a limited timeframe. So far
i haven't seen a pxe-bootclient that doesn't timeout.

Somebody on this list implemented a python tftp-server which does some
rewriting. Maybe that's a better solution. Defaultboot every
netboot-client into tftp and let the server decide what to do - e.g. boot
from local disc or wait for administrator interaction via webgui. (I'm not
sure if there's another timeout.)

If you've got that far, then the rest is easy. Just let the tftpserver
supply an additional parameter (like "FAI_PROFILE=DESKTOP") and use this
parameter in a class/ script
to define the according classes.


I guessed the point is to have no interaction with the installclient
except from pushing the power-button. Else other options are available.

tschüß
thomas



Re: Anatomy of an FAI run?

2009-09-09 Diskussionsfäden Thomas Lange
>>>>> On Wed, 9 Sep 2009 10:33:39 +0100, Joel Merrick  
>>>>> said:

> Yes, I've read through it several times.. just wondered if a diagram
> or flow-chart existed so I could show my colleagues without having to
> get them them read too much.
There's another diagram on FAI:
http://www.the-greenman.net/files/fai.gif

BTW, I'm always very interested in user experiences with FAI. Can you
please fill out the FAI questionnaire
http://www.informatik.uni-koeln.de/fai/questionnaire
and send it back to me when you finished a project with fai.
-- 
regards Thomas


Re: Profile based installation (not based on MAC address or hostname)

2009-09-09 Diskussionsfäden Thomas Lange
>>>>> On Wed, 09 Sep 2009 11:07:02 +0200, Peter Bittner 
>>>>>  said:

> It's good to be reminded though (thanks Michael Goetze!) that there
> still *is* the possibility of interaction. In the FAI context you tend
> to forget about this... :-)

Yep, normally FAI like to be _fully_ automatically, but you can have
manual interaction. Have a look at this example
http://www.informatik.uni-koeln.de/fai/download/developers/30menu.source
-- 
regards Thomas


Re: Profile based installation (not based on MAC address or hostname)

2009-09-09 Diskussionsfäden Thomas Neumann
>> If you've got that far, then the rest is easy. Just let the tftpserver
>> supply an additional parameter (like "FAI_PROFILE=DESKTOP") and use this
>> parameter in a class/ script to define the according classes.

> Right. I believe I would do this with the fai-chboot command. I can't
> see an option there that allows me to specify the FAI_PROFILE. Can you
> suggest how I must do it?

You have to write a custom script and save it under $FAI/class/.

Something simple like a bash script containing a switch/case statement
which echos the correct classes may already suffice.

tschüß
thomas







Re: FAI Djangofied

2009-09-10 Diskussionsfäden Thomas Lange
>>>>> On Thu, 10 Sep 2009 17:45:23 +0200, Peter Bittner 
>>>>>  said:

> In order to make your application work the default tftpd server
> installed with FAI needs to be replaced by the patched TFTPy. Does this
    > have any negative consequences? @Thomas: If faimgr turns out to be 
popular will
> the default tftp server be TFTPy in future FAI releases?
I don't think that TFTPy will become the default for FAI. The package
fai-server recommends tftpd-hpa or tftpd, so you can choose whatever
you like. Currently, I do not like to use a python implementation as
default daemon.

-- 
regards Thomas


Re: fai for BOSS operating system

2009-09-15 Diskussionsfäden Thomas Lange
>>>>> On Tue, 15 Sep 2009 15:56:17 +0530, Rajesh pant  
>>>>> said:

> r...@mca62[~]#pbuilder --create
> W: /root/.pbuilderrc does not exist
> Distribution is sid.
> Building the build environment
-> running cdebootstrap
> /usr/bin/cdebootstrap
> P: Retrieving Release

> it just stuck at this point and then i have to terminate the command
> forcefully.
I would try debootstrap --verbose .. instead

-- 
regards Thomas


Re: I want to set up a cluster using FAI

2009-09-23 Diskussionsfäden Thomas Lange
>>>>> On Wed, 23 Sep 2009 13:59:51 +0530, alind sharma  
>>>>> said:

>- I have install debian (squeeze) on master node and same on a slave
>node.
This sound to me like a Beowuld cluster. There a whole chapter in the
FAI guide about how to install Beowulf cluster. Even this chapter is
not up to date, you will get the idea how to do this with fai.

IMO it's way to easy just to say the FAI guide does not help me, so
now please guide me. Please read the guide again.
-- 
regards Thomas


Re: setup-storage: set vgname to hostname

2009-09-24 Diskussionsfäden Thomas Lange
>>>>> On Thu, 24 Sep 2009 10:47:50 +0200, Darshaka Pathirana  
>>>>> said:

> Is there a way to set the vg-name same as the current hostname?
> Something like this (which does NOT work):

> ,
> | disk_config sda bootable:1 fstabkey:uuid
> | primary  /boot 250   ext3  rw
> | primary  - 1500-   - -
> | disk_config lvm
> | vg $HOSTNAME sda2
> | $HOSTNAME-root  /   250-  ext3  rw,errors=remount-ro
> | $HOSTNAME-swap  swap250-1000  swap  sw
> | $HOSTNAME-var   /var500-2Gext3  rw createopts="-m15" 
tuneopts="-c0 -i0"
> | $HOSTNAME-tmp   /tmp250-1000  ext3  rw createopts="-m1"  
tuneopts="-c0 -i0"
> | $HOSTNAME-usr   /usr500-3Gext3  rw   
tuneopts="-c0 -i0"
> | $HOSTNAME-home  /home   100-2Gext3  rw,nosuid  createopts="-m1" 
tuneopts="-c0 -i10"
> `
You can write a hook that replaces $HOSTNAME with the current
hostname. This is the easiest way.

-- 
regards Thomas


Re: setup-storage: set vgname to hostname

2009-09-24 Diskussionsfäden Thomas Neumann
> You can write a hook that replaces $HOSTNAME with the current
> hostname. This is the easiest way.

As a bonus: It even works!

;)

tschüß
thomas



Re: Adding to $kernelmodules

2009-09-24 Diskussionsfäden Thomas Lange
>>>>> On Thu, 24 Sep 2009 10:45:39 -0500, "John G. Heim"  
>>>>> said:

> I am trying to load a module during installation. I found a note in the 
file 

> FAIBASE.var that I can do that by adding the module name to 
$kernelmodules. 
> But I'm not sure how to do that. I tried adding it in that same file as 
> shown below but it does not work:

> # MODULESLIST contains modules that will be loaded by the new system,
> kernelmodules="speakup_ltlk $kernelmodules"
> What is the correct way to add a module to $kernelmodules?

Hi John,

$kernelmodules is the right way to do this, but not in
FAIBASE.var. The variable is used in 20-hwdetect.source, which is
executed before FAIBASSE.var is sourced. You can just edit your
20-hwdetect.source script and add modules there to $kernelmodules.

-- 
best regards Thomas


Providing Defaults to class/ scripts (was:: Adding to $kernelmodules)

2009-09-24 Diskussionsfäden Thomas Neumann
hiya

> $kernelmodules is the right way to do this, but not in
> FAIBASE.var. The variable is used in 20-hwdetect.source, which is
> executed before FAIBASSE.var is sourced. You can just edit your
> 20-hwdetect.source script and add modules there to $kernelmodules.

Is there a "correct" way to provide variables to scripts in class/ ?

Currently I'm manually sourcing a specific file into (almost) each class/
script. In the following steps (partitioning, packages, configure) I use
the .var mechanism. I'm searching for something close to that for
class/ itself. Maybe DEFAULT.var could be sourced even before class/ has
run? The DEFAULT class is announced automatically later on anyway.

(What for? Inside class/ I'm writing some configuration stuff into a
special config file. The class scripts all manually source DEFAULT.var in
order to find out where the variable IDENTITYFILE points to. The other
scripts (most importantly config/*) later on just "source $IDENTITYFILE"
wherever that variable may point to.)

tschüß
thomas



Re: Mixed Etch and Lenny? How to...

2009-09-25 Diskussionsfäden Thomas Lange
>>>>> On Fri, 18 Sep 2009 08:06:26 +0200, Robert Markula 
>>>>>  said:

>> just to make it perfectly clear, from what I've read on the list, it 
really
>> needs to be MYCLASS.tar.gz - MYCLASS.tgz will not be recognized (even 
though
>> it's base.tgz, not base.tar.gz).

In the next version of FAI the suffix .tgz will be supported.\
Currently, fai will give you a warning that this suffix is not
supported.
-- 
regards Thomas


Re: restarting services if config files were changed

2009-09-29 Diskussionsfäden Thomas Lange
>>>>> On Mon, 28 Sep 2009 21:29:44 +0200, Andreas Schuldei 
>>>>>  said:

> i am in the process to create infrastructure for restarting
> services which configuration files changed in the current
> softupdate run.

> currently i plan to set a flag (in an environment variable like
> RESTART_FOO). since different services have different
> restart/reload/whatnot commands i plan to put the restart/reload
> command INTO the variable like this:
> RESTART_FOO="/etc/init.d/FOO restart"

You may want to use the postinst script of fcopy(8) to write the
variables to a file. This postinst script will only be executed, if
fcopy changed the target file.
-- 
regards Thomas


Re: setup-storage: set vgname to hostname

2009-09-29 Diskussionsfäden Thomas Neumann
hiya

> Thomas Neumann a écrit :
>>> You can write a hook that replaces $HOSTNAME with the current
>>> hostname. This is the easiest way.

>> As a bonus: It even works!

> do you know wich variable we could use in a way that is supported by FAI
> . I mean using a variable like $HOSTNAME or whatever would be great but
> only if this is a normal behavior and not an edge condition as if i
> upgrade FAI i do not want to have all my partition system stop working.
> Could you tell us your advice and variable list we could or should not use
> ?

I prefer using my own variables in my own namespace and initialize them
from a "known good" source - like $HOSTNAME. This may not be the most
obvious solution, but this way you can guarantee that "your" variable has
a valid value. And if $HOSTNAME turns out to be unrealiable - or undesired
- then you could easily change the source (like maybe retrieving the value
from an external database.) without having to wade through the rest of the
source code trying hard not to introduce new bugs.

tschüß
thomas




Re: amd64 kernel, but 32bits packages installed?

2009-09-30 Diskussionsfäden Thomas Lange
>>>>> On Wed, 30 Sep 2009 12:03:27 +0200, Leen Smit  
>>>>> said:

> Im trying to roll out a 64bit host, and I'm succesfull in so far, that I 
> get the right kernel...And thats all the success I'm having..

> If I check the fai.log, I now see both I386 and AMD64 in the list of all 
> classes.
> Can anyone tell me where I'm going wrong with this??

> I've added a case select to /class/10-base
> prd-as-023)
> echo X86_64 LENNY


> Basically, I just want to know how can I tell the client to install a 
> 64bit system, and not 32??
If you want to install a 64bit system on your client, you must boot a
64bit kernel and use a 64bit nfsroot during the installation. Have a
look at your fai.log if this is correct in your environment.

-- 
regards Thomas


Re: amd64 kernel, but 32bits packages installed?

2009-09-30 Diskussionsfäden Thomas Neumann
>>>>>> On Wed, 30 Sep 2009 12:03:27 +0200, Leen Smit
> If you want to install a 64bit system on your client, you must boot a
> 64bit kernel and use a 64bit nfsroot during the installation. Have a
> look at your fai.log if this is correct in your environment.

64bit nfsroot can install 64 and 32 bit clients
32bit nfsroot can only install 32bit clients

I'm using 32bit nfsroots only as a fallback on old hardware and on 32bit
VMware clients. (Paravirtualization can not be enabled while trying to run
using a 64bit nfsroot/kernel. Either disable PV during install or boot
32bit.)

tschüß
thomas

P.S.: At least with VMware ESX 3.5 / ESX 3.5i.



Re: amd64 kernel, but 32bits packages installed?

2009-10-01 Diskussionsfäden Thomas Neumann
hiya

> And how does make-nfsroot determine wether to install 64 bit nfsroot??
> I've been following these guides :

It's been a long time (3.2.4?) since I build my nfs roots, but I think I
did these steps:

- install a Debian box manually with 64 bit arch
- add fai repositories if necessary
- setup fai
- make-fai-nfsroot

At this point you have a fai installation able to install 64bit Debian
clients.

>From here there are three options:

a) create appropriate "base.tgz" for each distribution / arch you want to
install
b) modify debootstrap behaviour
c) both


a) should be obvious - debootstrap the required distributions and create
appriprately named .tar.gz / .tgz

b) is a bit more tricky - in the end I wrote a new task_extrbase hook,
which completely replaces the fai-provided one. But then again, I'm also
installing SuSE via FAI, so my config is weird anyway.

Just adding --arch=i386 to FAI_DEBOOTSTRAP_OPTS may indeed be all you need
for your config.

Additionally:
At least with debian the kernel images for x86_32 and x86_64 have
different names. Ubuntu is less picky.

tschüß
thomas



Re: Split between initramfs and nfsroot in FAI

2009-10-06 Diskussionsfäden Thomas Lange
>>>>> On Tue, 06 Oct 2009 15:18:59 +0200, Torsten Schlabach 
>>>>>  said:

> Actually, I understand that the FAI installation proecess is based on
> the Debian live system and that the Debian live system is based on
> initramfs. So IIUC, what will happen on the install client is:
FAi is only using a part of Debian live, it only uses the
live-initramfs package.

> 1. kernel is loaded.
> 2. initramfs including Debian live system is loaded and the Debian live
> system is started.
> 3. The nfsroot is mounted via NFS and made the root filesystem,
> replacing the live system root file system which is in the initramfs.
> 4. The installation script starts which will mount the config space,
> then perform the actual installation.
Yep, this is right.

> 1. Is the network configuration done in step 2 (i.e. entirely inside the
> initramfs) or is there any re-configuration of the network settings
> after the root filesystem change? (Obviously, /etc/hosts will be a
> different one after the root filesystem has been changed to the NFS
> mounted one, but I am more after ipconfig stuff.
ipconfig stuff is done inside the initrd. But also the kernel itself
is doing some network things, for example detecting and activating the
network interfaces.

> 2. What do we need the NFS mounted root filesystem for? What does it
The nfsroot contains more than 300MB of software. It contains all
software (like parted, ssh, perl, setup-harddisks,..) which is not
available in the initrd, but needed by FAI. The initrd also only
contains the busybox version of programs like ls, df,... But I like to
use the standard version, which have more options.
So, IMO we really need the nfsroot.
-- 
regards Thomas


Re: ssh keys acceptation in log saving phase and interfaces selection for automated install

2009-10-07 Diskussionsfäden Thomas Lange
>>>>> On Wed, 7 Oct 2009 13:33:32 +0200, Luká? Oliva  
>>>>> said:

> 1) During the log saving phase, the installed machine tries to copy
> all logs by rcp (I suppose) which is only link for ssh, so it asks to
> confirm acceptation of keys which must be accepted by keyboard. I
> thought of distributing certificates during the installation, but it
> is such usual thing that there must be some better way how to resolve
> it.

> 3) The third thing is that the fai installation does not change in the
> end the status of the installed machine. So after successfull
> installation, it reboots and install again. I thought I used wrong
> switch on fai-.chboot but I have not found any clues in man page.

Those two issues are the cause of your wrong setting of
FAI_LOGPROTO. But since you are using rsh, I gues you are using an old
FAI version. The new version have ssh enabled by default (in fai.conf: 
FAI_LOGPROTO=ssh)

Check your settings and call fai-setup again, which should setup the
ssh keys, so your root account can save the log files onto your
install server without asking for the passeord.
-- 
regards Thomas



Report of two big FAI installations

2009-10-12 Diskussionsfäden Thomas Lange
Hello everybody,

I like to point you on the list of happy FAI users, which answered the
FAI questionnaire. In the last few days, I got two more additional
entries, which are amazing in my oppinion.

The last entry is from a french visual effects company, which manage
about 1000 machines using FAI. On their website you find some nice
videos of their work.

http://www.informatik.uni-koeln.de/fai/q-answers.html#buf

The next entry is from an anonymous user, who manages more than 3000
servers using multiple distributions, all managed with FAI.
For more details on their environment and setup, have a look at
http://www.informatik.uni-koeln.de/fai/q-answers.html

I also got some more questionnaires this year, which are all included
in the list. If you like to join this list, please fill out the FAI
questionnaires and send it back to me.

-- 
regards Thomas


Re: Read-only filesystem after moving to new server

2009-10-12 Diskussionsfäden Thomas Lange
>>>>> On Mon, 12 Oct 2009 16:56:07 +0200, Leen Smit  
>>>>> said:

> The problem is that I can never get out off the initrd on to the actual 
> fai installation this way..

> Im really lost at this point, since I cant seem to get the old setup 
> working, nor a new one!
> Any help would be greatly appreciated... If more info is needed all be 
> glad to post that here!
I would try to get another machine (without a card that needs bnx2)
running with your new setup. This way you can check if the network
driver is the real problem or if there are other bugs in your setup.

-- 
regards Thomas


Re: Read-only filesystem after moving to new server

2009-10-12 Diskussionsfäden Thomas Neumann
hiya

> I've found that a "clean" roll-put with lenny wont work, im getting
> kernel panics errors again. But is probably due to missing modules for
> our bnx2 networkcards.

Are you using Debian nfsroots? -> Have you tried installing the package
firmware-bnx2 into the nfsroot, updating the initrd and booting the
clients with this new initrd?

You have to add the "non-free" tag to the sources.list, or else the
firmware package won't be available.

tschüß
thomas


P.S.: It may be necessary to add bnx2 to /etc/initramfs-tools/modules
prior to updating the initrd. I'm not sure.



Re: Read-only filesystem after moving to new server

2009-10-13 Diskussionsfäden Thomas Lange
>>>>> On Tue, 13 Oct 2009 10:22:06 +0200, Leen Smit  
>>>>> said:

> One more question: Since when, and why, is FAI looking for the config 
> files in $NFSROOT/var/lib/fai/config ? I had to copy my config over to 
> that dir to get the FAI install working again, simply leaving the config 
> in /srv/fai/config  resulted in a "cant find config" error...

Maybe you have upgraded from a very old FAI version to a new
one. Since 3.0 FAI_LOCATION is replaced by FAI_CONFIG_SRC. Check if
you have set the later in your fai.conf.

>From fai.conf:

# how to access the fai config space
# If undefined here, make-fai-nfsroot/fai-setup will use default value
# nfs:///$FAI_CONFIGDIR
# supported URL-types: nfs, file, cvs, cvs+ssh, svn+file, svn+http,
# git, git+http, hg+http
#FAI_CONFIG_SRC=nfs://yourservername/path/to/config/space

So, make-fai-nfsroot should have set it to nfs://yourservername/srv/fai/config 
in
$NFSROOT/etc/fai.conf if you didn't defined it in /etc/fai/fai.conf.

-- 
regards Thomas


Re: Creating etch nfsroot - how different is this from setting up a Lenny root?

2009-10-15 Diskussionsfäden Thomas Lange
>>>>> On Thu, 15 Oct 2009 16:50:42 +0200, Leen Smit  
>>>>> said:

> I need an ETCH deploy. I copied the base.tgz from the out-of-the-box 
> lenny nfsroot to /root.
Ouch. Create an etch base.tgz and copy it to your config space into
the subdirectory basefiles call it ETCH.tar.gz. Then add you clients
to the class ETCH. Now you have a lenny nfsroot which installs an etch
system. You also have to adjust your sources.list on the install client


> Then I go edit /etc/fai/apt/sources, change the sources to etch. I also 
> edit /etc/fai/make-nfs-root to change FAI_DEBOOTSTRAP to etch.
> I delete /srv/* , and run fai-setup
> This completes with one error:  "ERROR: live-initramfs was not installed 
> inside the nfsroot."
IIRC live-initramfs was not availabe in plain etch, you have to add
the koeln repository, to get live-initramfs for etch.

-- 
regards Thomas


Re: Providing Defaults to class/ scripts (was:: Adding to $kernelmodules)

2009-10-16 Diskussionsfäden Thomas Neumann
hiya
>> Is there a "correct" way to provide variables to scripts in class/ ?
[...]

> If you name your script 00foobar.source it will be executed first _and_
> sourced, therefore all variable definitions from 00foobar.source will
> also be visible in all other scripts. You might need to export the
> variable to have it available in the entire FAI run, but that I'm not
> sure of.

> Is that what you're looking for?

Yes, This is exactly what I need. I knew about ###.source file but wasn't
aware that they could do this. Is this a documentation bug?

10-hwdetect.source has the following header in my config space
====
#! /bin/bash

# (c) Thomas Lange, 2002-2007, la...@informatik.uni-koeln.de

# NOTE: Files named *.source will be evaluated, but their output ignored.
Instead
# the contents of $newclasses will be added to the list of defined classes.


Maybe newer releases state something else by now. This file is from a
rather old configspace example.


contents of /srv/fai/config/class/01-init.source
---
#!/bin/bash

TESTVAR="foobar"
export TESTVAR
---

contents of /srv/fai/config/class/71-test
---
#! /bin/bash

echo "TESTVAR is set to: $TESTVAR"
---

tschüß
thomas



Re: Providing Defaults to class/ scripts

2009-10-16 Diskussionsfäden Thomas Neumann
>> If you name your script 00foobar.source it will be executed first _and_
>> sourced, therefore all variable definitions from 00foobar.source will
>> also be visible in all other scripts. You might need to export the
>> variable to have it available in the entire FAI run, but that I'm not
>> sure of.

> AFAIR this doesn't work - fai-class runs in a subshell so any variables
> you export in class/*.source will only be available during fai-class
> execution. Workaround is to write a temporary file which you later
> source from class/SOMETHING.var.

I had already implemented the second step (fai-wide), but was missing out
on the first (fai-class specific).

for fai-wide configuration there are at least two options:

static:
- drop a .var file into class/

dynamic:
- create a symbolic link .var in class/ which points to /tmp/
- write required content to /tmp/ during fai execution

tschüß
thomas



Re: Providing Defaults to class/ scripts (was:: Adding to $kernelmodules)

2009-10-16 Diskussionsfäden Thomas Neumann
hiya

>> contents of /srv/fai/config/class/01-init.source
>> ---
>> #!/bin/bash
>>
>> TESTVAR="foobar"
>> export TESTVAR
>> ---

> So ... does that work? IMHO it should, but as Michael Goetze said, you
> probably cannot do more than this, like use $TESTVAR in some *.var files
> or somewhere later on. Could you verify this?

in class/ it works, in scripts/ it doesn't

Result follows prediction.


How to make both sides work:

contents of /srv/fai/config/class/01-init.source
---
#!/bin/bash

TESTVAR="foobar"
export TESTVAR

echo "TESTVAR=$TESTVAR" >> /tmp/MyDefaults.var
newclasses="MyDefaults"
> ---

where $FAI/class/MyDefaults.var is a symbolik link to /tmp/MyDefaults.var


tschüß
thomas




Re: trying to understand setup-storage

2009-10-16 Diskussionsfäden Thomas Lange
>>>>> On Fri, 16 Oct 2009 13:57:49 +0200, Michael Tautschnig  
>>>>> said:

> The problem is that this array has not been auto-started. You could add 
the
> mdadm-startall somewhere before setup-storage is called. Maybe we should 
even do
> that within setup-storage. Most probably nobody ever tried preserve in the
> context of SW raid before (including myself :-( ).
IMO this should be done in a script in class/
(e.g. 20-hwdetect.source), but not in setup-storage itself.

-- 
regards Thomas


Re: setup-storage: set vgname to hostname

2009-10-19 Diskussionsfäden Thomas Neumann
>> On 09/30/2009 12:11 AM, Jean Spirat wrote:
> I think you don't use a proper hook. Let me try to elaborate:
>
> - Create a disk config disk_config/SOMETHING that has ##HOSTNAME## in the
> places
>   you'd like to see $HOSTNAME to be replaced.
> - Add a hook hooks/partition.DEFAULT that does the following:
>
>   cp $FAI/disk_config/SOMETHING $FAI/disk_config/$HOSTNAME
>   sed -i "s/##HOSTNAME##/$HOSTNAME/" $FAI/disk_config/$HOSTNAME
>
> That should be about it, I think. I haven't actually tested this, so
> others might want to correct me.

This will break if $FAI is not writeable. (Usually it is.)

This procedure may be somewhat safer if you use -f to feed setup-storage
its new config file.



(My hook replaces different values, but this shouldn't matter much. The
file uses $FAI/disk_config/DISKlvm as its template, which is also attached
to this mail.) [Please ignore the call to /tmp/fai/IDENTITY.]

tschüß
thomas


partition.DISKlvm
Description: Binary data


DISKlvm
Description: Binary data


*ahem* execustion?

2009-10-20 Diskussionsfäden Thomas Neumann
hiya

lib/fai/subroutines:
  echo "WARNING: Skipping $hfile execustion because it's not executable."
  echo "WARNING: Skipping $hfile.source execustion because it's not
executable."
lib64/fai/subroutines:
  echo "WARNING: Skipping $hfile execustion because it's not executable."
  echo "WARNING: Skipping $hfile.source execustion because it's not
executable."

found in 3.2.16 or 3.2.20


I guess noone besides me has non-executable scripts. ;)
(I use them for documentation purposes.)

tschüß
thomas



Re: *ahem* execustion?

2009-10-20 Diskussionsfäden Thomas Neumann
[resend because of wrong sender address -_-;;]

hiya

[execustion]
> O.K., but what do you want tp point us to?
> The typo?

Yes.

tschüß
thomas




Re: adding modules to the fai-cd initrd

2009-10-29 Diskussionsfäden Thomas Lange
>>>>> On Mon, 26 Oct 2009 17:21:26 -0500 (CDT), "James S. White" 
>>>>>  said:

> Is there a file somewhere that I can tell fai-cd to add dm_mod, dm_crypt, 
or
> any other kernel module to the fai-cd initrd?
IMO, this is not needed. The fai-cd initrd only needs modules to load
the file system from the CD. Therefore dm_* is not needed.

When you like to access a local file system on the computer using
dm_crypt od dm_mod it's sufficient to load this kernel module by
class/20hwdetect.source.

-- 
regards Thomas


Re: Fai-CD ISO to USB

2009-11-01 Diskussionsfäden Thomas Lange
>>>>> On Sun, 1 Nov 2009 17:22:26 +0100, clysss  said:

> I've a Iso make with FAI-CD make a bootable CD-Rom. Is there a way to
> extract it and rerun FAI-CD to make a USB key? Or does I've to rebuild 
from
> scratch ???
It should be possible to copy all data from the FAI-CD to the USB
stick, but only manually. You also have to greate the correct grub
menu by hand. Have a look at the subroutine mkusb in the fai-cd
script. 

-- 
regards Thomas


  1   2   3   4   5   6   7   8   9   10   >