|
|
|
# PXE Server
|
|
|
|
## Setup with existing DHCP server
|
|
|
|
|
|
|
|
If another DHCP server is already present and is not providing PXE-Services dnsmasq can be configured to supply the information regarding the PXE server and also supply said TFTP server. The following `dnsmasq.conf` file can be used.
|
|
|
|
|
|
|
|
```config
|
|
|
|
port=0
|
|
|
|
dhcp-range=192.168.1.0,proxy
|
|
|
|
dhcp-option=vendor;PXEClient,6,2b
|
|
|
|
dhcp-no-override
|
|
|
|
|
|
|
|
pxe-service=x86PC,"PXE Loading",pxelinux
|
|
|
|
enable-tftp
|
|
|
|
tftp-root=/var/tftp
|
|
|
|
```
|
|
|
|
|
|
|
|
## Distributions
|
|
|
|
|
|
|
|
### Kubuntu/Xubuntu
|
|
|
|
|
|
|
|
Xubuntu is equivalent to Kubuntu, only another image has to be used and the seed-file has to be changed.
|
|
|
|
|
|
|
|
- download image from ftp.tu-chemnitz.de/pub/linux/ubuntu-cdimage/kubuntu/releases or equivalent
|
|
|
|
- extract image and set permissions
|
|
|
|
```bash
|
|
|
|
$ 7z x -o$EXTRACTPATH $IMAGE.iso
|
|
|
|
$ chmod a+rX -R $PATH
|
|
|
|
```
|
|
|
|
- create symlink in TFTP-folder
|
|
|
|
```bash
|
|
|
|
$ ln -s $EXTRACTPATH/casper/initrd.lz $TFTP/kubuntu
|
|
|
|
$ ln -s $EXTRACTPATH/casper/vmlinuz.efi $TFTP/kubuntu
|
|
|
|
```
|
|
|
|
- add the `pxelinux.cfg/default`-entry
|
|
|
|
```pxe
|
|
|
|
LABEL kubuntu
|
|
|
|
MENU LABEL Kubuntu 14.10 x64
|
|
|
|
KERNEL /kubuntu/vmlinuz.efi
|
|
|
|
APPEND initrd=/kubuntu/initrd.lz nfsroot=$SERVER:$EXTRACTPATH/ netboot=nfs file=/cdrom/preseed/kubuntu.seed boot=casper --
|
|
|
|
```
|
|
|
|
`$SERVER` has to be an IP - DNS not supported!
|
|
|
|
|
|
|
|
### Clonezilla
|
|
|
|
|
|
|
|
- download image from http://clonezilla.org/downloads.php
|
|
|
|
- > use file `clonezilla-live-$VERSION.zip`
|
|
|
|
```bash
|
|
|
|
$ unzip $ZIPFILE -d $TFTP/clonezilla
|
|
|
|
$ chmod -R a+rX $TFTPDIR/clonezilla
|
|
|
|
```
|
|
|
|
- add the `pxelinux.cfg/default`-entry
|
|
|
|
```pxe
|
|
|
|
LABEL clonezilla
|
|
|
|
MENU LABEL Clonezilla Live (Ramdisk)
|
|
|
|
KERNEL /clonezilla/live/vmlinuz
|
|
|
|
APPEND initrd=/clonezilla/live/initrd.img boot=live username=user config noswap edd=on nomodeset nodmraid locales=en_US.UTF-8 keyboard-layouts=NONE ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_batch="no" vga=788 ip=dhcp nosplash i915.blacklist=yes radeonhd.blacklist=yes nouveau.blacklist=yes vmwgfx.enable_fbdev=1 noprompt fetch=tftp://$SERVER/clonezilla/live/filesystem.squashfs
|
|
|
|
```
|
|
|
|
|
|
|
|
### Sysrescuecd
|
|
|
|
|
|
|
|
- download image from http://www.sysresccd.org/Download
|
|
|
|
- extract the image
|
|
|
|
```bash
|
|
|
|
$ 7z x -o$EXTRACTPATH $ISOFILE.iso
|
|
|
|
$ chmod -R a+rX $EXTRACTPATH
|
|
|
|
```
|
|
|
|
- copy the isolinux-folder to the tftp-folder
|
|
|
|
```bash
|
|
|
|
$ cp -r $EXTRACTPATH/isolinux $TFTP/systemrescuecd
|
|
|
|
```
|
|
|
|
- add the `pxelinux.cfg/default`-entries
|
|
|
|
```pxe
|
|
|
|
LABEL rescue64
|
|
|
|
MENU LABEL SystemRescueCd x64
|
|
|
|
KERNEL /systemrescuecd/rescue64
|
|
|
|
APPEND initrd=/systemrescuecd/initram.igz dodhcp netboot=nfs://server:$EXTRACTPATH
|
|
|
|
|
|
|
|
LABEL rescue32
|
|
|
|
MENU LABEL SystemRescueCd x86
|
|
|
|
KERNEL /systemrescuecd/rescue32
|
|
|
|
APPEND initrd=/systemrescuecd/initram.igz dodhcp netboot=nfs://server:$EXTRACTPATH
|
|
|
|
```
|
|
|
|
|
|
|
|
## Target Systems
|
|
|
|
|
|
|
|
### Normal PC
|
|
|
|
|
|
|
|
`pxelinux.cfg/default` has to look something like this:
|
|
|
|
|
|
|
|
```pxe
|
|
|
|
UI vesamenu.c32
|
|
|
|
|
|
|
|
PROMPT 0
|
|
|
|
TIMEOUT 200
|
|
|
|
ONTIMEOUT local
|
|
|
|
|
|
|
|
MENU DEFAULT rescue64
|
|
|
|
MENU TABMSG Press <TAB> to edit options
|
|
|
|
MENU TITLE rizzles PXE Menu
|
|
|
|
MENU ROWS 16
|
|
|
|
MENU TIMEOUTROW 22
|
|
|
|
MENU TABMSGROW 24
|
|
|
|
MENU HELPMSGROW 26
|
|
|
|
MENU WIDTH 78
|
|
|
|
MENU MARGIN 6
|
|
|
|
MENU BACKGROUND #00000000
|
|
|
|
|
|
|
|
MENU color title 1;4;32;40
|
|
|
|
MENU color sel 1;32;40
|
|
|
|
MENU color unsel 32;40
|
|
|
|
MENU color tabmsg 1;35;40
|
|
|
|
MENU color help 7;32;40
|
|
|
|
|
|
|
|
LABEL rescue64
|
|
|
|
...
|
|
|
|
|
|
|
|
LABEL local
|
|
|
|
MENU LABEL Boot from first hard disk
|
|
|
|
kernel chain.c32
|
|
|
|
append hd0
|
|
|
|
TEXT HELP
|
|
|
|
Boot local OS installed on first hard disk
|
|
|
|
ENDTEXT
|
|
|
|
|
|
|
|
LABEL return
|
|
|
|
MENU LABEL Return to main menu
|
|
|
|
MENU EXIT
|
|
|
|
```
|
|
|
|
|
|
|
|
### RS232 only PC
|
|
|
|
|
|
|
|
The RS232 output has to be enabled in the PXE menu and in the boot image.
|
|
|
|
|
|
|
|
```pxe
|
|
|
|
SERIAL 0 115200 0x303
|
|
|
|
CONSOLE 0
|
|
|
|
PROMPT 0
|
|
|
|
TIMEOUT 50
|
|
|
|
DEFAULT vesamenu.c32
|
|
|
|
ONTIMEOUT rescue
|
|
|
|
|
|
|
|
LABEL local
|
|
|
|
localboot 0
|
|
|
|
|
|
|
|
LABEL rescue
|
|
|
|
MENU LABEL Sysrescuecd
|
|
|
|
KERNEL /systemrescuecd/rescue64
|
|
|
|
APPEND initrd=/systemrescuecd/initram.igz dodhcp rootpass=root console=ttyS0,115200 netboot=http://$SERVER/sysrcd.dat nomodeset setkmap=us
|
|
|
|
|
|
|
|
LABEL debianwheezy
|
|
|
|
MENU LABEL debian
|
|
|
|
KERNEL /debian/linux
|
|
|
|
APPEND initrd=/debian/initrd.gz.new ip=dhcp console=ttyS0,115200
|
|
|
|
``` |
|
|
|
\ No newline at end of file |