Compaq BL10e Setting up a Linux PXE server and integrating clients - Page 17

For the clients, dhcpd.conf script

Page 17 highlights

} || { echo Unable to mount that directory, no files found } } else # SOURCE dir is not empty, try to copy those files. cd $SOURCE copyfiles fi else # This is not a directory. FILETYPE=`file $SOURCE` case "$FILETYPE" in # "x86 boot sector, system SYSLINUX, FAT (12 bit)" *boot\ sector,\ system\ SYSLINUX,\ FAT\ *) mkdir $TMPDIR/tmp.dir.$$; mount $SOURCE $TMPDIR/tmp.dir.$$ -o loop; cd $TMPDIR/tmp.dir.$$; copyfiles; cd /; umount $TMPDIR/tmp.dir.$$; rmdir $TMPDIR/tmp.dir.$$; ;; *) echo Sorry, image type not found; ;; esac fi For the clients Sample scripts and files to be used as guidelines for creating your own are provided in this appendix. These scripts and files are a necessary part of the PXE installation process. dhcpd.conf script A typical "dhcpd.conf" script for Red Hat Linux 8.0 is similar to the following: ddns-update-style interim; ignore client-updates; # This is an upstream network required entry for multiple networks. subnet 10.10.20.0 netmask 255.255.255.0 { } # Pxe Network subnet 172.48.0.0 netmask 255.255.0.0 { # --- default gateway option routers 172.48.0.1; 17

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

} || {
echo Unable to mount that directory, no files found
}
}
else
# SOURCE dir is not empty, try to copy those files.
cd $SOURCE
copyfiles
fi
else
# This is not a directory.
FILETYPE=`file $SOURCE`
case "$FILETYPE" in
# "x86 boot sector, system SYSLINUX, FAT (12 bit)"
*boot\ sector,\ system\ SYSLINUX,\ FAT\ *)
mkdir $TMPDIR/tmp.dir.$$;
mount $SOURCE $TMPDIR/tmp.dir.$$ -o loop;
cd $TMPDIR/tmp.dir.$$;
copyfiles;
cd /;
umount $TMPDIR/tmp.dir.$$;
rmdir $TMPDIR/tmp.dir.$$;
;;
*)
echo Sorry, image type not found;
;;
esac
fi
For the clients
Sample scripts and files to be used as guidelines for creating your own are provided in this appendix.
These scripts and files are a necessary part of the PXE installation process.
dhcpd.conf script
A typical "dhcpd.conf" script for Red Hat Linux 8.0 is similar to the following:
ddns-update-style interim;
ignore client-updates;
# This is an upstream network required entry for multiple networks.
subnet 10.10.20.0 netmask 255.255.255.0 {
}
# Pxe Network
subnet 172.48.0.0 netmask 255.255.0.0 {
# --- default gateway
option routers
172.48.0.1;
17