linuxdebianserverdnsmasqipxe

Create a Debian imaging server for windows 7


Issue

I have been tasked with creating a Debian imaging server for our company. Unfortunately my knowledge with, both Linux and servers is very limited, (this is part of an up-skilling program).

Steps

Currently I have tried to follow the below tutorials on creating a PXEBoot server and a ProxyDHCP:

Originally I had tried to used a configured DHCP server on the Linux server which I had gotten working, however my manager advised that they would prefer the DHCP to come from the router instead.

So I have used apt-get to install below applications and followed sources to get the configs correctly. However it still doesn't seem 100% correct (see latest)

Task

So currently the task I have been set is per below:

  1. Has to be in Debian
  2. Has to be console based server only (no gui interface)
  3. DHCP has to come from router
  4. Server should deploy windows images
  5. Images taken need to bee compacted (all blank space removed)

I can only find Ubuntu guides for these PXEBoot and ProxyDHCP creations, and the problem with this is that the locations they refer to do not always exist in Debian. So I am stuck with half the options available to me, and because I have a limited knowledge here, I cannot identify where I am going wrong, or if these locations are elsewhere.

Can anyone provide me with a tutorial, or a set of command lines to help? I would really appreciate this.

Using

I am currently using (on Debian console):

  • TFTPD-HPA
  • DNSMASQ
  • iPXE
  • SysLinux

Latest

I have been able to get the dnsmaq and tftp-hpa service "working". This is to say when I run them they start. However I still don't seem to be able to boot into an installation with this up and running.

I have another thread on forums.debian.net/viewtopic.php?f=5&t=118315


Solution

  • I have been able to fix my issue using 3 applications and a lot of research. The applications I have used are; DNSMASQ, TFTPD-HPA and SAMBA These applications have been configured as per below:

    TFTPD-HPA

    `apt-get install tftpd-hpa
    nano /etc/default/tftpd-hpa
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/tftpboot/"
    TFTP_ADDRESS="<server address>:69"
    TFTP_OPTIONS="-4 –secure --create"
    RUN_DAEMON=”yes”
    OPTIONS="-l -s /tftpboot"
    mk dir /tftpboot
    mk dir /tftpboot/pxelinux.cfg`
    

    DNSMASQ

    apt-get install dnsmasq nano /etc/dnsmasq.conf Interface=eth0 port=0 log-dhcp log-queries log-facility=/var/log/dnsmasq.log tftp-root=/tftpboot dhcp-boot=pxelinux.0,<server name>,<server address> dhcp-range=192.168.1.10,proxy,255.255.255.0 dhcp-no-override pxe-prompt="Press F8 for boot menu", 2 pxe-service=X86PC, "comment", pxelinux

    SAMBA

    apt-get install samba nano /etc/samba/smb.conf [global] Workgroup = workgroup Server role = standalone server Dns proxy = no Wins support = yes Passwd program = /usr/bin/passwd %u Passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *Password\supdated\ssuccessfully* Syslog = 0 Log file = /var/log/smb.log.%m Max log size = 1000 Map to guest = bad user Usershare allow guests = yes Security = user [images] Comment = Network SAMBA share Path = tftpboot Create mask = 0775 Guest ok = yes Browseable = yes Read only = no Writeable = yes