PXE Boot any ISO Image

There are several rescue utilities out there that run in the form of a bootable ISO, but what if you already have a functioning PXE server and don’t have a CD? There is a way to load it over the network.

This guide is intended for ISOs that have no PXE boot option. Do not try to serve something like an Ubuntu ISO using this method! Most if not all Linux distributions have a separate PXE configuration that does not require this workaround.

You will need a PXE server configured similar to my guide on creating an Ubuntu deployment server. If you are creating a PXE server for this guide’s purpose, you only need to complete the Ubuntu deployment server guide up to Checkpoint Two.

Once you have the PXE server setup, you will need to also have memdisk in the TFTP boot folder. Memdisk is part of syslinux, and can be downloaded here.

[root]$ wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-5.10.tar.gz
[root]$ tar -xzvf syslinux-*.tar.gz

This is the source, so we need to compile it after we install a couple dependencies.

[root]$ apt-get install nasm

[root]$ cd syslinux-*/memdisk
[root]$ make memdisk

Now lets copy over the memdisk binary.

[root]$ mkdir /var/lib/tftpboot/other
[root]$ cp /root/syslinux-*/memdisk/memdisk /var/lib/tftpboot/other/

Also, take the ISO that you are looking to PXE boot in that same directory (/var/lib/tftpboot/other/). After I saved my ISO to that same directory, my directory structure looked like this.

├── other
│ ├── memdisk
│ └── SymantecEncryptionDesktop10.3.0MP1Win32_WDE_Recovery.iso
├── pxelinux.0
├── pxelinux.cfg
│ └── default
├── ubuntu
│ ├── amd64
│ │ ├── initrd.gz
│ │ └── linux
│ └── i386
│ ├── initrd.gz
│ └── linux
└── vesamenu.c32

In the file /var/lib/tftpboot/pxelinux.cfg/default, add this menu entry. Replace the ISO and menu labels accordingly.

label wde
menu label WDE Recovery
root (hd0,0)
kernel other/memdisk
append iso initrd=other/SymantecEncryptionDesktop10.3.0MP1Win32_WDE_Recovery.iso raw

In my case, I am attempting to PXE boot machines into a recovery disk provided by Symantec without having to burn the disk.

Now any machine can be booted to this ISO. Simple!

взято тут


237 просмотров