Posts here are mostly step-by-step guides on how to replicate something I have set up in the past. Read over my About page to see how I show commands/output and read the disclaimer.
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.
/var/lib/tftpboot ├── 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!
Hi, why do you need the memdisk ? Could I just leave it out ?
Also, what does the
root (hd0,0)
do ?
thanks
I suppose you don’t need the memdisk option, but it’s good to have to make sure the environment works before adding the variable of an ISO image.
The root parameter is related to the local disk and I believe is not required in this case.
hello,
this way was able to UEFI model?
Hi Andrew, I came across your stie while looking for a howto for pxe booting isos. I’ve followed your two guides and i’m currently at this stage when I boot from pxe…..
D. Ubuntu OS Deployment – DATA LOSS AHEAD!!
C. —-
B. —-
A. Boot from local disk
A. Boot from local disk
A. Boot from local disk
D. Ubuntu OS Deployment – DATA LOSS AHEAD!!
PXEBS (net1 type 128)… ok
Next server: 192.168.15.254
Filename: pxelinux.0
tftp://192.168.15.254/pxelinux.0… No such file or directory (http://ipxe.org/2
d12603b)
Installing dnsmasq didn’t create the folder /var/lib/tftpboot I had to do that manually. I only have one iso file that I want to be able to boot from.
Got a bit further now it says
D. Ubuntu OS Deployment – DATA LOSS AHEAD!!
C. —-
B. —-
A. Boot from local disk
A. Boot from local disk
A. Boot from local disk
D. Ubuntu OS Deployment – DATA LOSS AHEAD!!
PXEBS (net1 type 128)… ok
Next server: 192.168.15.254
Filename: pxelinux.0
tftp://192.168.15.254/pxelinux.0… ok
then hangs
I’ve now got this on the pxe server
Sep 19 22:07:46 apu dnsmasq-tftp[2397]: sent /srv/tftp/pxelinux.cfg/default to 192.168.15.119
but the client just hangs?
Great, thanks a lot for this article – helped me a lot…
Hi, Andrew,
Thanks for your guide. By PXE, I can install a ISO which is customized by my self. But I encounter a problem. The size of my ISO file is 1.5G, when a low memory PXE client boots from the ISO, an error which shows NOT enough memory will appear. Could you give me some advice? Thanks!!!
Yes, this procedure can be a problem with larger ISO images. What are you trying to boot to?
Many, Many Thanks to you Andrew!
Hi Andrew please could you drop me an email as I would like a quick hand with pxe boot, there will be beer tokens 😉
Hi!
Thanks for the tutorial, but I’m now confronting some special issues. I’m trying to boot a Sophos UTM 9 installation over PXE, it is distributed via ISO too. The installation will stop since you haven’t got everything mounted (install.tar in particular, maybe the whole /install directory too), and this happens with a USB drive too. Solution with a USB drive is to mount the drive via console that is provided during the installation.
Do you have any solution to this, how could I provide a whole directory via PXE to be mounted on the running software. Or is it impossible?
Thanks for the tip. I had been spending most of the night trying to boot a server to ESXi hypervisor, but the CD drive was bad, and no amount of USB booting would work. This did the trick.
Can you do something like this with a Windows Server 2008 PXE server setup? So you can pxe boot to other bootable images other than Windows .wim files?
Is it valid doing your own ISO? How could I do it?
I tried with a Debian ISO without luck, not works.
am looking to make a pxe boot iso that will work off dhcp, connect to say an ftp server, then show a menu that offers up several install options for Centos, Debian or Mint, sort of thin. Because of other systems on the network i cant pxe boot and am hoping to be able to boot from iso or usb to install onto local hd.
Is the above possible using your boot environment?
ta in advance