Re: Booten über TFTP

2006-10-12 Diskussionsfäden Mag. Leonhard Landrock
Am Mittwoch, 11. Oktober 2006 20:40 schrieb Andreas Putzo:
 Hallo,

 On Oct 11, Mag. Leonhard Landrock wrote:
  OK. atftpd --daemon --port 12345 /srv/tftp/ funktioniert. Getestet
  mitels atftp --get --verbose --remote-file fai/pxelinux.0 --local-file
  pxelinux.0 192.168.1.100 12345.
 
  Bleibt noch die erste Frage dieses Threads offen: Wie muss tftpd mit
  xinetd zusammenarbeiten um korrekt zu laufen?

 Das steht doch in deiner ersten Mail.

  Richte atftpd ein (0.7.dfsg-1) ...
  - IMPORTANT INFORMATION FOR XINETD USERS --
  The following line will be added to your /etc/inetd.conf file:
 
  tftpdgram   udp wait
  nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300
  +--retry-timeout
  5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl
  1 --maxthread 100 --verbose=5  /srv/tftp

Interessanterweise kann ich davon nichts finden in /etc/inetd.conf. Aber 
halb so wild. Ich versuche sowieso erst einmal den echten xinetd-Weg. ;-)

 und

  README.Debian for xinetd
   
 
- xinetd features an inetd.conf compatibility mode. When started with
  +the
  -inetd_compat option, xinetd first reads its own configuration file
  (/etc/xinetd.conf), then /etc/inetd.conf.

Der inetd.conf compatibility mode scheidet mangels fehlendem Eintrag 
kurzfristig aus. Außerdem versuche ich gleich einmal eine korrekte xinetd 
Konfiguration.

 (ohne jemals xinetd benutzt zu haben..) müsste es also reichen, xinetd mit
 -inetd_compat zu starten. Oder eben man xinetd lesen und gucken, wie die
 Konfiguration aussehen muß.

man xinetd: Habe ich gemacht. Wesentlich ist in diesem Zusammenhang der 
Eintrag includedir:

includedir
 Takes a directory name in the form of includedir /etc/xinetd.d. Every file 
inside that directory, excluding files with names containing a dot ('.') or 
ending with a tilde ('~'), will be parsed as xinetd configuration files. The 
files will be parsed in alphabetical order according to the C locale. This 
allows you to specify services one per file within a directory. The 
includedir directive may not be specified from within a service declaration.

Werde also im Verzeichnis /etc/xinetd.d eine neue Konfigurationsdatei 
erzeugen. :-)

 Gruß, Andreas

LG,
Leonhard.



Re: Booten über TFTP

2006-10-12 Diskussionsfäden Andreas Putzo
Hallo,

On Oct 12, Mag. Leonhard Landrock wrote:
 Am Mittwoch, 11. Oktober 2006 20:40 schrieb Andreas Putzo:
   tftpdgram   udp wait
   nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300
   +--retry-timeout
   5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl
   1 --maxthread 100 --verbose=5  /srv/tftp
 
 Interessanterweise kann ich davon nichts finden in /etc/inetd.conf. Aber 

Habe eben mal atftpd installiert. Wenn man die debconf Frage Starten
über inetd mit ja beantwortet, wird der Eintrag in /etc/inetd.conf
korrekt vorgenommen, auch wenn xinetd installiert ist. Sonst wäre wohl
ein Bug Report fällig gewesen :-)

 halb so wild. Ich versuche sowieso erst einmal den echten xinetd-Weg. ;-)

Das ist wahrscheinlich eh besser :)

 man xinetd: Habe ich gemacht. Wesentlich ist in diesem Zusammenhang der 
 Eintrag includedir:

Das Wesentliche findest du ganz am Ende der manpage:
SEE ALSO
xinetd.conf(5)

man 5 xinetd.conf beschreibt dann das Format der config files
detailliert und mit Beispielen.
Aber die config für tftp wurde inzwischen ja eh schon genannt.

Gruß,
Andreas



-- 
Haeufig gestellte Fragen und Antworten (FAQ): 
http://www.de.debian.org/debian-user-german-FAQ/

Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED]
mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)



Booten über TFTP

2006-10-11 Diskussionsfäden Mag. Leonhard Landrock
Hallo Liste!

Ich möchte über TFTP booten. :-) In der Folge geht es um FAI, aber zunächst 
muss ich einmal booten können. ;-)

Derzeit scheint der TFTPd nicht so zu tun, wie er soll.

Habe mir erst einmal aftpd und aftp installiert. Die Installation 
von aftpd hat noch folgendes gemeldet:

Wähle vormals abgewähltes Paket atftpd.
(Lese Datenbank ... 208424 Dateien und Verzeichnisse sind derzeit 
installiert.)
Entpacke atftpd (aus .../atftpd_0.7.dfsg-1_i386.deb) ...
Richte atftpd ein (0.7.dfsg-1) ...
- IMPORTANT INFORMATION FOR XINETD USERS --
The following line will be added to your /etc/inetd.conf file:

tftpdgram   udp wait
nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 
5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 
1 --maxthread 100 --verbose=5  /srv/tftp

If you are indeed using xinetd, you will have to convert the
above into /etc/xinetd.conf format, and add it manually. See
/usr/share/doc/xinetd/README.Debian for more information.
---


Drücken Sie zum Fortsetzen die Eingabetaste.

So weit, so gut. Also ein Blick in /usr/share/doc/xinetd/README.Debian 
geworfen:

README.Debian for xinetd
 

  - xinetd features an inetd.conf compatibility mode. When started with the
-inetd_compat option, xinetd first reads its own configuration file
(/etc/xinetd.conf), then /etc/inetd.conf.

  - If you need to run both netkit-inetd and xinetd, with different service
definitions, you can :
 * Remove -inetd_compat from /etc/default/xinetd so that xinetd doesn't 
read
   inetd.conf anymore.
 * Run /var/lib/dpkg/info/xinetd.postrm remove
 * Run update-rc.d inetd defaults

-- Thomas Seyrat [EMAIL PROTECTED]
   Sun, 18 Apr 2004 13:30:04 +0200

dpkg meint zum Thema xinetd:

dpkg --status xinetd
Package: xinetd
Status: install ok installed

Also einen Blick nach /etc/xinetd.conf geworfen. Hilft mir nicht viel 
weiter. Zur Sicherheit dpkg --status netkit-inetd aufgerufen:

Package: netkit-inetd
Status: install ok installed

Ein kurzer Blick nach /etc/default/xinetd bringt Klarheit, dass 
nur XINETD_OPTS=-stayalive gestzt ist.

Jetzt kommt der aftp Client ins Spiel:

atftp --get --verbose --remote-file fai/pxelinux.0 --local-file pxelinux.0 
192.168.1.10 ausgeführt und gleich einmal mit Wireshark mitgeschnitten. 
Die atftp-Versuche sehen wie folgt aus:

[EMAIL PROTECTED]:~$ atftp --get --verbose --remote-file fai/pxelinux.0 
--local-file 
pxelinux.0 192.168.1.100
Verbose mode on.
timeout: retrying...
timeout: retrying...
timeout: retrying...
timeout: retrying...
timeout: retrying...
tftp: unknown error.
tftp: aborting

Wireschark sagt dazu im wesentlichen folgendes:

1-A) Internet Protocol, Src: 192.168.1.100 (192.168.1.100), Dst: 192.168.1.100 
(192.168.1.100)
1-B) User Datagram Protocol, Src Port: 32796 (32796), Dst Port: tftp (69)
1-C) Trivial File Transfer Protocol
1-C-a) Opcode: Read Request (1)
1-C-b) Source File: fai/pxelinux.0
1-C-c) Type: octet

2-A) Internet Protocol, Src: 192.168.1.100 (192.168.1.100), Dst: 192.168.1.100 
(192.168.1.100)
2-B) Internet Control Message Protocol
2-B-a) Type: 3 (Destination unreachable)
2-B-b) Code: 3 (Port unreachable)
2-B-c) Checksum: 0x7c4d [correct]
2-B-d) Internet Protocol, Src: 192.168.1.100 (192.168.1.100), Dst: 
192.168.1.100 (192.168.1.100)
2-B-e) User Datagram Protocol, Src Port: 32796 (32796), Dst Port: tftp (69)
2-B-f) Trivial File Transfer Protocol
2-B-f-1) Opcode: Read Request (1)
2-B-f-2) Source File: fai/pxelinux.0
2-B-f-3) Type: octet

Diese Einträge (TFTP Anfrage Client und ICMP Antwort (?) Server) wiederholen 
sich dann.

Fakt ist, dass ich keine Datei über TFTP erhalte.

Was muss ich prüfen bzw. machen, um TFTP zum laufen zu bekommen?

LG,
Leonhard.



Re: Booten über TFTP

2006-10-11 Diskussionsfäden Mag. Leonhard Landrock
Habe noch eine Ergänzung.

Am Mittwoch, 11. Oktober 2006 17:27 schrieb Mag. Leonhard Landrock:
 Hallo Liste!

 Ich möchte über TFTP booten. :-) In der Folge geht es um FAI, aber zunächst
 muss ich einmal booten können. ;-)

 Derzeit scheint der TFTPd nicht so zu tun, wie er soll.

[...]

 Was muss ich prüfen bzw. machen, um TFTP zum laufen zu bekommen?

Der Versuch TFTP zu Testzwecken im Nicht-Daemon Modus - BTW: wie nennt man das 
eiogentlich korrekt? - zu starten funktioniert auch nicht.

[EMAIL PROTECTED]:~# atftpd --port 12345 /srv/tftp/
Usage: tftpd [options] [directory]
 [options] may be:
  -t, --tftpd-timeout value: number of second of inactivity before exiting
  -r, --retry-timeout value: time to wait a reply before retransmition
  -m, --maxthread value: number of concurrent thread allowed
  -v, --verbose [value]  : increase or set the level of output messages
  --trace: log all sent and received packets
  --no-timeout   : disable 'timeout' from RFC2349
  --no-tisize: disable 'tsize' from RFC2349
  --no-blksize   : disable 'blksize' from RFC2348
  --no-multicast : disable 'multicast' from RFC2090
  --logfile file   : logfile to log logs to ;-)
  --pidfile file   : write PID to this file
  --daemon   : run atftpd standalone (no inetd)
  --no-fork  : run as a daemon, don't fork
  --user user[.group]  : default is nobody
  --group group: default is nogroup
  --port port  : port on which atftp listen
  --bind-address IP: local address atftpd listen to
  --mcast-ttl: ttl to used for multicast
  --mcast-addr address list: list/range of IP address to use
  --mcast-port port range  : ports to use for multicast transfer
  --pcre file  : use this file for pattern replacement
  --pcre-test file : just test pattern file, not starting server
  --mtftp file : mtftp configuration file
  --mtftp-port port: port mtftp will listen
  --no-source-port-checking  : violate RFC, see man page
  --mcast-switch-client  : switch client on first timeout, see man page
  -V, --version  : print version information
  -h, --help : print this help

 [directory] must be a world readable/writable directories.
 By default /tftpboot is assumed.

Das gleiche Ergebnis erhalte ich auch wenn ich als Verzeichnis /tmp 
angebe. /tmp hat folgende Attribute:

[EMAIL PROTECTED]:~# ls /tmp/ -ald
drwxrwxrwx 9 root root 320 2006-10-11 17:35 /tmp/

LG,
Leonhard.



Re: Booten über TFTP

2006-10-11 Diskussionsfäden Mag. Leonhard Landrock
Am Mittwoch, 11. Oktober 2006 17:54 schrieb Mag. Leonhard Landrock:
 Habe noch eine Ergänzung.

 Am Mittwoch, 11. Oktober 2006 17:27 schrieb Mag. Leonhard Landrock:
  Hallo Liste!
 
  Ich möchte über TFTP booten. :-) In der Folge geht es um FAI, aber
  zunächst muss ich einmal booten können. ;-)
 
  Derzeit scheint der TFTPd nicht so zu tun, wie er soll.

 [...]

  Was muss ich prüfen bzw. machen, um TFTP zum laufen zu bekommen?

 Der Versuch TFTP zu Testzwecken im Nicht-Daemon Modus - BTW: wie nennt man
 das eiogentlich korrekt? - zu starten funktioniert auch nicht.

 [EMAIL PROTECTED]:~# atftpd --port 12345 /srv/tftp/
 Usage: tftpd [options] [directory]
  [options] may be:
   -t, --tftpd-timeout value: number of second of inactivity before
 exiting -r, --retry-timeout value: time to wait a reply before
 retransmition -m, --maxthread value: number of concurrent thread
 allowed -v, --verbose [value]  : increase or set the level of output
 messages --trace: log all sent and received packets
   --no-timeout   : disable 'timeout' from RFC2349
   --no-tisize: disable 'tsize' from RFC2349
   --no-blksize   : disable 'blksize' from RFC2348
   --no-multicast : disable 'multicast' from RFC2090
   --logfile file   : logfile to log logs to ;-)
   --pidfile file   : write PID to this file
   --daemon   : run atftpd standalone (no inetd)
   --no-fork  : run as a daemon, don't fork
   --user user[.group]  : default is nobody
   --group group: default is nogroup
   --port port  : port on which atftp listen
   --bind-address IP: local address atftpd listen to
   --mcast-ttl: ttl to used for multicast
   --mcast-addr address list: list/range of IP address to use
   --mcast-port port range  : ports to use for multicast transfer
   --pcre file  : use this file for pattern replacement
   --pcre-test file : just test pattern file, not starting server
   --mtftp file : mtftp configuration file
   --mtftp-port port: port mtftp will listen
   --no-source-port-checking  : violate RFC, see man page
   --mcast-switch-client  : switch client on first timeout, see man page
   -V, --version  : print version information
   -h, --help : print this help

  [directory] must be a world readable/writable directories.
  By default /tftpboot is assumed.

 Das gleiche Ergebnis erhalte ich auch wenn ich als Verzeichnis /tmp
 angebe. /tmp hat folgende Attribute:

 [EMAIL PROTECTED]:~# ls /tmp/ -ald
 drwxrwxrwx 9 root root 320 2006-10-11 17:35 /tmp/

OK. atftpd --daemon --port 12345 /srv/tftp/ funktioniert. Getestet 
mitels atftp --get --verbose --remote-file fai/pxelinux.0 --local-file 
pxelinux.0 192.168.1.100 12345.

Bleibt noch die erste Frage dieses Threads offen: Wie muss tftpd mit xinetd 
zusammenarbeiten um korrekt zu laufen?

LG,
Leonhard.



Re: Booten über TFTP

2006-10-11 Diskussionsfäden Andreas Putzo
Hallo,

On Oct 11, Mag. Leonhard Landrock wrote:
 OK. atftpd --daemon --port 12345 /srv/tftp/ funktioniert. Getestet 
 mitels atftp --get --verbose --remote-file fai/pxelinux.0 --local-file 
 pxelinux.0 192.168.1.100 12345.
 
 Bleibt noch die erste Frage dieses Threads offen: Wie muss tftpd mit xinetd 
 zusammenarbeiten um korrekt zu laufen?

Das steht doch in deiner ersten Mail.

 Richte atftpd ein (0.7.dfsg-1) ...
 - IMPORTANT INFORMATION FOR XINETD USERS --
 The following line will be added to your /etc/inetd.conf file:
 
 tftpdgram   udp wait
 nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300
 +--retry-timeout
 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl
 1 --maxthread 100 --verbose=5  /srv/tftp

und

 README.Debian for xinetd
  
 
   - xinetd features an inetd.conf compatibility mode. When started with
 +the
 -inetd_compat option, xinetd first reads its own configuration file
 (/etc/xinetd.conf), then /etc/inetd.conf.

(ohne jemals xinetd benutzt zu haben..) müsste es also reichen, xinetd mit 
-inetd_compat zu starten. Oder eben man xinetd lesen und gucken, wie die 
Konfiguration aussehen muß.

Gruß, Andreas



-- 
Haeufig gestellte Fragen und Antworten (FAQ): 
http://www.de.debian.org/debian-user-german-FAQ/

Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED]
mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)



Re: Booten über TFTP

2006-10-11 Diskussionsfäden Moritz Lenz
Hallo,

Mag. Leonhard Landrock wrote:
 Der Versuch TFTP zu Testzwecken im Nicht-Daemon Modus - BTW: wie nennt man 
 das 
 eiogentlich korrekt? - zu starten funktioniert auch nicht.

im Vordergrund?

Grüße,
Moritz

-- 
Moritz Lenz
http://moritz.faui2k3.org/



signature.asc
Description: OpenPGP digital signature


Re: Booten über TFTP

2006-10-11 Diskussionsfäden Christian Schmidt
Hallo Mag.,

Mag. Leonhard Landrock, 11.10.2006 (d.m.y):

 Ich möchte über TFTP booten. :-) In der Folge geht es um FAI, aber zunächst 
 muss ich einmal booten können. ;-)
 
 Derzeit scheint der TFTPd nicht so zu tun, wie er soll.
 
 Habe mir erst einmal aftpd und aftp installiert. Die Installation 
 von aftpd hat noch folgendes gemeldet:
[..] 
 dpkg meint zum Thema xinetd:
 
 dpkg --status xinetd
 Package: xinetd
 Status: install ok installed
 
 Also einen Blick nach /etc/xinetd.conf geworfen. Hilft mir nicht viel 
 weiter. Zur Sicherheit dpkg --status netkit-inetd aufgerufen:
 
 Package: netkit-inetd
 Status: install ok installed
 
 Ein kurzer Blick nach /etc/default/xinetd bringt Klarheit, dass 
 nur XINETD_OPTS=-stayalive gestzt ist.

Die einzelnen Dienste, die der xinetd verwalten soll, musst Du in
einzelnen Dateien in /etc/xinetd.d konfigurieren.

$KOLLEGE hat da gerade auch ein wenig mit gekaempft. Ich klaue einfach
mal die von ihm getaetigten Eintraege:

$ cat /etc/xinetd.d/tftpd
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/atftpd
server_args =/tftpboot
bind = 1.2.3.4
flags = IPv4
}

Das ganze hat dann auch erst funktioniert, nachdem er /etc/hosts.allow um
folgende Zeilen erweitert hatte:
# Achtung: xinetd und atftpd sehen jeweils anderen Namen fuer
# 'atftpd' = 'atftpd UND 'in.tftpd' MUESSEN *BEIDE* hier definiert
# sein !
in.tftpd: 1.2.3.5. 1.2.3.6
atftpd: 1.2.3.5. 1.2.3.6

Wenn's hilft, bedanke Dich bei ziehe at chemie.uni-hamburg.de. ;-)

Gruss/Regards,
Christian Schmidt

-- 
Jeder sieht, was du scheinst. Nur wenige fühlen, wie du bist.
-- Niccolò Machiavelli


signature.asc
Description: Digital signature