Re: FAI in italian

2005-09-09 Thread Holger Schurig
> The present documentation of FAI covers about sixty pages of written
> text. A single book describing a less advanced product like Microsoft
> RIS and MSI packaging never encompass less than 500 pages. Even though
> FAI for Debian GNU/Linux is a lot more flexible and configurable, the
> documentation only describes the default setup.

Hmm, I'm one of the experience Linux people that decided to use FAI. Before 
this, I used Slackware, RedHat, Mandrake and played from Time to time with 
Knoppix and was forced to look after SuSE installations at customers. I made 
my own Mandrake Mass-Installation CD and Mandrake Network-Installation Setup. 
I made my own RPMs and am now making my own DEBs to customize things.


For me the fact that FAI "only" had 60 pages was a plus. I don't want to read 
reading 500 pages where 440 pages do repeating mostly things that I already 
know. It would be tedious to filter out the relevant information.

Therefore I'd suggest that try to earn some money and use your documentation 
and ask O'Reilly or some other publisher if they help you to create a book 
for it, e.g "Mass Linux Installation for the Masses" :-)


Re: fun with FAI and Debian sid

2005-08-22 Thread Holger Schurig
> Why not install Sarge with FAI and then upgrade?  That would probably be
> a lot smoother.

Probably. However, I don't have the necessary *.deb's in my local Debian 
repository. Also I guess that this would then not be a 100% *F*ully 
*a*utomated *i*nstallation. And to get it 100% FAI, I'd have to invest an 
equal amount of time as I had to invest now.

Greetings, Holger



fun with FAI and Debian sid

2005-08-16 Thread Holger Schurig
Hi all!

I had the plan to install systems via FAI with Debian SID and run into a 
couple of problems.

One was because of the abysmal debootstrap, which is completely broken for 
"sid". People on #fai helped me and these are the steps I needed to let it 
run smoothly:

debootstrap Devices
---
Get debootstrap from Debian stable, extract (e.g. via "mc") 
the /usr/lib/debootstrap/devices.tar.gz. Replace the devices.tar.gz from 
sid's debootstrap with this one. Otherwise you will only have about 80 
devices in $NFSROOT/dev and FAI could not even open tty2, tty3 and tty4.


debootstrap Dependencies

Then you need lots of options in your /etc/fai/make-fai-nfsroot.conf to help 
the braindead dependencies of debootstrap. I use

FAI_DEBOOTSTRAP_OPTS="--exclude=pcmcia-cs,ppp,pppconfig,pppoe,
pppoeconf,dhcp-client,exim4,exim4-base,exim4-config,
exim4-daemon-light,mailx,at,fdutils,info,modconf,libident,
logrotate,exim,man-db --include=libstdc++6,gcc-4.0-base,
libsigc++-1.2-5c2,libgdbm3,gettext-base,netkit-inetd,
aptitude,libssl0.9.7,libstdc++5,libdb4.2,libopencdk8,
laptop-detect,dmidecode,gcc-3.3-base,groff-base"

(all in one long line). The line was created incrementally, maybe there's room 
to optimize it. What was weird is that I had to --exclude man-db, otherwise 
it made an error, saying it groff-base was missing. But chroot'ing into 
$NFSROOT and a 'dpkg -l "groff*"' revealed that groff-base was there ...

As I said, debootstrap is an abyssmal tool.


Local apt mirror

I have a local mirror which I create with reprepro. That's all fine, but the 
new apt in debootstrap wants to check GnuPG signatures and barks if the 
signatures are wrong.

So I changed /usr/sbin/make-fai-bootstrap:

create_base() {

if [ "$FAI_DEBOOTSTRAP" ]; then
call_with_stamp call_debootstrap $FAI_DEBOOTSTRAP
$ROOTCMD apt-get clean
+   mkdir -p $NFSROOT/etc/apt/apt.conf.d
+   echo 'APT::Get::AllowUnauthenticated "true";' \
+  >$NFSROOT/etc/apt/apt.conf.d/fai-unauthori
rm -f $NFSROOT/etc/resolv.conf
echo "Creating base.tgz"
tar -l -C $NFSROOT -cf - --exclude var/tmp/base.tgz . | \
   gzip > $NFSROOT/var/tmp/base.tgz
else
die "\$FAI_DEBOOTSTRAP not defined."
fi
}

Otherwise, you'd have to use '-y --force-yes' all over the way to get your 
unsigned (mirrored or local) *.debs installed.




BTW: make-fai-nfsroot has a little quirk: tar should not use -l but 
--one-file-system. tar from Debian "sid" spits out a warning if you use -l.


feature request: --one-file-system

2005-05-12 Thread Holger Schurig

While doing "make-fai-nfsroot":
...
Creating base.tgz
tar: Semantics of -l option will change in the future releases.
tar: Please use --one-file-system option instead.
...


fai-mirror has problems with variables

2005-03-29 Thread Holger Schurig
# export kernelversion=2.6.10
# export kernelsubversion=1-686
# fai-mirror -cDEFAULT -v .
Getting package information
Downloading packages for classes: DEFAULT
Reading config file /etc/fai/install_packages.conf
install_packages: read config 
file /usr/local/share/fai/package_config/DEFAULT
install_packages: executing  apt-get -qq -d -o 
Aptitude::Log=/dev/null   -o Dir::State::status=./aptcache/statefile   
-o Dir::Cache=./aptcache/var/cache/apt   -o 
Dir::State=./aptcache/var/cache/apt   -o 
Dir::Cache::Archives=./aptcache/var/cache/apt/archives   -o 
Dir::Etc::sourcelist=./aptcache/etc/apt/sources.list   -o 
Dir::State::Lists=./aptcache/var/lib/apt/lists/ -y --force-yes 
--fix-missing install file hdparm less module-init-tools
install_packages: executing  true
install_packages: executing  true
install_packages: executing  true
install_packages: executing  true
Adding packages from variable $addpackages: 
kernel-image-${kernelversion}-${kernelsubversion}E: Regex compilation 
error - Invalid preceding regular expression
 kernel-image-${kernelversion}-${kernelsubversion}E: Regex compilation 
error - Invalid preceding regular expression
 kernel-image-${kernelversion}-${kernelsubversion}E: Regex compilation 
error - Invalid preceding regular expression
...


fai-mirror is missing a dependency

2005-03-29 Thread Holger Schurig
Hi !

I just tried fai 2.7 and issued the "fai-mirror" command. It did not work 
out-of-the-box, because the fai deb doesn't include "libapt-pkg-perl" as 
a dependency.


Re: Newbie problem: IP address getting set to hostname

2005-03-07 Thread Holger Schurig
> hostname gets set to its IP address. Is anyone aware what could be
> causing this?

Yes, and if you would have checked the mailing list archive, you would 
know that.

See the thread starting 24th January with "fai trick: weird hostname".


Archive: http://www.uni-koeln.de/bin2/maillist/linux-fai?step=50


Re: dhcp doesn't seem to set the hostname on a client

2005-01-26 Thread Holger Schurig
> I have one problem with the FAI clients: They boot perfectly using DHCP
> (with kernel append ip=dhcp), but the hostname is set to the IP.

See the thread "fai trick: fix weird hostname" just some days ago in the 
mailing list archive. It includes a way how I solved this.


Re: screen ant

2005-01-25 Thread Holger Schurig
> If not, does anyone have the faintest idea of what I might need to
> examine to debug this? I simply have no idea what could be causing this
> or where to start looking.

I'd "apt-get strace" and then run your program in both environments under 
the auspiece of strace. Then compare the result, e.g. do something like 
this:

  $ strace -ooutput -efile -ff 
  $ grep open output*

on both systems and find out if it was unable to open some file.


Re: fai trick: fix weird hostname

2005-01-24 Thread Holger Schurig
> hi holger,
>
> Did I get you right - you cannot modify die DHCP server's
> configuration?
...
> host hostnameXYZ {
>  hardware ethernet 00:02:B3:ff:ff:ff;
>  fixed-address 192.168.X,Y;
> }

No, you didn't get me right. I don't WANT to assign hostnames. Those IP 
addresses are from a dynamic range with a netmask 255.255.0.0 and I don't 
want to assign 65536 different hostnames.

The IP address is used today to create a server that is shipped tomorrow. 
And in a week the IP address is used to repair a handheld data entry 
system. And next month it might be used for another thing.

So having hostnames, even artifical ones like ip16-145.mn-solutions.de is 
not what I want.



Instead, for me it's ok if all 16 servers I'm configuring get the same 
hostname. They are installed into some customers network and they don't 
care about hostname or, if they care, assign their own name.


Re: fai trick: fix weird hostname

2005-01-24 Thread Holger Schurig
> In fai 2.6.6 you can set the hostname by appending following parameter
> to the kernel:
>
> HOST=demohost
>
> This will also set the hostname. For example. the fai CD contains
> following boot entry for grub:

I tried that first, but it did not work. The code line 
in /usr/lib/fai/sbin/rcS_fai reads:

-
 if [ $HOSTNAME = '(none)' -a -n "$HOST" ]; then
-

and therefore HOST= on the kernel command line only works if HOSTNAME had 
the previous value '(none)'. But in my setup this is not true, the DHCP 
client set it to something numeric:


# cd /tmp/fai
# grep 172.16.1.145 *
--
boot.log:IPADDR='172.16.1.145'
dhclient.log:bount to 172.16.1.145 -- renewal in 3600 seconds.
dmesg.log: 
variables.sh: HOSTNAME='172.16.1.145'
variables.sh: IPADDR='172.16.1.145'
variables.sh: sndhostname='172.16.1.145'
--


I'm using ISC DHCP Client V3.0.1.


fai trick: fix weird hostname

2005-01-24 Thread Holger Schurig
Sometims I have to setup similar servers for customers. They don't end up 
in our local LAN, so they don't get local IP adresses. Instead, they get 
some short-lived dynamic IP address via DHCP.

There is no hostname in our local DNS for those DHCP addresses, so FAI 
assigns the IP address (!) to HOSTNAME. But '172.16.1.241' is a weird 
hostname. This is later used in /etc/hostname, /etc/hosts and probably at 
other places.


The following hook fixes this behavior:


/usr/local/fai/hooks/setup.DEFAULT.source


echo $HOSTNAME | grep -q ^[0-9] && {
export HOSTNAME=linux
hostname $HOSTNAME
}



qemu and fai?

2004-12-14 Thread Holger Schurig
I just apt-get (apt-got?) qemu and was able to run the demo linux image.

How would I now use qemu to make fai installation tests?  Is there any 
howto somewhere?

I don't know the exact virtualization level of QEmu, e.g. can I directly 
run the pxelinux image?  Or should I try to get it root-mounting the FAI 
nfs image? 


Re: more than 2TB?

2004-12-13 Thread Holger Schurig
> See above. I'm maintaining a FAI setup tree for production use and
> won't take the risk to break something.

You can have several, independend FAI setup tree!

Several ways are possible

*) use the -c option to make-fai-nfsroot and a completely different fai 
fai config and nfsroot directory

*) use a different machine for the test-FAI and let your DHCP-Server serve 
a different root-path for those machines that you test with FAI.


Bug with mixing "PACKAGE install" and "PACKAGE aptitude"

2004-11-15 Thread Holger Schurig
I read in the changelog that FAI can also install via aptitude.

So I changed one of my files in package_config from "PACKAGE install" to
"PACKAGE aptiude". In software.log however I saw that all files have been
installed via aptitude.

-- 
M&N Solutions GmbH   http://www.mn-solutions.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: (+49) 6003 9141 0   Fax: (+49) 6003 9141 49



Question regarding file modes

2004-11-12 Thread Holger Schurig
man fai says:

   -m user,group,mode
  Set user, group and mode for all copied files (mode as octal 
number, user and group
  numeric  id or name).  If not specified, use file file-mode or 
data of source file.

however, it should be 'file-modes', not 'file-mode'.


However, I have a file /usr/local/share/fai/files/etc/quagga/zebra.conf/GATEWAY 
which contains

--
quagga quagga 640
--

After install, shell.log says just

--
reading /fai/files/etc/quagga/zebra.conf/file-modes
--

without any problems. Unfortunately, when I later boot, the file has the wrong 
owner:

--
-rw-r-  1 root   root   106 Nov 12 13:44 zebra.conf
--

The fcopy took place very late in the installation, via 
scripts/LAST/S80-fcopy-recursive:

--
#!/bin/sh

fcopy -B -r /

exit 0
--


So, I guess the error is because of fcopy's name2num function:

--
sub name2num {

  # convert names to numeric uid, gid
  my ($user,$group) = @_;
  my $uid = ($user  =~ /^\d+$/) ? $user  : getpwnam $user;
  my $gid = ($group =~ /^\d+$/) ? $group : getgrnam $group;
  warn "name2id $user = $uid ; $group = $gid\n" if $debug;
  return ($uid,$gid);
}
--

which uses getpwnam / getgrnam.  This is wrong, because the uid and gid should
be taken from $target/etc/passwd or $target/etc/group, but not from /etc/passwd
or /etc/group.


-- 
M&N Solutions GmbH   http://www.mn-solutions.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: (+49) 6003 9141 0   Fax: (+49) 6003 9141 49



sample on how to do debconf integration

2004-11-11 Thread Holger Schurig
Hi !

Recently, the new debian-installer got auto-installation support via
debconf-preseeding. Currently, FAI doesn't do anything with
debconf. I want to try this, so I created a hooks/mirror.LAST file
which contains this

-
#!/bin/bash
echo "Task mirror"
for cl in $classes; do
echo "  trying debconf/$cl"
if [ -f "/fai/debconf/$cl" ]; then
$ROOTCMD debconf-set-selections <"/fai/debconf/$cl" && echo "  
loaded debconf/$cl"
fi
done

unset cl
-

and in debconf/ I can now have files named like classes, e.g
debconf/X11_BASE:

-
xserver-xfree86 xserver-xfree86/autodetect_mouseboolean true
xserver-xfree86 xserver-xfree86/autodetect_monitor  boolean true
xserver-xfree86 xserver-xfree86/config/monitor/lcd  boolean false
-

because task 'mirror' runs before task 'instsoft', the debconf should already 
contain
the needed info for the postinst script. However, I'm not an expert on Debian 
yet,
so I'm not sure if this is the right approach. If it is so simple, then why 
isn't it
in FAI already?  :-)


So, any comments about this?



Re: change root password for clients installation

2004-11-05 Thread Holger Schurig
On Friday 05 November 2004 11:55, Gerald Houart wrote:
> perhaps a stupid question but i was not able to modify root password
> for clients installation!
>
> when i do so with an existing password (from password or shadow file)
> on another debian linux computer it is not usable after installation
> what kind of encryption is used to generate root password in fai? how
> to generate a password to insert in DEFAULT.var ?
>

I have this script:


scripts/DEFAULT/S10-etc-passwd:
--
#!/bin/sh

$ROOTCMD shadowconfig on
perl -pi -e 's{^root::}{root:$ENV{rootpw}:}' $target/etc/shadow
--


and in classes/.var I have:
--
rootpw='$1$DW59daXn$EfS4ThGSF44.JGaPybPnD/'
--



I optained the hash by logging in normally, using the normal "passwd" command
and then I copied the md5-hash from /etc/shadow.



Re: fcopy: "file-modes" for directories?

2004-11-02 Thread Holger Schurig
> for directories instead of plain files?  Is there a reason why this
> would not make sense, or am I just the first one who could use this

Maybe it makes sense, but maybe you can help yourself with this:

install -m 0700 -d $target/some/dir ?
fcopy /some/dir/somefile



Re: TFTP Timeout

2004-10-27 Thread Holger Schurig
> aracne:/# in.tftpd &
> [1] 399
> aracne:/# tail -1 /var/log/messages
> Oct 27 17:11:16 aracne in.tftpd[399]: recvfrom: Socket operation on
> non-socket
> [1]+  Exit 74 in.tftpd
> aracne:/# grep tftp /etc/inetd.conf
> tftp   dgram   udp waitroot  /usr/sbin/tcpd

When you enter in.tftp into /etc/inetd.conf, then you send a HUP to inetd
and let it call it. In this case, you don't call it manually.

Also, the tftp entry you grepped is without relevance. It calls tcpd, which
is from tcpwrappers. But it doesn't call in.tftpd in turn. So maybe you
uncomment that line.


Please post you next message only after you read

man in.tftpd
man inetd
man inetd.conf

You should also read section 3.2 in the FAI manual, and do it as described there.


Whenever you do   in.tftpd & you do something wrong. PERIOD.



Re: TFTP Timeout

2004-10-27 Thread Holger Schurig
> Oct 27 15:58:00 aracne in.tftpd[351]: recvfrom: Socket operation on
> non-socket

in.tftpd is written so that it is normally run from inetd, via /etc/inetd.conf.

When you call in.tftpd from the command line, you have to add the -l command
line switch, as "man in.tftpd" will tell you:

OPTIONS
   -l Run  the server in standalone (listen) mode, rather than run from inetd. 
...


When called via inetd, the stdin is not a terminal, but a socket (the one that
inetd opened), so in.tftpd can do socket operations on stdin.

When you call it from commandline, without -l, then stdin is a tty. And tty's won't
allow socket operations.




Re: distributing package updates

2004-10-26 Thread Holger Schurig
> How do those of you that installed a sizable number of Debian boxes
> manage your package updates? I'm trying to figure out how to get around
> apt-get needing you to sit there and answer the same questions for each
> package on each box in a group of identically configured machines.

I'm not exactly in love with cfengine2, but you can use it for centralized updates.



bug in /usr/share/perl5/Debian/Fai.pm

2004-10-26 Thread Holger Schurig
When you look at this excerpt ...

sub read_all_info () {
  read_disk_info;
  read_memory_info;
  read_kernel_messages;
}

... and you know perl, then you would realize that you should rewrite this to

sub read_all_info () {
  read_disk_info();
  read_memory_info();
  read_kernel_messages();
}

to get it warning-free.

"perl -w /usr/share/doc/fai/examples/advanced/class/05nic" will show you the warnings.


-- 
M&N Solutions GmbH   http://www.mn-solutions.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: (+49) 6003 9141 0   Fax: (+49) 6003 9141 49



Duplicated FAI-Classes ?

2004-10-26 Thread Holger Schurig
During installation, my /tmp/fai/FAI_CLASSES looks like:

DEFAULT
LINUX
I386
MNWH
PART_ONE
BOOT_MBR
BOOT_LILO
NET_BASE
MNWH
PART_ONE
BOOT_MBR
BOOT_LILO
NET_BASE
mnwh
LAST


how does this come?  My 02alias is the usual one:


uname -s | tr '[:lower:]' '[:upper:]'
[ -x "`which dpkg`" ] && dpkg --print-installation-architecture | tr /a-z/ /A-Z/

case $HOSTNAME in
mnwh)
catnc mnwh
;;
esac


and mnwh is also simple:


MNWH
PART_ONE
BOOT_MBR
BOOT_LILO
NET_BASE



idea for faimond

2004-10-26 Thread Holger Schurig
Currently, faimond just display things that it got, once could also do 

  netcat -p 4711 -l

instead.


However, we could add some little protocol into the stream to do this:

* log start/stops of tasks as now
* transfer the *.log files to the server, without unsafe protocols like rsh
* do the chroot-thingy via faimond

This way, one central instance (faimond) would have write rights to FAI's configuration
resp. logging space and not several clients in your network.

-- 
M&N Solutions GmbH   http://www.mn-solutions.de
Holger Schurig
Dieselstr. 18
61191 Rosbach v.d.Höhe
Tel: (+49) 6003 9141 0   Fax: (+49) 6003 9141 49