FAI problems on Ubuntu 11.04

2011-06-13 Diskussionsfäden Dashamir Hoxha
Michael Tautschnig on Sun Jun 5 23:45:17 CEST 2011 wrote:

> (STDOUT)
> (STDOUT) Number  StartEnd  Type  File system  Flags
> (STDOUT)  1  0,0,19   1809,187,41  primary   ntfs boot
> (STDOUT)  2  1809,187,42  9728,254,62  extended   lba
> (STDOUT)  5  1809,188,42  9728,254,62  logical   ntfs
> (STDOUT) 9729,0,0 9729,80,62 Free Space
> (STDOUT)

[...]

Hmm, ok, I have never before seen a partition start that early... But anyway,
that's a bug in setup-storage it seems. I've added a fix to the experimental
releases, although it will take a few more days until we get back our
auto-builds for experimental.
-

Hi,

I have tried to install the latest experimental version, by adding:
deb http://fai-project.org/download experimental koeln
to /etc/apt/sources.list (as well as to /etc/fai/apt/sources.list)

However the latest version still seems to be experimental90 (1 May 2011).
If I was familiar with building DEB packages, I would have tried the
instructions on:
http://faiwiki.informatik.uni-koeln.de/index.php/Development_with_quilt
http://anonscm.debian.org/viewvc/fai/branches/experimental/README?revision=5762&view=markup

However, since I am more familiar with applying patches, I tried to
apply the latest patches from:
http://anonscm.debian.org/viewvc/fai/branches/experimental/patches/
-
setup-storage_first-part-at-1M (2011-05-23)
setup-storage_align-first-part-preserve (2011-06-05)
setup-storage_loopback-support (2011-06-05)
setup-storage_softraid-assemble-error (2011-06-05)
setup-storage_syntax-check-mode (2011-06-05)
setup-storage_udevsettle-before-vol-id (2011-06-06)
-

Then I tried again 'fai-setup -v' and then client re-install.
The result was the same.

Besides I have noticed this during fai-setup:
-
Shadow passwords are now on.
cp: cannot stat `/srv/fai/nfsroot/live/filesystem.dir/boot/vmlinu?-*':
No such file or directory
cp: cannot stat
`/srv/fai/nfsroot/live/filesystem.dir/boot/initrd.img-*': No such file
or directory
DHCP environment prepared. If you want to use it, you have to enable
the dhcpd and the tftp-hpa daemon.
ERROR: No initrd installed.
-

I don't know whether there is any relation between this error and the
setup-storage problem.

Regards,
Dashamir


Re: About name machine

2011-06-13 Diskussionsfäden Rob

On 06/06/2011 02:50 PM, Michael Tautschnig wrote:

I have an installation of fai in a cluster in the University of Buenos
Aires. I have a problem with the machine name detection. My clients machines
have two network cards and both are configured by dhcp.
When the machine start to install, it load by one of the cards. But, when it
detect the classes, it detect the other network card.
My question is about, When the scripts detect the machine name?.

The hostname should either get set from kernel command line parameters (you
might have set them using fai-chboot) or will be provided by DHCP. I couldn't
really think of another option, unless you are modifying it in any of your
class/* scripts.


FWIW, we set our own "newhost" kernel parameter which we enable via  
"fai-chboot" (eg: fai-chboot -k newhost=mymachine ...).


The "newhost" kernel parameter is checked by our 
"/srv/fai/config/hooks/setup.DEFAULT.source" (attached).  As a fallback, 
if neither the HOSTNAME nor newhost variables are set, the hostname is 
set to be the ip-address of eth0, with dots converted to dashes.


So far, this reliably sets the hostname to the value of newhost in the 
newly installed target system.


--
Rob

#!/bin/bash

export MemoryTotalBytes=$(expr $(sed -n 's/^MemTotal:  *\([0-9]*\)[^0-9]*/\1/p' 
/proc/meminfo) '*' 1024)

get_ip() {
/sbin/ifconfig ${IFACE:-${INTERFACE:-eth0}} | sed -n '
/^.*[[:space:]]inet addr:/ {
s///
s/[[:space:]].*//
p
}
'
}

if [ -z "$HOSTNAME" ] || [ "$HOSTNAME" = host ]
then
if [ -z "$newhost" ]
then
export newhost=$(get_ip | sed 's/\./-/g')
fi
export HOSTNAME="$newhost"
hostname "$HOSTNAME"
echo "$HOSTNAME" > /etc/hostname
if [ -d "$target/etc/" ]
then
echo "$HOSTNAME" > "$target/etc/hostname"
fi
fi