Install Windows 7 over PXE from Linux without WAIK

  • 1. Overview
  • 2. Services
  • 3. Boot Files
  • 4. Unattended files
  • 5. Troubleshooting
  • 2. Configure and start services

    2.1 dhcp

    Start the dhcp server
    /work/init.d/dhcpd start
    Here's what the dhcpd.conf looks like, you'll want to make changes to the ip-addresses in red:
    log-facility local6;
    ddns-update-style ad-hoc;
    ddns-hostname = concat("station-",binary-to-ascii(10,8,"-",leased-address));
    option host-name = config-option server.ddns-hostname;
    next-server ;
    if substring ( option vendor-class-identifier, 0, 9) = "PXEClient"
      filename "pxelinux.0" ;
      next-server ;
    subnet netmask {
      option routers;
      option domain-name-servers ;
      range ;
      max-lease-time 300;
    The pxelinux.0 is the boot file that starts the whole pxe process. Once a client boots that file is downloaded first, which in turn downloads the configuration file pxelinux.cfg/default. That file looks like this:
    default menu.c32
    prompt 0
    noescape 1
    allowoptions 0
    menu title Choose the system to install
    menu color tabmsg 37;40      #80ffffff #00000000
    menu color hotsel 30;47      #40000000 #20ffffff
    menu color sel 30;47      #40000000 #20ffffff
    menu color scrollbar 30;47      #40000000 #20ffffff
    menu width 80
    menu margin 22
    menu passwordmargin 26
    menu rows 6
    menu tabmsgrow 15
    menu cmdlinerow 15
    menu endrow 24
    menu passwordrow 12
    menu timeoutrow 13
    menu vshift 6
    menu passprompt Enter Password:
    label LOCALBOOT
      menu label ^Boot local disk
      localboot 0
      timeout 100
    label system1
      menu label system1
      kernel system1/wdsnbp.0
    label system2
      menu label system2
      kernel system2/wdsnbp.0

    3.2 tftpd

    Start the tftp daemon
    /work/init.d/tftpd start
    That starts the tftpd with the following options:
    /usr/sbin/in.tftpd -l -v -v -v -m /work/conf/tftpd.conf -s /work/tftproot
    The config file /work/conf/tftpd.conf only remaps the backslash to a slash:
    rg \\ /

    3.3 samba

    Start the samba server
    /work/init.d/smb start
    That make sure that the directory /work/sambashare gets exported as the sambashare REMINST. This is the important part of the smb.conf file:
    browsable = true
    read only = no
    guest ok = yes
    path = /work/sambashare

    3.4 binl

    Start the binl server
    /work/init.d/binl start
    That will start the binl service with the following parameters:
    /work/bin/ -d -l /work/log/tftpd.log /work/conf/devlist.cache
    The logfile is important here, we'll need to read that later on. The binl service determines what bootfile the client has downloaded recently by running the following script. The script searches the logfile of the tftpd and returns the location of the bcd file that is in the same directory as the file that it retrieved. This is nescessary because we want to know what option was selected from the PXE boot menu.
    tail -1000 $LOGFILE | \
      grep "RRQ from $IPADDR " | \
      grep wdsnbp.0 | \
      tail -1 | \
      awk '{print $2 }' FS=\/

    Continue to part 3

  • Go to part 1: Overview
  • Go to part 2: Configuring and starting services
  • Go to part 3: Prepare the windows boot files
  • Go to part 4: Prepare the unattended installation files
  • Go to part 5: Troubleshooting