A. PXELINUX/SYSLINUX boot loader
In this example I have used Syslinux 4:06 (not most recent version but version 6.0 + has a problem, so I decided that this older version works just fine) for all MS installations (including WinXP <-> Win 10).
Syslinux download URL: Index of /pub/linux/utils/boot/syslinux/
After downloading and decompressing, it is necessary to do the following:
PXE |--pxelinux.cfg |-- default |-- memdisk |-- menu.c32 |-- pxelinux.0
Now we need to make a modification of the 'default' file in pxelinux.cfg folder.
Open the file and put the following lines in:
DEFAULT menu.c32 TIMEOUT 300 ALLOWOPTIONS 0 PROMPT 0 MENU TITLE PXE Boot Menu LABEL Windows x64 MENU LABEL WinPE x64 KERNEL memdisk append iso raw initrd=winpe_x64.iso LABEL Windows x86 MENU LABEL WinPE x86 KERNEL memdisk append iso raw initrd=winpe_x86.iso
Now save the file.
Ofc this is a sample of my file that I use and now I will explain the structure.
The first four lines are something that is defined by default, and as it is evident menu.c32 file located in the root folder of PXE is called.
Next, the 'MENU TITLE' is the title of the PXE menu that appears after a successful network boot. Here, of course, you can put absolutely anything.
The following 4 lines define an item in the PXE menu. In this example, I chose WinPE x64 as my title (MENU LABEL) because I'm going to use a specific ISO file to launch the installation support for x64-bit OS. The kernel file that is located in the root of the PXE folder is memdisk. The last parameter is the actual name of the file you want to boot. As it can be seen in one line I call winpe_x64 while in the second x86 ISO.
WinPE - these are Preinstallation Environment ISO files that were built using a Win7 machine with Windows AIK - http://www.microsoft.com/en-us/download ... px?id=5753
ISO files that are used in this example are in the root folder of PXE. PXE folder situation now looks like this:AIK is free. However, to create a WinPE ISO you will need a) Win (7) machine b) Win OS installation files. For this reason, I will not explain how to make a WinPE disc (there are many YT clips as well as Technet documentation), nor will I publicly publish ISO images. If anyone has a problem or question feel free to PM me on this matter.
PXE |--pxelinux.cfg |-- default |-- memdisk |-- menu.c32 |-- pxelinux.0 |-- winpe_x64.iso |-- winpe_x86.iso
One note. PXE is the case SENSITIVE Therefore it is essential that whatever you write in the default file you write it correctly. If for example, the ISO file contains uppercase and lowercase letters, write literally.
B. CREATING PXE/TFTP environment
As you know a working DHCP service needs to be running in your network. For this, I have let Syno NAS sort that part considering I have a locked ISP router that doesn't allow me to make any modifications and point any network clients towards PXE server on the NAS.
I have decided to allow Syno to create a small pool of DHCP address within my current DHCP range that I know it's not being used, so there is no fear of conflict.
Within the DSM Control Panel it is necessary to open the category File Service and within it switch to TFTP/PXE tab.
Here you should activate the TFTP checkbox and select the TFTP root folder (PXE folder in this example). Changes in Advanced Settings are not necessary.
After that activate the checkbox in the PXE category and fill out all required fields:
Boot loader: pxelinux.0 (use the browse button to locate pxelinux.0 file in tftp root)
Network interface: probably there will be offered only one option and that is the name of Synology LAN interfaces (leave default values or change as needed)
DNS server: IP address of your router (or a dedicated DNS server - be sure to open ports if you use a dedicated one! Port 67 (DHCP) Port 69 (TFTP) Port 4011 (PXE) )
Start IP: starting IP address for the DHCP pool
End IP: end IP address for the DHCP pool
Netmask: depending on your IP class. exp: 255.255.255.0
Gateway: IP address of your GW
Press ‘Apply’ and that's it (for now). Everything is ready for PXE network boot. Now set your computer to boot from network interface and PXE menu should appear.
After the menu reads the state of 'default' file you will have a chance to boot of the corresponding ISO.
To be able to do the installation over the network you must have a folder with installation files for the appropriate OS. Syno NAS offers the option to mount the ISO file (so you don't have to copy it to a separate folder) and I use that option for every OS I wanna PXE boot (later in the process this folder will be accessible via the net use command)
C. USE WINPE ENVIRONMENT FOR NETWORK INSTALLATION
C.a (WIN XP)
As I stated in the beginning, Win XP network installation, unlike Win Vista -> Win 10 requires a little more attention. As is well-known XP installation passes through two stages (non-GUI and GUI), and is necessary to accomplish the following steps to make it work and load.
01. After it finishes booting, WinPE environment will welcome with a command prompt showing as X: drive
02. Since XP will not see the available drive at this point it is necessary to use diskpart command to create partitions, assigning drive letter and format the drive.
x:\ diskpart [enter]
diskpart: list disk [enter]
diskpart: select disk n [enter]
diskpart: create partition primary [enter]
diskpart: assign letter=C [enter]
diskpart: list partition [enter]
diskpart: select partition n [enter]
diskpart: active [enter]
diskpart: exit [enter]
x:\format c: [enter]
NEXT STEP IS VERY IMPORTANT
x:\ bootsect.exe /nt52 C: /force /mrb [enter]
x:\ net use z: \\IP_ADR_SYNO_NAS\WINXP folder /user:username [enter]
(we are mapping our installation source folder (where all the installation files are located) to a network letter (z) and using /user switch in order to authenticate. Enter the password as well. Once again I remind you that the installation ISO should be mounted as a virtual drive (Virtual mount option inside DSM) so its content should now be visible via the mapped network drive.
x:\ z:\<winxp folder>\i386\winnt32.exe /syspart:C: /tempdrive:C: /makelocalsource [enter]
(it is very important that there are NO SPACES while typing syspart and tempdrive commands and the drive letter. Also: after the drive letter is needed!)
After this step, you enter XP installation which will only copy the files to the drive. Upon completion of copying, Win XP GUI will close and return to the WinPE command prompt.
(we are done with our work in winpe and with exit command we intiate a reboot)
We now need to adjust the HDD/SSD as the primary boot device in BIOS and continue installing XP.
C.b (Win Vista -> Win10)
With 'modern' MS OS it is not required to do any preinstallation work (diskpart) but only start from the second stage (use the net use command). Of course when you map a network drive for let's say Win 7 or Win 10 just start setup.exe and follow further instructions.
Next set of steps is for booting linux (Ubuntu) installations.
PXE |--pxelinux.cfg (this is a folder) |-- default |--ubuntu-installer (this is a folder) |-- memdisk |-- menu.c32 |-- pxelinux.0 |-- winpe_x64.iso |-- winpe_x86.iso
LABEL Ubuntu Internet install MENU LABEL Ubuntu Internet install KERNEL ubuntu-installer/amd64/boot-screens/vesamenu.c32 APPEND ubuntu-installer/amd64/boot-screens/menu.cfg
So for the KERNEL paremtar we enter the path to the vesamenu.c32 file that is inside the specified structure. Additionally, the APPEND command lists the path to the menu.cfg menu.
For this scenario, I prepared a DVD Ubuntu 14.04 LTS version (ubuntu-14.04-desktop-amd64.iso) that I mounted using the Synology mount option
it is not necessary, the entire install can also be copied to an additional folder within the PXE folder, but it must be ensured that .disk folder is also copied.
PXE |--pxelinux.cfg (this is a folder) |-- default |--ubuntu-installer (this is a folder) |--ubuntu14dvd (this is a folder or Synology mount point) |-- memdisk |-- menu.c32 |-- pxelinux.0 |-- winpe_x64.iso |-- winpe_x86.iso
a) In the Control panel> File Service> Win / Mac / NFS (1 tab) there is an option to activate the NFS service:
b) Now it is necessary to configure NFS rights over the PXE folder. Control panel> Shared Folder> PXE (or how is the name of the folder in which the whole PXE is hosted) and then select the 'Edit' command. After that, the fourth tab is NFS Permissions. Here you need to create a client entry that will allow the computer (or more) certain rights over the NFS to the PXE folder.
Hostname or IP: one IP address or IP address range should be entered; IP addresses that PXE clients receive when contacting the PXE server over DHCP roles by Synology.
Privilege: Read-only (no need for write permissions)
Squash: no mapping (root privileges client)
Security: sys (other options are for Kerberos authentication)
DISABLE Enable asynchronous
The option 'Allow users to access mounted subfolders' should be turned on if the mount option is used by Synology, as opposed to the copied installation within the PXE folder.
If Permission denied form is encountered on the boot when the NFS mount command (explained later) appears, as a possible reason, it will be necessary to modify the NFS permissions within the etc/exports file.
Using SSH, log on to the NAS via root account and on the /etc/exports path modify the export file. Its original form will be similar to this:
and should look like this:
So insecure_locks need only be written as insecure.
LABEL Ubuntu DVD install MENU LABEL Ubuntu DVD install kernel ubuntu14dvd/casper/vmlinuz.efi append boot=casper netboot=nfs nfsroot=IP_ADDRESS_OF_YOUR_NAS:/volume1/PXE/ubuntu14dvd initrd=ubuntu14dvd/casper/initrd.lz
Therefore, the KERNEL parameter is also referred to the vmlinuz.efi file located inside the casper folder in the root of the DVD installation. The APPEND command has several parameters:
nfsroot (it is important to note that after the IP address of the NAS path must begin with the name / volume # / ... depending on the volume on which the PXE folder is located)
initrd (must point to initrd.lz or initrd.gz file, depending on the version of the installation)
If everything is configured as it should, the PXE boot should run and the installation via NFS.