[PXEBoot] windows 7 target

Greetings !!

Is anybody experienced same behaviour: the target computer discovered the DHCP server, obtained an IP, and found the TFTP server but nothing appeared at screen and the computer rebooted in loop.

I did such configuration long time ago and can not retreive the documentation I wrote so I’m digging then internet to find some clues to help me fix this.
I think the TFTP folder doesn’t contain a valid boot manager… I will set it up again using Windows AIK and try it again at work, next monday.

<NEXT>

This is the DHCP (working) configuration

option domain-name "stmartin";
 option domain-name-servers 192.168.1.254, 172.16.0.1;
 option routers 192.168.1.254;
 option ntp-servers 0.opensuse.pool.ntp.org;
 option lpr-servers 192.168.1.254;
 option netbios-name-servers 192.168.1.254;
 ddns-update-style none; 
 default-lease-time 604800;
 allow booting;
 allow bootp;
  
 subnet 192.168.1.0 netmask 255.255.255.0
 {
       range dynamic-bootp 192.168.1.5 192.168.1.45;
       default-lease-time 14400;
       max-lease-time 172800;
        
       filename "ISO/bootmgr";
       
       host rasalgethi {
            fixed-address 192.168.1.16;
            hardware ethernet 68:F7:28:35:75:DE;
       }
        
}

And the TFTP (working) configuration

TFTP_USER="tftp"
TFTP_OPTIONS=""
TFTP_DIRECTORY="/srv/tftpboot"

Looking at wireshark, it seems all the packets are transfered between both computers: https://paste.opensuse.org/3167687

That how I could suppose the boot manager failed and all the other involved services are working good.

<NEXT>

I have this kind of filesystem tree concering the /srv/tftpboot folder:

.
├── images
│   └── win7
├── pxelinux.cfg
└── suse-tftp-install

So I have to modify the FILENAME to pxelinux.0

option domain-name "dezordi.world";
option domain-name-servers 192.168.1.254, 172.16.0.1;
option routers 192.168.1.254;
option ntp-servers 0.opensuse.pool.ntp.org;
option lpr-servers 192.168.1.254;
option netbios-name-servers 192.168.1.254;
ddns-update-style none; 
default-lease-time 604800;
allow booting;
allow bootp;

subnet 192.168.1.0 netmask 255.255.255.0
{
  range dynamic-bootp 192.168.1.5 192.168.1.45;
  default-lease-time 14400;
  max-lease-time 172800;

        filename "pxelinux.0";

        host rasalgethi {
          fixed-address 192.168.1.16;
        hardware ethernet 68:F7:28:35:75:DE;
        }

}

The pxelinux.cfg/default contains

DEFAULT vesamenu.c32 
MENU TITLE Serveur PXE (2018 De Zordi)
MENU INCLUDE /pxelinux.cfg/master.cfg
menu color title 1;36;44 #ff8c00 #00000000 std 
prompt 0
timeout 300
ONTIMEOUT chainlocal

LABEL local
        MENU LABEL Boot local hard drive
        LOCALBOOT 0

LABEL Memtest
                KERNEL images/memtest

LABEL Installer Windows
                        LINUX memdisk
                        INITRD images/windows7sp1x64.iso
                        APPEND iso

…as this dvd image is bootable I expect the whole stuff to work.

Answers monday 19 nov 2018

First tests demonstrates that at least the syslinux is working ^^

http://paste.opensuse.org/38047691

Concerning the DHCP protocol I was surprised that it worked only once until I removed the /var/lib/dhcp/db/dhcpd.leases file

With this configuration the windows 7 launched but returned error indicating the system couldn’t continue as the media connection was lost.
I think it is related to the fact Windows 7 DVD was not built to boot in PXE.

So I created images using Windows ADK with copype and oscdimg to obtain .iso images for each architecture (amd64 and x86).
I modified the menu in order to offer the features to try boot installer for each arch in the pxelinux.cfg/default file.

DEFAULT vesamenu.c32 
MENU TITLE Serveur PXE (2018 De Zordi -- CSSM)
MENU INCLUDE /pxelinux.cfg/master.cfg
menu color title 1;36;44 #ff8c00 #00000000 std 
prompt 0
timeout 300
ONTIMEOUT chainlocal

LABEL local
        MENU LABEL Boot local hard drive
        LOCALBOOT 0

LABEL Memtest
                KERNEL images/memtest

LABEL Installer Windows amd64(alias pour x86_64)
                        LINUX memdisk
                        INITRD images/amd64/winpeamd64.iso
                        APPEND iso

LABEL Installer Windows x86
                        LINUX memdisk
                        INITRD images/x86/winpex86.iso
                        APPEND iso

I saw in many tutorials, in order to make it work good, we have to modify the bcd files (both for bios and uefi boot) using bcdedit, but I will try first with those iso files generated.
It was said this method (copype and oscdimg) will help you boot a windows 7 system using pxe protocol. Let’s try it.

It works but there is no language correct and, worst, no network driver >:(

I got a command line, supposed to be able to launch a “install.bat” or “autoexec.bat”, but NET USE is not usable rotfl! because of the lack of a ethernet driver :{

I’m trying to find a easy way to set up the whole thing in order to launch the setup.exe program to install Windows 7 on the remote computer.

The timeout to strike a key to launch the winPE image is too small, we have no time to read the informations then it boots on the local system…

Concerning the DHCP protocol I was surprised that it worked only once until I removed the /var/lib/dhcp/db/dhcpd.leases file

That can be fixed by decreasing the “default-lease-time” value in your dhcpd.conf to something shorter… Depending on how often you’re using or testing your disk, you may want to set it as short as maybe 60 and back it off at least to something like 120 when you go to Production use.

I also think you should take advantage that your disk isn’t automatically launching your install at the moment…
You should be able to test whether you’re really lacking NIC drivers (very unlikely but possible).
You may also have an incorrect or insufficient network configuration, in fact you should be doing simple, ordinary network troubleshooting like inspecting the network configuration from your DHCP. Or, if you’re using the disk in the same network then consider setting a permanent, static configuration.
And, test for name resolution, particularly if your network share is using a name and not an IP address.

TSU