Yes, it is very much possible. The type of system you can boot will depend on how said system works.
Usually, you will find that very simple systems (like DOS or win98) and very complex systems (like modern linux distros) are easily bootable over the network.
The way to accomplish this on both type of systems is very different.
Let's see both ways in more detail. I'm assumming you already have a pxe boot server setup, if you don't go ahead and do it, it's quite easy.
I'm also assuming a
dnsmasq setup on a linux server with the tftproot in
/var/lib/tftpboot, but you should be able to adapt the instructions to any other setup.
For simple systems
For simple systems, you simply load the image (ISO) in RAM, and trick the system into believing it is an actual unit. This is done with a little help from the bios and a software called memdisk.
The system you want to load over the network is freedos:
MENU DEFAULT freedos
MENU LABEL FreeDOS
INITRD /freedos.iso iso
That's pretty much it. The first few lines are menu boilerplate, the important bits are the last four lines: load memdisk with the given iso.
For complex systems
Modern systems with fancy stuff like good memory management and proper hardware detection pretty much ignore anything the BIOS has to say.
This renders the
memdisk approach used above pretty much useless, because if you loaded the iso that way, once the kernel was read from the iso and loaded into memory (this is done by the bootloader in the iso, bootloaders do pay attention to the bios), the iso data will be gone.
What do you do then? Well, you don't actually load the iso from the network, but instead tell the system it can access the required files from there.
For linux systems, extract the iso contents somewhere in the tftproot and load the kernel and initrd directly, then leaving it up to them to find the root filesystem and mount it
Here's an example using the amazing System Rescue CD. I actually extracted the whole iso on the root of the tftp server, because it fitted right in with my directory structure, so the kernels are in /syslinux.
MENU DEFAULT sysrescd64
MENU LABEL 1) SysResCD 4.2.0 (x64)
APPEND setkmap=us nomodeset netboot=nbd://pxe:sysrcd.dat
The most important bit here is the
APPEND line. See the
netboot= at the end? That's how the OS knows where its root filesystem is. that is
I had conveniently set a dns name
pxe for my server, if you don't have that you would use an IP address for the server.
Also, sysresccd is one of the easiest because it uses a squashfs image for it's root filesystem which can be easily downloaded and loaded to ram with any method. Here I use nbd, you can also use tftp, nfs and http.
For other distros, like ubuntu, I think you can only use nfs.
For windows systems it is a bit more complex to do. The outline is:
- Have a Windows 7 install on a shared folder on the server
- Have a full Windows PE environment on the server in your tftp root
- Have the client machine load the WinPE over the network and press F12 to get a command prompt
- Map the shared folder with the Windows 7 install to a drive letter
- Start installation from mapped folder
I have never tried this, and it seems it doesn't work for some people. For NT versions older than Vista I think it's not even possible. For pre-NT windows (95,98,ME, etc) you can use the memdisk approach, but booting those is bad for your health :-p