Difference between revisions of "TFTP"

From ArchWiki
Jump to: navigation, search
Line 1: Line 1:
 
[[Category:HOWTOs (English)]]
 
[[Category:HOWTOs (English)]]
Okay i want to describe here how to set up a tftpd server under Arch Linux.
+
{{stub}}
  
At first thing is to install all necessary stuff:
+
== Introduction ==
 +
This HOWTO describes how to set up a tftpd server under Arch Linux.
  
  pacman -S mkpxelinux tftpd-hpa dhcpd
+
== Installation ==
 
+
The first thing is to install all necessary stuff:
Now we need to do some configure stuff at first we will create our dhcpd.conf file.
+
  # pacman -S mkpxelinux tftpd-hpa dhcpd
 
+
The config is located in /etc/
+
 
+
and have to look like this (basic dhcpd config)
+
  
 +
== Configuration ==
 +
At first we will create a /etc/dhcpd.conf file. It has to look like this (basic dhcpd config):
  
 
  ddns-update-style interim;
 
  ddns-update-style interim;
 
   
 
   
  subnet *your subnet here* netmask *here your netmask* {
+
  subnet *'''your subnet'''* netmask *'''your netmask'''* {
         option routers                  *here ip of your router*;
+
         option routers                  *'''IP of your router'''*;
         option subnet-mask              *your subnet here again ;)*;
+
         option subnet-mask              *'''your subnet again'''*;
 
   
 
   
         option domain-name              "here you can put your domain name if you dont have one take example.com";
+
         option domain-name              "'''here you can put your domain name if you dont have one take example.com'''";
 
   
 
   
 
         option time-offset              -18000;    # Eastern Standard Time
 
         option time-offset              -18000;    # Eastern Standard Time
         next-server *here ip of your machine where dhcpd is running*;
+
         next-server *'''IP of your machine where dhcpd is running'''*;
 
         filename "pxelinux.0";
 
         filename "pxelinux.0";
 
   
 
   
Line 28: Line 27:
 
         allow bootp;
 
         allow bootp;
 
   
 
   
+
         range *'''the range of ip addresses your dhcpd is allow to take, example: 10.0.0.10 10.0.0.200'''*;
         range *here the range of ip addresses your dhcpd is allow to take example: 10.0.0.10 10.0.0.200;
+
 
  }
 
  }
  
remove the ** form the config ;).
+
Remove the ** from the config.
  
after this you have to run
+
After this you have to run:
 +
# mkpxeboot -a
  
mkpxeboot -a
+
This will create all images and stuff to boot.
  
this will create all images and stuff to boot.
 
 
Now we replace the kernel and the initrd.img with the newest from the install iso.
 
Now we replace the kernel and the initrd.img with the newest from the install iso.
 +
$ wget ftp://ftp.archlinux.org/other/0.8/i686/ftp-0.8-beta2-20070222-i686.iso
 +
When the download is finished, we nearly finished.
 +
# mount -o loop /where/the/iso/is/located /path/to/mount/
 +
# cp /path/to/mount/isolinux/initd.img /var/tftpboot/
 +
# cp /path/to/mount/isolinux/vmlinuz /var/tftpboot/
  
wget ftp://ftp.archlinux.org/other/0.8/i686/ftp-0.8-beta2-20070222-i686.iso
+
Now last config and then we can load all the stuff:
 
+
  # nano /etc/hosts.allow
when download is finished we nearly finished.
+
Add these lines:
 
+
mount -o loop /where/the/iso/is/located /path/to/mount/
+
cp /path/to/mount/isolinux/initd.img /var/tftpboot/
+
cp /path/to/mount/isolinux/vmlinuz /var/tftpboot/
+
 
+
now last config and then we can load all the stuff
+
 
+
  nano/vi/joe... /etc/hosts.allow
+
+
and add this line:
+
 
  tftpd: ALL
 
  tftpd: ALL
 
  in.tftpd: ALL
 
  in.tftpd: ALL
  
now do
+
Now do:
 
+
  # /etc/rc.d/tftpd start
  /etc/rc.d/tftpd start
+
And in a terminal:
and in a terminal
+
  # dhcpd
  dhcpd
+
  
Now you can start the pc you want to install.
+
Now you can start the PC you want to install.
  
 
Good Luck!
 
Good Luck!

Revision as of 02:26, 9 December 2008

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:TFTP#)

Introduction

This HOWTO describes how to set up a tftpd server under Arch Linux.

Installation

The first thing is to install all necessary stuff:

# pacman -S mkpxelinux tftpd-hpa dhcpd

Configuration

At first we will create a /etc/dhcpd.conf file. It has to look like this (basic dhcpd config):

ddns-update-style interim;

subnet *your subnet* netmask *your netmask* {
        option routers                  *IP of your router*;
        option subnet-mask              *your subnet again*;

        option domain-name              "here you can put your domain name if you dont have one take example.com";

        option time-offset              -18000;     # Eastern Standard Time
        next-server *IP of your machine where dhcpd is running*;
        filename "pxelinux.0";

        allow booting;
        allow bootp;

        range *the range of ip addresses your dhcpd is allow to take, example: 10.0.0.10 10.0.0.200*;
}

Remove the ** from the config.

After this you have to run:

# mkpxeboot -a

This will create all images and stuff to boot.

Now we replace the kernel and the initrd.img with the newest from the install iso.

$ wget ftp://ftp.archlinux.org/other/0.8/i686/ftp-0.8-beta2-20070222-i686.iso

When the download is finished, we nearly finished.

# mount -o loop /where/the/iso/is/located /path/to/mount/
# cp /path/to/mount/isolinux/initd.img /var/tftpboot/
# cp /path/to/mount/isolinux/vmlinuz /var/tftpboot/

Now last config and then we can load all the stuff:

# nano /etc/hosts.allow

Add these lines:

tftpd: ALL
in.tftpd: ALL

Now do:

# /etc/rc.d/tftpd start

And in a terminal:

# dhcpd

Now you can start the PC you want to install.

Good Luck!