Home > Articles > Linux PXE on Windows Deployment Services
Welcome on Frogg's web tools | Current date :
18/10/2021
SUMMARY

## . Tutorial Linux PXE on Windows Deployment Services

## . Requirement

### . WDS is using Preboot eXecution Environment (PXE)

### . WDS require DHCP & TFTP

### . Client requirement

## . WDS Installation

#### . Add role wizard

#### . Server selection

#### . WDS role selection

#### . Adding features

#### . Adding role confirmation

### . WDS Configuration

#### . Start WDS console

#### . Server type selection

#### . WDS files path selection

#### . DHCP configuration

#### . PXE secutiry settings

### . Adding Boot image

#### . Adding a boot image

## . Configuration Linux PXE

### . Syslinux

### . downloading Syslinux packages

### . copying Syslinux files to WDS server

#### . copying x84 syslinux-{version}\ files to server folder E:\RemoteInstall\

#### . copying x64 syslinux-{version}\ files to server folder E:\RemoteInstall\

#### . Files description

#### . Result

### . Add Linux PXE boot to WDS

## . Configuration

### . Configuration file

### . Adding Images

#### . Using memdisk

#### . Using initrd & nfsroot

#### . Using initrd & fetch

## . Advanced Configuration

### . PXE advanced configuration file option

#### . LABEL

#### . MENU BEGIN

#### . MENU EXIT

#### . INCLUDE

#### . MENU SEPARATOR

### . PXE screen customization

#### . Result :

### . PXE advanced configuration file sample

#### . pxelinux.cfg/default

#### . pxelinux.cfg/com_conf.cfg

#### . pxelinux.cfg/menu_main.cfg

#### . pxelinux.cfg/menu_ctools.cfg

#### . pxelinux.cfg/menu_ftools.cfg

#### . pxelinux.cfg/menu_linux.cfg

#### . pxelinux.cfg/menu_stools.cfg

## . Sample of images configuration

#### . Debian installer

#### . Lubuntu live

#### . Ubuntu live

#### . mfs BSD

#### . Gparted live

#### . Clonezilla live

#### . Refracta

#### . Hardware Detection live

#### . Memory Test live

#### . Comodo rescue disk live

#### . AVG rescue disk live

#### . System Rescue disk live

#### . Kali live

## . Troubleshooting

### . stuck on copyright "Peter Anvin et Al"

### . MENU DEFAULT won't works

### . xxx.c32 not a com32r image

### . Download stop when i use fetch

### . Can't download images stuff using http

### . PXE screen customization won't work on x86 computer

### . Is There A Way To Define Constants Or Variables?

### . How to enable NFS on Windows ?

### . NFS not available from Linux PXE

### . Can i change WDS boot option for clients ?

### . Any other questions...?

## . References

## Tutorial Linux PXE on Windows Deployment Services

Windows Deployment Services (WDS) is a server technology from Microsoft for network-based installation of Windows operating systems. It is the successor to Remote Installation Services. WDS is intended to be used for remotely deploying Windows Vista, Windows 7, Windows 8, Windows Server 2008, and Windows Server 2012, but also supports other operating systems because unlike its predecessor RIS, which was a method of automating the installation process, WDS uses disk imaging, in particular the Windows Imaging Format (WIM). WDS is included as a Server Role in all 32-bit and 64-bit versions of Windows Server 2008, and is included as an optionally installable component with Windows Server 2003 Service Pack 2. (source wikipedia)
In this tutorial Windows 2012 server is used, but the concept stay the same on older version.

## Requirement

### WDS is using Preboot eXecution Environment (PXE)

In computing, the Preboot eXecution Environment (PXE, sometimes pronounced as pixie) specification describes a standardized client-server environment that boots a software assembly, retrieved from a network, on PXE-enabled clients. On the client side it requires only a PXE-capable network interface controller (NIC), and uses a small set of industry-standard network protocols such as DHCP and TFTP (source wikipedia).

### WDS require DHCP & TFTP

In order to have WDS operational, you need first to install and configure a DHCP server with TFTP (this part is not shown in this tutorial)
TFTP is included in Windows DHCP, you just need to enable PXE Client in DHCP console in server options.

### Client requirement

- Clients require at least 256 Mo of RAM & a network card.
- Client Computer require Network booting option.
Network booting, shortened netboot, is the process of booting a computer from a network rather than a local drive. This method of booting can be used by routers, diskless workstations and centrally managed computers (thin clients) such as public computers at libraries and schools. (source wikipedia)
To enable Network booting on client computer you have (in most of case) to configure it in the BIOS

- 1. To enter in the BIOS you need to hit a specific key at the computer power up (most of the time the key is F1,F2 or DEL, some BIOS display a splash screen and you will need to use ESC key to see BIOS keys options)
- 2. Enable network booting in the BIOS (some BIOS have this option set as disable by default and some other have it enable by default sithout possibility to disable it)
- 3. Configure boot order, set network boot as first bootable device

- Note 1 :
  Some network card (most of the time really old and low cost card) don't have network boot option.
  In this case Network booting is impossible without changing the network card.
- Note 2 :
  Some BIOS (most of the time really old and low cost motherboard) don't have network boot option.
  In this case you can try to update BIOS or give up with it !

## WDS Installation

#### Add role wizard

#### Server selection

#### WDS role selection

#### Adding features

#### Adding role confirmation

### WDS Configuration

#### Start WDS console

#### Server type selection

- Note :
  I use the stand alone option cause i don't have Active Directory installed on my domain.
  If you have Active Directory enabled, you may choose the first option.

#### WDS files path selection

- Note 1 :
  For the next part of tutorial "E:\RemoteInstall" will be used as WDS file folder, but you can adapt it according to your configuration.
- Note 2 :
  You will need a big amount of place to store OS installation files, best practices are to use a dedicated hard drive with at least 200Go of free space

#### DHCP configuration

- Note :
  Thoose options are checked because DHCP and WDS are on the same host, uncheck thoose options if the DHCP is running on another server.

#### PXE secutiry settings

- Note :
  Respond to all client computers is not advisable in most of networks for security reason, as i use it in home local network enough securized i can choose this option.
  Most of the time for security reason only know client computers or require administrator approval options should be selected.

### Adding Boot image

By default, even with WDS PXE enabled, it won't works, a default bootable Windows Imaging Format (.wim) file (most of the time called "boot.wim") is required.
To add a boot image you have to use WDS console.

#### Adding a boot image

Then select a boot.wim from the folder \sources\boot.wim of any recent Microsoft Windows OS

- Note 1 :
  you need to add a boot.wim for each architecture you need (x86 and x64 for example), select the boot.wim from an Microsoft OS with the desired architecture type.
- Note 2 :
  you can use for example Windows 7 files or even Windows 2012 files, the difference will be the menu displayed

## Configuration Linux PXE

### Syslinux

The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX), network booting (PXELINUX), bootable "El Torito" CD-ROMs (ISOLINUX), and Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX). The project also includes MEMDISK, a tool to boot legacy operating systems (such as DOS) from nontraditional media; it is usually used in conjunction with PXELINUX and ISOLINUX (source syslinux wiki)

### downloading Syslinux packages

This is the link where Syslinux files are available : https://www.kernel.org/pub/linux/utils/boot/syslinux/
for this tutorial i use the package syslinux-6.03.zip, i also tested syslinux-4.07.zip and both works the same way, so this tutorial should works also for old version.

### copying Syslinux files to WDS server

Extract Syslinux-{version}.zip file
then copy the following files to the WDS file folder

#### copying x84 syslinux-{version}\ files to server folder E:\RemoteInstall\

- copy bios\core\pxelinux.0 to boot\x86\pxelinux.0
- copy bios\com32\elflink\ldlinux.c32 to boot\x86\ldlinux.c32
- copy efi32\com32\menu\menu.c32 to boot\x86\menu.c32
- copy efi32\com32\menu\vesamenu.c32 to boot\x86\vesamenu.c32
- copy efi32\com32\chain\chain.c32 to boot\x86\chain.c32
- copy efi32\com32\modules\reboot.c32 to boot\x86\reboot.c32
- copy efi32\com32\modules\poweroff.c32 to boot\x86\poweroff.c32
- copy efi32\com32\lib\libcom32.c32 to boot\x86\libcom32.c32
- copy efi32\com32\libutil.c32 to boot\x86\libutil.c32
- copy bios\memdisk\memdisk to boot\x86\memdisk
- copy E:\RemoteInstall\boot\x86\pxeboot.n12 to boot\x86\pxeboot.0
- copy E:\RemoteInstall\boot\x86\abortpxe.com to boot\x86\abortpxe.0
- Create boot\x86\pxelinux.cfg\default

#### copying x64 syslinux-{version}\ files to server folder E:\RemoteInstall\

- copy bios\core\pxelinux.0 to boot\x64\pxelinux.0
- copy bios\com32\elflink\ldlinux.c32 to boot\x64\ldlinux.c32
- copy efi64\com32\menu\menu.c32 to boot\x64\menu.c32
- copy efi64\com32\menu\vesamenu.c32 to boot\x64\vesamenu.c32
- copy efi64\com32\chain\chain.c32 to boot\x64\chain.c32
- copy efi64\com32\modules\reboot.c32 to boot\x64\reboot.c32
- copy efi64\com32\modules\poweroff.c32 to boot\x64\poweroff.c32
- copy efi64\com32\lib\libcom32.c32 to boot\x64\libcom32.c32
- copy efi64\com32\libutil.c32 to boot\x64\libutil.c32
- copy bios\memdisk\memdisk to boot\x64\memdisk
- copy E:\RemoteInstall\boot\x64\pxeboot.n12 to boot\x64\pxeboot.0
- copy E:\RemoteInstall\boot\x64\abortpxe.com to boot\x64\abortpxe.0
- Create boot\x64\pxelinux.cfg\default

copy to clipboard Edit the pxelinux.cfg\default and add :

    DEFAULT menu.c32

#### Files description

sources : http://www.syslinux.org/wiki/index.php?title=Category:Modules

- pxelinux.0 is used to start linux PXE boot.
- menu.c32 is a comboot module for Syslinux that renders a menu on the screen.
- vesamenu.c32 is a comboot module for Syslinux that renders a customizable menu on the screen (i think it work only on x64 system, i didn't had it works for x86 computers).
- chain.c32 is a COM32 module for Syslinux. It can chainload MBRs, partition boot sectors, Windows bootloaders (ntldr, setupldr.bin and bootmgr), MS-DOS and PC-DOS io.sys, Freedos kernel.sys, isolinux.bin (only from ISOLINUX), grldr of grub4dos or a bootsector saved to a file. It can also swap BIOS drive numbers or hide partitions.
- reboot.c32 (optional) is a COM32 module for Syslinux that is able to reboot the PC.
  It supports cold and warm rebooting.
- poweroff.c32 (optional) is a COM32 module for Syslinux that is able to shut down the PC.
- MEMDISK (optional) is meant to allow booting legacy operating systems. MEMDISK can boot floppy images, hard disk images and some ISO images
- pxeboot.0 is the WDS file used to start WDS PXE boot
- abortpxe.0 (optional) is the WDS file used to cancel PXE boot

#### Result

- Note 1 :
  In old Syslinux version like 4.07, syslinux-{version}\efiXX\com32 files are in syslinux-{version}\com32 folder
- Note 2 :
  If you need only x86 or x64, you will need only to add the wanted version stuff

### Add Linux PXE boot to WDS

copy to clipboard Code for x86 (to launch in a cmd)

    wdsutil /set-server /bootprogram:boot\x86\pxelinux.0 /architecture:x86
    wdsutil /set-server /N12bootprogram:boot\x86\pxelinux.0 /architecture:x86

copy to clipboard Code for x64 (to launch in a cmd)

    wdsutil /set-server /bootprogram:boot\x64\pxelinux.0 /architecture:x64
    wdsutil /set-server /N12bootprogram:boot\x64\pxelinux.0 /architecture:x64

- Note :
  PXE Linux boot should now works, you can test it using a client computer with network boot.
  But the menu isn't configured, so you still won't be able to load things a message will appear :
  "Initial menu has no LABEL entries!"

## Configuration

### Configuration file

copy to clipboard the basis :

    #
    # PXE configuration file
    #
    DEFAULT menu.c32

    ###[ Boot on WDS ]###
    LABEL WDS
    	MENU LABEL WDS (Windows Deployment Services)
    	KERNEL pxeboot.0

    ###[ Boot on local drive ]###
    LABEL Local
    	MENU LABEL Back to boot proccess
    	LOCALBOOT 0

    ###[ Exit PXE ]###
    LABEL Exit
    	MENU LABEL Exit PXE boot
    	KERNEL abortpxe.0

    ###[ Reboot computer ]###
    label Reboot
    	MENU LABEL Reboot computer
    	KERNEL reboot.c32

    ###[ Shutdown computer ]###
    label Shutdown
    	MENU LABEL ^Shutdown computer
    	KERNEL poweroff.c32

- Note 1 :
  # are used as comments
- Note 2 :
  As you can see some file we added are not important, they just are there to offer more options like reboot.c32 to reboot computer from the menu

### Adding Images

There around 3 ways to add bootable operating system.
In this part, I will use some common free operating system as example.
copy to clipboard

#### Using memdisk

    MENU LABEL Comodo rescue disk
    	MENU DEFAULT
    	KERNEL memdisk
    	INITRD Images/iso/comodo_rescue_disk_2.0.275239.1.iso

- Note :
  This way is the easiest way for implementation. it can works with .img too.
  But this is the worst way :
  - Image iso/img will be sent to client and then uncompress, so it take a lot of client memory to load and lot of bandwith to transfert.
  - The transfert will be by TFTP which is slow.
  - I think it shouldn't be used if iso/img is greater then 100mo (even with 100mo it is already long to load)

copy to clipboard

#### Using initrd & nfsroot

    MENU LABEL Lubuntu x64 live (login : root / toor | user / live )
        KERNEL Images/lubuntux64/casper/vmlinuz.efi
        INITRD Images/lubuntux64/casper/initrd.lz
        APPEND root=/dev/nfs boot=casper netboot=nfs nfsroot={WDSserverIP}:/lubuntux64

- Note :
  - This way is the most common for debian based system.
  - A NFS sharing is require
  - {WDSserverIP} is the IP of the WDS server
  - for debian based OS you can use debian-installer/language=fr console-setup/layoutcode=fr option in APPEND to change keyboard layout

copy to clipboard

#### Using initrd & fetch

    MENU LABEL Clonezilla x64
        KERNEL Images/clonezillax64/live/vmlinuz
        APPEND boot=live union=overlay fetch=http://192.168.0.2/wds/clonezillax64/filesystem.squashfs
        INITRD Images/clonezillax64/live/initrd.img

- Note :
  - fech can be used with tftp, ftp or http (and maybe other protocols, but i didn't tested them)
  - as tftp is slow, it is recommended to use an other protocol depending of you available services

## Advanced Configuration

### PXE advanced configuration file option

To be more precise, it is not really PXE but Syslinux configuration file, PXE is the whole boot process.
Lots of options are available to set your PXE Linux menu, all commands can be found on the official web site : http://www.syslinux.org/wiki/index.php?title=Menu
This is the main commands :
copy to clipboard

#### LABEL

    #Set a line selected as default, with text help on selection over
    LABEL Local
        MENU LABEL ^Back to boot proccess
        MENU DEFAULT
        LOCALBOOT 0
        TEXT HELP
            Exit and continue normal boot
        ENDTEXT

copy to clipboard

#### MENU BEGIN

    #Create a menu entry (sub level of menu)
    MENU BEGIN sTools
        MENU TITLE ^System Security Tools
        INCLUDE pxelinux.cfg/menu_stools.cfg
    MENU END

copy to clipboard

#### MENU EXIT

    #back to parent menu (exit a sub level)
    LABEL Back
        MENU LABEL ^Back to main menu
        MENU EXIT
        TEXT HELP
            Go back to main menu
        ENDTEXT

copy to clipboard

#### INCLUDE

    #include a file content into the menu
    INCLUDE pxelinux.cfg/com_conf.cfg

copy to clipboard

#### MENU SEPARATOR

    #add a separator line
    MENU SEPARATOR

- Note :
  MENU DEFAULT will be the default menu selected ^ before menu title is used to Highlight the first letter
  it doesn't works on MENU BEGIN and all first letters have to be unique, else only the first occurence will be highlighted
  \ can be added at the end of line to split the line command

### PXE screen customization

basic display is not really funky, to pimp your PXE you can use vesamenu which allow customization
Lots of options are available to customize your menu, all commands can be found on the official web site : http://www.syslinux.org/wiki/index.php?title=Comboot/menu.c32
copy to clipboard This is my menu configuration :

    #####################
    ###[ PXE Options ]###
    #####################

    #Enable advanced display
    UI vesamenu.c32

    ###[ PXE Text ]###
    MENU TITLE Starting PXE / Installation for x64
    MENU TABMSG Select the desired operation

    ###[ PXE Configuration ]###
    #no prompt (value = 0/1)
    PROMPT 0
    #no timeout (not required)
    TIMEOUT 0
    #disable ESC from the keybord (value = 0/1)
    NOESCAPE 1
    #display TAB options (not required value = 0/1)
    ALLOWOPTIONS 1

    ###[ PXE Display ]###
    MENU BACKGROUND pxelinux.cfg/frogg.png
    MENU RESOLUTION 800 600
    MENU MARGIN 20

    # Text position
    #MENU WIDTH 200 (replace the 100% width with fixed width ... not that good)
    #MENU ROWS 28 (doing nothing ?)
    #MENU ENDROW 15 (doing nothing ?)
    MENU CMDLINEROW 34
    MENU HELPMSGROW 29
    MENU TABMSGROW 28
    MENU PASSWORDROW 8

    # Color
    MENU COLOR BORDER		0 #00000000 #00000000 none
    MENU COLOR TITLE		0 #FFFF9900 * *
    MENU COLOR SEL			0 #FFFFFFFF #85000000 *
    MENU COLOR UNSEL		0 #FFFFFFFF * *
    MENU COLOR HOTKEY		0 #FFFF9900 * *
    MENU COLOR HOTSEL		0 #FFFFFFFF #85000000 *
    MENU COLOR TABMSG		0 #FFFF9900 * *
    MENU COLOR HELP 		0 #FFFFFFFF * *
    MENU COLOR PWDHEADER		0 #FFFF9900 #FF006400 std
    MENU COLOR PWDBORDER		0 #AAFF9900 #AA006400 std
    MENU COLOR PWDENTRY		0 * * *

    #I don't know what this could be, but i tried
    MENU COLOR CMDLINE		0 #FF006400 * *
    MENU COLOR CMDMARK		0 #FF006400 * *
    MENU COLOR MSG07		0 #FF006400 * *
    MENU MSGCOLOR 			  #FF006400 #80ffffff std

#### Result :

- Tips :
  The menu option doesn't offer a nice display, the trick is to remove all borders and backgrounds and then add to the Image fake border and background for the menu

### PXE advanced configuration file sample

here you can find my full configurations files
copy to clipboard

#### pxelinux.cfg/default

    #
    # PXE configuration file
    #
    DEFAULT menu.c32

    ###[ PXE Config ]###
    INCLUDE pxelinux.cfg/com_conf.cfg

    ###[ PXE Menus ]###
    INCLUDE pxelinux.cfg/menu_main.cfg

copy to clipboard

#### pxelinux.cfg/com_conf.cfg

    #####################
    ###[ PXE Options ]###
    #####################

    #Enable advanced display
    UI vesamenu.c32

    ###[ PXE Text ]###
    MENU TITLE Starting PXE / Installation for x64
    MENU TABMSG Select the desired operation

    ###[ PXE Configuration ]###
    #no prompt (value = 0/1)
    PROMPT 0
    #no timeout (not required)
    TIMEOUT 0
    #disable ESC from the keybord (value = 0/1)
    NOESCAPE 1
    #display TAB options (not required value = 0/1)
    ALLOWOPTIONS 1

    ###[ PXE Display ]###
    MENU BACKGROUND pxelinux.cfg/frogg.png
    MENU RESOLUTION 800 600
    MENU MARGIN 20

    # Text position
    #MENU WIDTH 200 (replace the 100% width with fixed width ... not that good)
    #MENU ROWS 28 (doing nothing ?)
    #MENU ENDROW 15 (doing nothing ?)
    MENU CMDLINEROW 34
    MENU HELPMSGROW 29
    MENU TABMSGROW 28
    MENU PASSWORDROW 8

    # Color
    MENU COLOR BORDER		0 #00000000 #00000000 none
    MENU COLOR TITLE		0 #FFFF9900 * *
    MENU COLOR SEL			0 #FFFFFFFF #85000000 *
    MENU COLOR UNSEL		0 #FFFFFFFF * *
    MENU COLOR HOTKEY		0 #FFFF9900 * *
    MENU COLOR HOTSEL		0 #FFFFFFFF #85000000 *
    MENU COLOR TABMSG		0 #FFFF9900 * *
    MENU COLOR HELP 		0 #FFFFFFFF * *
    MENU COLOR PWDHEADER	0 #FFFF9900 #FF006400 std
    MENU COLOR PWDBORDER	0 #AAFF9900 #AA006400 std
    MENU COLOR PWDENTRY		0 * * *

    #I don't know what this could be, but i tried
    MENU COLOR CMDLINE		0 #FF006400 * *
    MENU COLOR CMDMARK		0 #FF006400 * *
    MENU COLOR MSG07		0 #FF006400 * *
    MENU MSGCOLOR 			  #FF006400 #80ffffff std

copy to clipboard

#### pxelinux.cfg/menu_main.cfg

    ###[ Boot on WDS ]###
    LABEL WDS
        MENU LABEL ^WDS (Windows Deployment Services)
        KERNEL pxeboot.0
        TEXT HELP
            Start WDS to install Windows Operating System
        ENDTEXT

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Go to linux menu ]###
    MENU BEGIN Linux
        MENU TITLE ^Linux x64 install/live
        INCLUDE pxelinux.cfg/menu_linux.cfg
    MENU END

    ###[ Go to common tools menu ]###
    MENU BEGIN cTools
        MENU TITLE ^Computer Common Tools
        INCLUDE pxelinux.cfg/menu_ctools.cfg
    MENU END

    ###[ Go to fix tools menu ]###
    MENU BEGIN fTools
        MENU TITLE ^Computer Fix Tools
        INCLUDE pxelinux.cfg/menu_ftools.cfg
    MENU END

    ###[ Go to security tools menu ]###
    MENU BEGIN sTools
        MENU TITLE ^System Security Tools
        INCLUDE pxelinux.cfg/menu_stools.cfg
    MENU END

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Boot on local drive ]###
    LABEL Local
        MENU LABEL ^Back to boot proccess
        MENU DEFAULT
        LOCALBOOT 0
        TEXT HELP
            Exit and continue normal boot
        ENDTEXT

    ###[ Exit PXE ]###
    LABEL Exit
        MENU LABEL ^Exit PXE boot
        KERNEL abortpxe.0
        TEXT HELP
            Exit from PXE boot and continue normal boot
        ENDTEXT

    ###[ Reboot computer ]###
    label Reboot
        MENU LABEL ^Reboot computer
        KERNEL reboot.c32
        TEXT HELP
            Reboot the computer (you can use CTRL+ALT+SUPPR)
        ENDTEXT

    ###[ Shutdown computer ]###
    label Shutdown
        MENU LABEL ^Shutdown computer
        KERNEL poweroff.c32
        TEXT HELP
            Shutdown the computer
        ENDTEXT

copy to clipboard

#### pxelinux.cfg/menu_ctools.cfg

    ###[ PXE Title ]###
    MENU TITLE Computer Common Tools

    ###[ PXE Menus ]###

    LABEL Gparted
        MENU LABEL ^Gparted x64
        MENU DEFAULT
        KERNEL Images/gpartedx64/live/vmlinuz
        APPEND nomodeset noprompt boot=live gl_lang=fr_FR gl_kbd=fr keyb=fr config components union=overlay username=user noswap noeject ip=all vga=788 fetch=http://192.168.0.2/WDS/gpartedx64/filesystem.squashfs
        INITRD Images/gpartedx64/live/initrd.img
        TEXT HELP
            launch Gparted to set drive partition
        ENDTEXT

    LABEL Clonezilla
        MENU LABEL ^Clonezilla x64
        KERNEL Images/clonezillax64/live/vmlinuz
        APPEND boot=live union=overlay live-config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts=fr locales=fr_FR.UTF-8 ocs_live_batch="no" vga=788 nosplash fetch=http://192.168.0.2/wds/clonezillax64/filesystem.squashfs
        INITRD Images/clonezillax64/live/initrd.img
        TEXT HELP
            Launch Clonezilla to Clone hard disk
        ENDTEXT

    LABEL RedoBackup
        MENU LABEL ^Redo Backup (doesn't work)
        KERNEL Images/redobackup/casper/vmlinuz
        APPEND boot=casper root=/dev/nfs union=overlay keyboard-layouts=fr splash  xforcevesa nomodeset vga=ask toram netboot=nfs nfsroot=192.168.0.2:/redobackup ip=all
        INITRD Images/redobackup/casper/initrd.lz
        TEXT HELP
            Launch Redo Backup to backup hard disk
        ENDTEXT

    LABEL HardwareDetection
        MENU LABEL ^Hardware Detection
        KERNEL Images/hdt/hdt.c32
        TEXT HELP
            Detect your computer hardware
        ENDTEXT

    LABEL MemoryTest
        MENU LABEL ^Memory Test
        KERNEL Images/memtest/memtest86
        TEXT HELP
            Test tour computer memory
        ENDTEXT

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Main Menu ]###
    LABEL Back
        MENU LABEL ^Back to main menu
        MENU EXIT
        TEXT HELP
            Go back to main menu
        ENDTEXT

copy to clipboard

#### pxelinux.cfg/menu_ftools.cfg

    ###[ PXE Title ]###
    MENU TITLE Computer Fix Tools

    ###[ PXE Menus ]###

    LABEL Comodo
        MENU LABEL ^Comodo rescue disk
        MENU DEFAULT
        KERNEL memdisk
        INITRD Images/iso/comodo_rescue_disk_2.0.275239.1.iso
        APPEND iso raw
        TEXT HELP
            Live boot on Comodo rescue disk
        ENDTEXT

    LABEL AVG
        MENU LABEL ^AVG rescue disk
        KERNEL memdisk
        INITRD Images/iso/avg_arl_cdi_all_120_160420a12074.iso
        APPEND iso raw
        TEXT HELP
            Live boot on AVG rescue disk
        ENDTEXT

    LABEL Systemrescue
        MENU LABEL ^System Rescue disk
        KERNEL Images/systemrescue/isolinux/rescue64
        APPEND netboot=http://192.168.0.2/wds/systemrescue/sysrcd.dat
        INITRD Images/systemrescue/isolinux/initram.igz
        TEXT HELP
            Launch System Rescue
        ENDTEXT

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Main Menu ]###
    LABEL Back
        MENU LABEL ^Back to main menu
        MENU EXIT
        TEXT HELP
            Go back to main menu
        ENDTEXT

copy to clipboard

#### pxelinux.cfg/menu_linux.cfg

    ###[ PXE Title ]###
    MENU TITLE Linux x64 install/live

    ###[ PXE Menus ]###

    LABEL Lubuntulive
        MENU LABEL ^Lubuntu x64 live (login : root / toor | user / live )
        MENU DEFAULT
        KERNEL Images/lubuntux64/casper/vmlinuz.efi
        INITRD Images/lubuntux64/casper/initrd.lz
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=casper netboot=nfs nfsroot=192.168.0.2:/lubuntux64 splash
        TEXT HELP
            Live boot on Lubuntu
        ENDTEXT

    LABEL UbuntuLive
        MENU LABEL ^Ubuntu x64 live
        KERNEL Images/ubuntux64/casper/vmlinuz.efi
        INITRD Images/ubuntux64/casper/initrd.lz
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=casper netboot=nfs nfsroot=192.168.0.2:/ubuntux64 splash
        TEXT HELP
            Live boot on Ubuntu
        ENDTEXT

    LABEL mfsbsd
        MENU LABEL ^mfsBSD x64 Live ( login : root / mfsroot )
        MENU PASSWD frogg
        KERNEL memdisk
        INITRD Images/iso/mfsbsd-10.3-RELEASE-amd64.img raw
        TEXT HELP
            Live boot on mfsBSD
        ENDTEXT

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Main Menu ]###
    LABEL Back
        MENU LABEL ^Back to main menu
        MENU EXIT
        TEXT HELP
            Go back to main menu
        ENDTEXT

copy to clipboard

#### pxelinux.cfg/menu_stools.cfg

    ###[ PXE Title ]###
    MENU TITLE System Security Tools

    ###[ PXE Menus ]###

    LABEL Kali
        MENU LABEL ^Kali x64 live
        KERNEL Images/kalix64/live/vmlinuz
        INITRD Images/kalix64/live/initrd.img
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=live netboot=nfs nfsroot=192.168.0.2:/kalix64 splash
        TEXT HELP
            Live boot on Kali
        ENDTEXT

    ###[ Menu separator ]###
    MENU SEPARATOR

    ###[ Main Menu ]###
    LABEL Back
        MENU LABEL ^Back to main menu
        MENU EXIT
        TEXT HELP
            Go back to main menu
        ENDTEXT

## Sample of images configuration

copy to clipboard

#### Debian installer

    LABEL DebianInstall
        MENU LABEL ^Debian x64 install (not workin atm)
        KERNEL Images/debianx64/linux
        INITRD Images/debianx64/initrd.gz
        TEXT HELP
            Debian installer
        ENDTEXT

- Require a netboot installer, else an error will occur cause CD-Rom cannot be found

copy to clipboard

#### Lubuntu live

    LABEL Lubuntulive
        MENU LABEL ^Lubuntu x64 live (login : root / toor | user / live )
        MENU DEFAULT
        KERNEL Images/lubuntux64/casper/vmlinuz.efi
        INITRD Images/lubuntux64/casper/initrd.lz
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=casper netboot=nfs nfsroot=192.168.0.2:/lubuntux64 splash
        TEXT HELP
            Live boot on Lubuntu
        ENDTEXT

copy to clipboard

#### Ubuntu live

    LABEL UbuntuLive
        MENU LABEL ^Ubuntu x64 live
        KERNEL Images/ubuntux64/casper/vmlinuz.efi
        INITRD Images/ubuntux64/casper/initrd.lz
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=casper netboot=nfs nfsroot=192.168.0.2:/ubuntux64 splash
        TEXT HELP
            Live boot on Ubuntu
        ENDTEXT

copy to clipboard

#### mfs BSD

    LABEL mfsbsd
        MENU LABEL ^mfsBSD x64 Live ( login : root / mfsroot )
        MENU PASSWD frogg
        KERNEL memdisk
        INITRD Images/iso/mfsbsd-10.3-RELEASE-amd64.img raw
        TEXT HELP
            Live boot on mfsBSD
        ENDTEXT

copy to clipboard

#### Gparted live

    LABEL Gparted
        MENU LABEL ^Gparted x64
        MENU DEFAULT
        KERNEL Images/gpartedx64/live/vmlinuz
        APPEND nomodeset noprompt boot=live gl_lang=fr_FR gl_kbd=fr keyb=fr config components union=overlay username=user noswap noeject ip=all vga=788 fetch=http://192.168.0.2/WDS/gpartedx64/filesystem.squashfs
        INITRD Images/gpartedx64/live/initrd.img
        TEXT HELP
            launch Gparted to set drive partition
        ENDTEXT

copy to clipboard

#### Clonezilla live

    LABEL Clonezilla
        MENU LABEL ^Clonezilla x64
        KERNEL Images/clonezillax64/live/vmlinuz
        APPEND boot=live union=overlay live-config noswap nolocales edd=on nomodeset ocs_live_run="ocs-live-general" ocs_live_extra_param="" keyboard-layouts=fr locales=fr_FR.UTF-8 ocs_live_batch="no" vga=788 nosplash fetch=http://192.168.0.2/wds/clonezillax64/filesystem.squashfs
        INITRD Images/clonezillax64/live/initrd.img
        TEXT HELP
            Launch Clonezilla to Clone hard disk
        ENDTEXT

- since version 2.4.2-10, the option "union=overlay" has to be added to have it work, else an error "clonezilla mounting aufs on /root/ failed no such device" occure.

copy to clipboard

#### Refracta

    LABEL Refracta
        MENU LABEL ^Refracta8 x64 (log : root / root)
        KERNEL Images/refracta8x64/live/vmlinuz
        APPEND boot=live root=/dev/nfs netboot=nfs nfsroot=192.168.0.2:/refracta8x64
        INITRD Images/refracta8x64/live/initrd.img
        TEXT HELP
            Launch Refracta8 Live CD creator
        ENDTEXT

copy to clipboard

#### Hardware Detection live

    LABEL HardwareDetection
        MENU LABEL ^Hardware Detection
        KERNEL Images/hdt/hdt.c32
        TEXT HELP
            Detect your computer hardware
        ENDTEXT

copy to clipboard

#### Memory Test live

    LABEL MemoryTest
        MENU LABEL ^Memory Test
        KERNEL Images/memtest/memtest86
        TEXT HELP
            Test tour computer memory
        ENDTEXT

copy to clipboard

#### Comodo rescue disk live

    LABEL Comodo
        MENU LABEL ^Comodo rescue disk
        MENU DEFAULT
        KERNEL memdisk
        INITRD Images/iso/comodo_rescue_disk_2.0.275239.1.iso
        APPEND iso raw
        TEXT HELP
            Live boot on Comodo rescue disk
        ENDTEXT

copy to clipboard

#### AVG rescue disk live

    LABEL AVG
        MENU LABEL ^AVG rescue disk
        KERNEL memdisk
        INITRD Images/iso/avg_arl_cdi_all_120_160420a12074.iso
        APPEND iso raw
        TEXT HELP
            Live boot on AVG rescue disk
        ENDTEXT

copy to clipboard

#### System Rescue disk live

    LABEL Systemrescue
        MENU LABEL ^System Rescue disk
        KERNEL Images/systemrescue/isolinux/rescue64
        APPEND netboot=http://192.168.0.2/wds/systemrescue/sysrcd.dat
        INITRD Images/systemrescue/isolinux/initram.igz
        TEXT HELP
            Launch System Rescue
        ENDTEXT

copy to clipboard

#### Kali live

    LABEL Kali
        MENU LABEL ^Kali x64 live
        KERNEL Images/kalix64/live/vmlinuz
        INITRD Images/kalix64/live/initrd.img
        APPEND root=/dev/nfs debian-installer/language=fr console-setup/layoutcode=fr boot=live netboot=nfs nfsroot=192.168.0.2:/kalix64 splash
        TEXT HELP
            Live boot on Kali
        ENDTEXT

- Note :
  Some of thoose configurations are set to use french keyboard & language (fr) you can remove thoose parameters or change it for your language.

## Troubleshooting

### stuck on copyright "Peter Anvin et Al"

You may have a trouble in your linux pxe configuration file, for exemple a bad use of INCLUDE can make infinite loop.
Try to comment some part of code until Linux PXE screen boot, you may find the problematic line.

### MENU DEFAULT won't works

If you use ^ before menu first letter, they hahe to be different else MENU DEFAULT won't works.

### xxx.c32 not a com32r image

You probably mixed files, you need to use all files from same syslinux archive, if you use file from 2 differents packages you might get this error message.

### Download stop when i use fetch

Download stop because client computer memory is too low !

### Can't download images stuff using http

By default IIS allow only some kind of extensions.
You may need to allow .squashfs extensions (and maybe .md5 &.dat for some case).

### PXE screen customization won't work on x86 computer

Yup, same for me, i dunno why, maybe it is not design for it

### Is There A Way To Define Constants Or Variables?

At present, there is no way to define constants or variables in the configuration file. That feature will be added eventually.

### How to enable NFS on Windows ?

Like that :

### NFS not available from Linux PXE

Check your NFS shared folder options, you need to allow Unix access :

### Can i change WDS boot option for clients ?

Yes, like that:

### Any other questions...?

You can use the contact form to ask question

## References

- http://www.wonkity.com/~wblock/docs/html/pxe.html
- http://www.syslinux.org/wiki
- http://www.syslinux.org/wiki/index.php?title=WDSLINUX
- http://www.syslinux.org/wiki/index.php?title=PXELINUX
- http://www.syslinux.org/wiki/index.php?title=Comboot/menu.c32
- https://wiki.archlinux.org/index.php/Syslinux
- http://www.syslinux.org/wiki/index.php?title=PXELINUX

Page created by Frogg the 13/10/2016 12:02
Generated in 0.001 sec & displayed in 0.209 sec