Re: Some issues

2004-08-31 Thread Thiemo Seufer
Steffen Grunewald wrote:
> On Tue, Aug 31, 2004 at 04:12:00PM +0200, Thiemo Seufer wrote:
> > Thomas Lange wrote:
> > [snip]
> > > If you need a smaller kernel image to fit on a floppy disk, you can
> > > remove some network drivers, that you don't need for booting and
> > > mounting the nfsroot. If you have a math coprocessor, disable the math
> > > emulation (nearly 80k).
> > 
> > I wonder why math emulation is available in FAI kernels at all. Is
> > there actually some realistic scenario where old/embedded i386/i486
> > machines are installed via FAI?
> 
> I guess the Centibots are not based on high-end i686 processors...
> Correct me if I'm wrong!

They do. Pentium III compatible, or in another variant Pentium I
compatible VIA/Centaur CPUs. So they have a FPU.


Thiemo


Re: Some issues

2004-08-31 Thread Steffen Grunewald
On Tue, Aug 31, 2004 at 03:57:28PM +0200, Thomas Lange wrote:
> > On Tue, 31 Aug 2004 15:39:34 +0200, Steffen Grunewald <[EMAIL PROTECTED]> said:
> 
> > Please consider using this in your examples, too.
> Will be made in the future.

Thanks!

> > Not in kernel, no module. Probably commented out by mistake?
> > (CONFIG_FS_XFS is set to "m" in kernel-config from fai-kernels 1.7.1)
> xfs is on by default only in the 2.6 kernel from fai-kernel, not in the 2.4
> kernel.

I see. For traditional reasons, I'm still stuck with 2.4.

> > I'm now trying to figure out how to netboot an Alpha: the naked kernel
> > doesn't do the trick, and a boot floppy seems to be impossible (large
> > kernel, no boot loader). Any ideas from the list?
> You can make the kernel smaller by removing unused network devices.

Of course. There's still the problem that aboot doesn't support
floppies, and milo isn't to be found in sarge (only kmilo).
*If* there's a way to build a netboot image that contains all the
necessary stuff - and the appropriate kernel line - I'd be happy with
that. Something similar to debian-installer netboot image. 5MB are no
big deal then :-) 
If I only knew how to build one... I already asked Steve for help, but
he'd be busy with getting Sarge out of the door.
That's why I asked the list (and I'll be allowed to repeat this here):
Is there someone who already built a netboot image for Alpha, who
wouldn't mind to share some know-how? Need to set the usual stuff
"root=/dev/nfs ip=::dhcp FAI_ACTION=... FAI_FLAGS=...". (Is there a
way to leave this out of the kernel/bootimage, and get from the DHCP
server? It's not PXE now... so fai_chboot would have to be adapted.)

Any ideas are appreciated. I'm pretty new to Alphas.

Cheers,
 Steffen

-- 
Steffen Grunewald * * * Merlin cluster admin (http://pandora.aei.mpg.de)
Albert-Einstein-Institut (MPI Gravitationsphysik, http://www.aei.mpg.de)
   Science Park Golm, Am Mühlenberg 1, 14476 Potsdam, Germany
e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}



Re: Some issues

2004-08-31 Thread Steffen Grunewald
On Tue, Aug 31, 2004 at 04:12:00PM +0200, Thiemo Seufer wrote:
> Thomas Lange wrote:
> [snip]
> > If you need a smaller kernel image to fit on a floppy disk, you can
> > remove some network drivers, that you don't need for booting and
> > mounting the nfsroot. If you have a math coprocessor, disable the math
> > emulation (nearly 80k).
> 
> I wonder why math emulation is available in FAI kernels at all. Is
> there actually some realistic scenario where old/embedded i386/i486
> machines are installed via FAI?

I guess the Centibots are not based on high-end i686 processors...
Correct me if I'm wrong!

Steffen



Re: Some issues

2004-08-31 Thread Thomas Lange
> On Tue, 31 Aug 2004 16:12:00 +0200, Thiemo Seufer <[EMAIL PROTECTED]> said:

> I wonder why math emulation is available in FAI kernels at all. Is
> there actually some realistic scenario where old/embedded i386/i486
> machines are installed via FAI?
Debian kernels should (or must) run on a 386 cpu. So we need math emulation.

-- 
regards Thomas


Re: Some issues

2004-08-31 Thread Thiemo Seufer
Thomas Lange wrote:
[snip]
> If you need a smaller kernel image to fit on a floppy disk, you can
> remove some network drivers, that you don't need for booting and
> mounting the nfsroot. If you have a math coprocessor, disable the math
> emulation (nearly 80k).

I wonder why math emulation is available in FAI kernels at all. Is
there actually some realistic scenario where old/embedded i386/i486
machines are installed via FAI?


Thiemo


Re: Some issues

2004-08-31 Thread Thomas Lange
> On Tue, 31 Aug 2004 15:39:34 +0200, Steffen Grunewald <[EMAIL PROTECTED]> said:

> Please consider using this in your examples, too.
Will be made in the future.


> Not in kernel, no module. Probably commented out by mistake?
> (CONFIG_FS_XFS is set to "m" in kernel-config from fai-kernels 1.7.1)
xfs is on by default only in the 2.6 kernel from fai-kernel, not in the 2.4
kernel.

> I'm now trying to figure out how to netboot an Alpha: the naked kernel
> doesn't do the trick, and a boot floppy seems to be impossible (large
> kernel, no boot loader). Any ideas from the list?
You can make the kernel smaller by removing unused network devices.
>From the README of fai-kernel:


How to save space on the boot floppy

If you need a smaller kernel image to fit on a floppy disk, you can
remove some network drivers, that you don't need for booting and
mounting the nfsroot. If you have a math coprocessor, disable the math
emulation (nearly 80k). Here's a list for kernel 2.4.24 with the size
of some drivers.

20144 8139too.o
21564 pcnet32.o
21868 3c505.o
21932 dl2k.o
25292 natsemi.o
34040 3c59x.o
50187 tulip.o
55796 tg3.o
62936 serial.o
66484 e100.o
74244 typhoon.o
84056 e1000.o
165343 sk98lin.o

-- 
regards Thomas


Re: Some issues

2004-08-31 Thread Steffen Grunewald
On Fri, Aug 27, 2004 at 05:36:59PM +0200, Thomas Lange wrote:
> > OK; I'll try. Where is the value written to variables.sh?
> define rootpw in class/*.var. After all variables are defined, the
> task defvar writes then to variables.sh.

OK, found. This perl line is something to experiment with, and, yes,
using single quotes did cure the problem entirely. No more crippled
MD5 passwords. Please consider using this in your examples, too.

> > XFS. Perhaps Reiser. But XFS is most important (for me).
> > Using xfsprogs, I can format XFS partitions during install, but cannot
> > write to them...
> From setup_harddisks:
> 
> # Last changes: 14.07.2003 by Thomas Lange add xfs filesystem support
> # reiserfs patch 8.11.2001 by Diane Trout <[EMAIL PROTECTED]>

At least xfs doesn't seem to work:
pandora:/fai/class# mkdir /tmp/target/scratch
pandora:/fai/class# mount -t xfs -r /dev/hda9 /tmp/target/scratch
mount: fs type xfs not supported by kernel

pandora:/fai/class# find /lib/modules -name \*xfs\*
pandora:/fai/class#

Not in kernel, no module. Probably commented out by mistake?
(CONFIG_FS_XFS is set to "m" in kernel-config from fai-kernels 1.7.1)

Thanks for your NIS suggestions, I guess I worked it out. Here's my
script to do it:

#!/bin/sh
DOMAIN=`cat $target/etc/defaultdomain`
ifclass NIS && {
[ -f $target/etc/default/nis ] && . $target/etc/default/nis
chroot $target domainname $DOMAIN
}

ifclass pandora && {
if [ "$NISSERVER" = "master" ]; then
# set up an yp master server
#   chroot $target chroot $target /usr/lib/yp/ypinit -m ... requires manual input
echo ypmake
chroot $target sh -c "cd /var/yp && make NOPUSH=true target 2>&1"
elif [ "$NISSERVER" = "slave" ]; then
# not yet tested!!!
echo ypinit -s from $NISMASTER
chroot $target sh -c "/usr/lib/yp/ypinit -s $NISMASTER"
fi
}
exit 0

At least for the master server it works fine. For slave servers,
probably a patch to ypinit is necessary (and perhaps to start ypbind
so that ypwhich can talk to someone). But that's peanuts, since ypinit
-s can run silently which ypinit -m needs keyboard interaction (bad
design IMHO, to have several input loops to be ended with CTRL-D EOFs).

I'm now trying to figure out how to netboot an Alpha: the naked kernel
doesn't do the trick, and a boot floppy seems to be impossible (large
kernel, no boot loader). Any ideas from the list?

Cheers,
 Steffen

-- 
Steffen Grunewald * * * Merlin cluster admin (http://pandora.aei.mpg.de)
Albert-Einstein-Institut (MPI Gravitationsphysik, http://www.aei.mpg.de)
   Science Park Golm, Am Mühlenberg 1, 14476 Potsdam, Germany
e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}



Re: Some issues

2004-08-27 Thread Thomas Lange
> On Fri, 27 Aug 2004 15:09:28 +, Steffen Grunewald <[EMAIL PROTECTED]> said:

> OK; I'll try. Where is the value written to variables.sh?
define rootpw in class/*.var. After all variables are defined, the
task defvar writes then to variables.sh.

> XFS. Perhaps Reiser. But XFS is most important (for me).
> Using xfsprogs, I can format XFS partitions during install, but cannot
> write to them...
>From setup_harddisks:

# Last changes: 14.07.2003 by Thomas Lange add xfs filesystem support
# reiserfs patch 8.11.2001 by Diane Trout <[EMAIL PROTECTED]>

> I don't like scripts to run on first boot :-) That's why I love FAI so
> much. 
Me too, but did not work for me during the installation.
BTW also add this to a cfengine script:

   NISSERVER::
{ ${target}/etc/default/nis
  ReplaceAll "NISSERVER=false" With "NISSERVER=master"
}

-- 
regards Thomas


Re: Some issues

2004-08-27 Thread Steffen Grunewald
On Fri, Aug 27, 2004 at 04:58:43PM +0200, Thomas Lange wrote:
> > On Thu, 26 Aug 2004 07:15:01 +, Steffen Grunewald <[EMAIL PROTECTED]> said:
> 
> > There are several items on my wish list though:
> 
> > - If I use an MD5 encrypted password (a special one that contains a / in
> >   the salt field) I get a crippled entry in /etc/shadow (It's already in
> >   variables.sh, so something went wrong before). Only the part starting
> 
> try single quote ' not doubble quotes as in this eg.
> 
> rootpw='asdfser24234ewsd23d'
> I hope this will work.
OK; I'll try. Where is the value written to variables.sh?

> > - I'd like to have support for more filesystems in the install kernel.
> Which?

XFS. Perhaps Reiser. But XFS is most important (for me).
Using xfsprogs, I can format XFS partitions during install, but cannot
write to them...

> > - task logging could use some time stamping (also for faimond)
> But what if the time on the install client will not be set (timeserver
> is not defined...). Maybe the faimond should do timestamping.
Even then relative timestamps in the logs might help putting them into
right order. Yes, faimond should do its own timestamping, agreed.

> > - an easy way to append "append=..." lines to grub/menu.lst during
> >   kernel install (without tampering with the file afterwards)
> 
> > - make-fai-nfsroot might be able to skip the NFS server reconfig (I know
> >   what I'm doing, and I'm running the FAI server on a production
> >   machine, so restarting -not reloading- the NFS server is a bad idea)
> OK. should be a small patch.
> 
> > - the tasksel issue
> fixed in 2.6.2
... and in your preliminary version. I apologize for not replying
before, have been a bit busy with a lot of other things.

> > Also hints how to install a YP master server (files copied from a
> > non-NIS setup) using FAI would be appreciated, I couldn't find anything
> > about this in the docs...
> This is not the scope of FAI, it's mot a nis howto question which I
> will not answer in my docs.

Solved! 
chroot $target domainname $DOMAIN
chroot $target sh -c "cd /var/yp && make NOPUSH=true target"
would do anything I need. I didn't setup a slave server yet, but it's
certainly easier (since ypinit -s doesn't require interaction)
$DOMAIN would be set from /etc/defaultdomain.

> BTW here's the code I created some days ago to saet up an yo master server.
> 
> if ifclass NISSERVER; then
> mkdir -p $target/var/yp/$YPDOMAIN
this would be done by "make target"
> rm -f$target/var/yp/$YPDOMAIN/* $target/var/yp/ypservers
> for s in $YPSRVR; do
> echo "ypserver $s" >> $target/var/yp/ypservers
> done
I get the ypservers file from my files/ tree.
> cat $target/var/yp/ypservers | awk '{print $$0, $$0}' | 
> $target/usr/lib/yp/makedbm - $target/var/yp/$YPDOMAIN/ypservers
I deleted the "$(NOPUSH) ||" in front of make ... ypservers in a
cfengine script.
> # call make for nis once during first boot
> cat >$target/etc/rc2.d/S99nis <<-EOF
> #! /bin/sh
> cd /var/yp
> make
> rm -f \$0
> EOF
> chmod a+rx $target/etc/rc2.d/S99nis
I don't like scripts to run on first boot :-) That's why I love FAI so
much. 

Thanks a lot!

Steffen
-- 
Steffen Grunewald * * * Merlin cluster admin (http://pandora.aei.mpg.de)
Albert-Einstein-Institut (MPI Gravitationsphysik, http://www.aei.mpg.de)
   Science Park Golm, Am Mühlenberg 1, 14476 Potsdam, Germany
e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}



Re: Some issues

2004-08-27 Thread Thomas Lange
> On Thu, 26 Aug 2004 07:15:01 +, Steffen Grunewald <[EMAIL PROTECTED]> said:

> There are several items on my wish list though:

> - If I use an MD5 encrypted password (a special one that contains a / in
>   the salt field) I get a crippled entry in /etc/shadow (It's already in
>   variables.sh, so something went wrong before). Only the part starting

try single quote ' not doubble quotes as in this eg.

rootpw='asdfser24234ewsd23d'
I hope this will work.

> - I'd like to have support for more filesystems in the install kernel.
Which?

> - task logging could use some time stamping (also for faimond)
But what if the time on the install client will not be set (timeserver
is not defined...). Maybe the faimond should do timestamping.

> - an easy way to append "append=..." lines to grub/menu.lst during
>   kernel install (without tampering with the file afterwards)

> - make-fai-nfsroot might be able to skip the NFS server reconfig (I know
>   what I'm doing, and I'm running the FAI server on a production
>   machine, so restarting -not reloading- the NFS server is a bad idea)
OK. should be a small patch.

> - the tasksel issue
fixed in 2.6.2

> Also hints how to install a YP master server (files copied from a
> non-NIS setup) using FAI would be appreciated, I couldn't find anything
> about this in the docs...
This is not the scope of FAI, it's mot a nis howto question which I
will not answer in my docs.

BTW here's the code I created some days ago to saet up an yo master server.

if ifclass NISSERVER; then

echo "Setting up NIS master server"
# this is part of the code of ypinit -m, which does not work with a different
# hostname. It always wants the current hostname to be the first ypserver
mkdir -p $target/var/yp/$YPDOMAIN
rm -f$target/var/yp/$YPDOMAIN/* $target/var/yp/ypservers
for s in $YPSRVR; do
echo "ypserver $s" >> $target/var/yp/ypservers
done
cat $target/var/yp/ypservers | awk '{print $$0, $$0}' | $target/usr/lib/yp/makedbm 
- $target/var/yp/$YPDOMAIN/ypse
rvers
# call make for nis once during first boot
cat >$target/etc/rc2.d/S99nis <<-EOF
#! /bin/sh
cd /var/yp
make
rm -f \$0
EOF
chmod a+rx $target/etc/rc2.d/S99nis
-- 
regards Thomas


Some issues

2004-08-26 Thread Steffen Grunewald
Hi,

after two weeks of intensive tweaking, I'm almost approaching the 95%
level :-)

There are several items on my wish list though:

- If I use an MD5 encrypted password (a special one that contains a / in
  the salt field) I get a crippled entry in /etc/shadow (It's already in
  variables.sh, so something went wrong before). Only the part starting
  with /, up to and excluding the $ separating the salt from the hash,
  would survive. BAD :-(
- I'd like to have support for more filesystems in the install kernel.
- Scripts should be named SNNfunction (htis is already possible, but not
  in the docs/examples)
- task logging could use some time stamping (also for faimond)
- an easy way to append "append=..." lines to grub/menu.lst during
  kernel install (without tampering with the file afterwards)
- make-fai-nfsroot might be able to skip the NFS server reconfig (I know
  what I'm doing, and I'm running the FAI server on a production
  machine, so restarting -not reloading- the NFS server is a bad idea)
- the tasksel issue
- perhaps a means to install several kernels (think of 2.4 and 2.6
  series)

Also hints how to install a YP master server (files copied from a
non-NIS setup) using FAI would be appreciated, I couldn't find anything
about this in the docs...

Cheers,
 Steffen

(BTW, I've been working with FAI for two weeks now. To get a kickstart
as far as I'm now took me months, starting with an already 75% running
setup. FAI is certainly worth every hour of learning! Thanks Thomas)

-- 
Steffen Grunewald * * * Merlin cluster admin (http://pandora.aei.mpg.de)
Albert-Einstein-Institut (MPI Gravitationsphysik, http://www.aei.mpg.de)
   Science Park Golm, Am Mühlenberg 1, 14476 Potsdam, Germany
e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}