Welcome to the new location of Alien's Wiki, sharing a single dokuwiki install with the SlackDocs Wiki.

Welcome to Eric Hameleers (Alien BOB)'s Wiki pages.

If you want to support my work, please consider a small donation:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
slackware:pxe [2006/09/27 21:26] – Fixes alienslackware:pxe [2006/10/01 20:41] – Another typo fixed (tnaks volkerdi!). alien
Line 2: Line 2:
  
  
-When the time comes to install Slackware on your computer, you have a limited number of options regarding the location of your Slackware packages. Either youinstall them from the (un)official Slackware CDROM or DVD, or you copy them to a pre-existing hard disk partition before starting the installation procedure, or you fetch the packages from a [[slackware:samba#setting_up_nfs_on_slackware|NFS server]].+When the time comes to install Slackware on your computer, you have a limited number of options regarding the location of your Slackware packages. Either you install them from the (un)official Slackware CDROM or DVD, or you copy them to a pre-existing hard disk partition before starting the installation procedure, or else you fetch the packages from a [[slackware:samba#setting_up_nfs_on_slackware|NFS server]].
  
 The number of possible options for booting your Slackware installer is similarly limited: either you boot your computer from the bootable first CDROM of the Slackware CD set, or from the DVD, or (in those cases where the computer BIOS refuses to recognize the CD as bootable) create boot/root floppies and boot from those. There is even loadlin, the DOS based Linux starter, but let's not concern ourselves with the past today. The number of possible options for booting your Slackware installer is similarly limited: either you boot your computer from the bootable first CDROM of the Slackware CD set, or from the DVD, or (in those cases where the computer BIOS refuses to recognize the CD as bootable) create boot/root floppies and boot from those. There is even loadlin, the DOS based Linux starter, but let's not concern ourselves with the past today.
Line 52: Line 52:
 For ease of instruction, I will make a number of assumptions. These assumptions are reflected in IP addresses and address ranges that I use in my examples, in the names of directories, computers and network domains. This means that if **you** use the examples in this article, you should make certain that you replace all occurrences of these specifics with values that apply to your own network. For ease of instruction, I will make a number of assumptions. These assumptions are reflected in IP addresses and address ranges that I use in my examples, in the names of directories, computers and network domains. This means that if **you** use the examples in this article, you should make certain that you replace all occurrences of these specifics with values that apply to your own network.
  
-  * Our example network uses IP addresses in the range of ''192.168.0.0'' to ''192.168.0.254''. This is equivalent to a network range **192.168.0.0/24** or **192.168.0.0/255.255.255.0**.+  * Our example network uses IP addresses in the range of **''192.168.0.0''** to **''192.168.0.254''**. This is equivalent to a network range **192.168.0.0/24** or **192.168.0.0/255.255.255.0**.
  
-  * Our network server will have the IP address of **192.168.0.1** and the default gateway is **192.168.0.10**. Server and gateway do not need to be the same physical machine.+  * Our network server will have the IP address of **192.168.0.1** and the default gateway is **192.168.0.10**. Server and gateway can be (but do not need to bethe same physical machine.
  
-  * The IP address range that the DHCP server will use to lease to DHCP/BOOTP enabled computers is ''192.168.0.50'' to ''192.168.0.100''.+  * The IP address range that the DHCP server will use to lease to DHCP/BOOTP enabled computers is **''192.168.0.50''** to **''192.168.0.100''**.
  
-  * The DNS domain will be "''my.lan''".+  * The DNS domain will be "**''my.lan''**".
  
-  * The server will run all required services, i.e. acts as the LAN's DNS,DHCP, TFTP and NFS server. If you decide to separate DHCP and TFTP services onto two different servers (it does not matter where the NFS server runs), I will add a comment on what you should take care of in the [[#dhcp|DHCP]] section that comes next.+  * The server will run all required services, i.e. acts as the LAN'**DNS,DHCP, TFTP and NFS** server. If you decide to separate DHCP and TFTP services onto two different servers (it does not matter where the NFS server runs), I will add a comment on what you should take care of in the [[#dhcp|DHCP]] section that comes next.
  
   * Directories are used as follows:   * Directories are used as follows:
-    * Toplevel of the complete Slackware 11.0 directory tree (excluding the source code if you're short on disk space) is ''/mirror/Slackware/slackware-11.0'' +    * Toplevel of the complete Slackware 11.0 directory tree (excluding the source code if you're short on disk space) is **''/mirror/Slackware/slackware-11.0''** 
-    * The directory where we store the boot files for the TFTP server is ''/tftpboot/slackware-11.0''+    * The directory where we store the boot files for the TFTP server is **''/tftpboot/slackware-11.0''**
  
 ==== DHCP ==== ==== DHCP ====
Line 85: Line 85:
 group { group {
   allow bootp;   allow bootp;
 +  next-server 192.168.0.1;
   use-host-decl-names on;   use-host-decl-names on;
   if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {   if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
Line 98: Line 99:
   }   }
 } }
-</code> This makes the DHCP server recognize network boot clients that use PXE and serves them the PXElinux boot loader ''/slackware-11.0/pxelinux.0''. What this boot loader does will be explained further down the article. +</code> This makes the DHCP server recognize network boot clients that use PXE and serves them the PXElinux boot loader ''/slackware-11.0/pxelinux.0''. What this boot loader does will be explained further down the article.\\ \\ The ''next-server'' parameter contains the IP adddress of the TFTP server. This will often be identical to the DHCP server's IP address, but if you have a TFTP server that is running on a different IP address than the DHCP server (i.e. they run on separate servers) you will have to add the remote IP address instead, like this (assuming the TFTP server is running on IP address 192.168.0.254): <code>
- +
-<note tip>If you have a TFTP server that is running on a different IP address than the DHCP server (i.e. they run on separate servers) yopu will have to add an extra line to this PXE //group block// that goes like this (assuming the TFTP server is running on IP address 192.168.0.254): <code>+
 next-server 192.168.0.254;</code> next-server 192.168.0.254;</code>
 +
 +<note tip>If you are running a version of ISC dhcpd that is >= 3.0.3 , then the addition of a ''next-server <ipaddress>;'' line is **mandatory**. For older releases this was only needed if the TFTP and DHCP Servers actually had different addresses.\\ If you fail to set the ''next-server'' address, the //siaddr// field in the data returned to the client is set to zero where in the past it would default to the DHCP server's own IP address (which often happened to be the IP address of the TFTP server as well). The PXE client uses the //siaddr// field to determine the IP address of the TFTP server and so the PXE booting will stall at the point of looking for a TFTP server.
 </note> </note>
  
 <note tip> <note tip>
-If you are already using dnsmasq as your DNS/DHCP server, then the above instructions for the ISC DHCP server are not applicable to your setup. In that case, I have another [[:slackware:qemu#pxe_booting_your_qemu_virtual_machine|Wiki article (which focuses on QEMU)]] for you where I have documented the required modifications to the dnsmasq server. +If you are already using **dnsmasq** as your DNS/DHCP server, then the above instructions for the ISC DHCP server are not applicable to your setup. In that case, I have another [[:slackware:qemu#pxe_booting_your_qemu_virtual_machine|Wiki article (which focuses on QEMU)]] for you where I have documented the required modifications to the dnsmasq server. 
 </note> </note>
  
Line 116: Line 117:
 </code> </code>
 We need to create the directory ''/tftpboot'' which will hold the bootstrap files that tftpd will serve:<code> We need to create the directory ''/tftpboot'' which will hold the bootstrap files that tftpd will serve:<code>
-mkdir /tftpboot</code> This directory is the root of a secure jail (the ''-s /tftproot'' parameter in ''/etc/inetd.conf'').+mkdir /tftpboot</code> This directory is the root of a secure jail (the ''-s /tftpboot'' parameter in ''/etc/inetd.conf'').
 The tftpd service is now configured and running. We just need to populate it's root directory, but I'll keep that for another paragraph. The tftpd service is now configured and running. We just need to populate it's root directory, but I'll keep that for another paragraph.
  
Line 238: Line 239:
 sed -i -e "s/ramdisk_size=[[:digit:]]*/ramdisk_size=9500"/ \ sed -i -e "s/ramdisk_size=[[:digit:]]*/ramdisk_size=9500"/ \
        -e "s#/kernels/#kernels/#" \        -e "s#/kernels/#kernels/#" \
-       /tftpboot/pxelinux.cfg/default+       /tftpboot/slackware-11.0/pxelinux.cfg/default
 </code> </code>
  
Line 263: Line 264:
  
 Good luck! Good luck!
- 
  
 ====== Example configuration scripts ====== ====== Example configuration scripts ======
Line 284: Line 284:
 # Allow bootp requests # Allow bootp requests
 allow bootp; allow bootp;
 +
 +# Point to the TFTP server:
 +next-server 192.168.0.1;
  
 # Default lease is 1 week (604800 sec.) # Default lease is 1 week (604800 sec.)
Line 393: Line 396:
   allow bootp;   allow bootp;
  
-  # Only use next-server if the TFTP service runs on another server+  # Point to the TFTP server (required parameter!)
-  # You'd fill in the IP address of that TFTP server here+  next-server 192.168.0.1; 
-  #next-server 192.168.0.11;+
   # If you want to log the boot process, you will need to configure   # If you want to log the boot process, you will need to configure
   # your logserver to allow logging from remote hosts.   # your logserver to allow logging from remote hosts.
   #option log-servers 192.168.0.1;   #option log-servers 192.168.0.1;
 +
   use-host-decl-names on;   use-host-decl-names on;
  
 PXE: Installing Slackware over the network ()
SlackDocs