Is it possible to create a local partition from an ISO or a similar filetype either within iPXE itself, or with the help of another network boot program?

I know PXE is usually used for "diskless booting", but I want to boot certain images (ISOs in this case) that may very well exceed the amount of RAM that the client PCs possess (I also don't know whether iPXE implements something like swap memory). Therefore I'm not really comfortable using memdisk or wimboot and would rather "install" the ISO to the local disk and then boot it using sanboot or chainloading GRUB4DOS.

Now I did find many explanations as on how to boot from a local disk, but none that explain how to get a remote image onto my local disk, can anybody help here?

  • Why would you want to boot an ISO from a hard drive?? Why not just install whatever you're trying to boot? Why involve iPXE at all? – Chris S Mar 7 '14 at 15:55
  • Base line is: I want to be able to do it remotely. I want to keep my images (Win7 installer, live virus scan or backup) managed centrally and I want to be able to boot them on a machine that's connected to the network without any local help. – RikuXan Mar 7 '14 at 16:00
  • I don't follow, how does that have anything to do with iPXE or iPXE booting and ISO from a local disk?? – Chris S Mar 7 '14 at 16:09
  • The ISO is supplied over network via iPXE. The question I'm asking is not how to boot from a local partition, but rather how to create a local partition from a downloaded ISO (or wim or whatever). Also, I don't necessarily want to boot an ISO, I just happen to have the image as an ISO, for all I care it can be unpacked or converted, I just want it on the disk. – RikuXan Mar 7 '14 at 16:14
  • If you're pulling everything over the network anyway, why not just boot a bare OS, then run whatever utilities or installers from the network? Or if you're really bent on running a prepackaged solution, use network block storage, like iSCSI or ATAoE... – Chris S Mar 7 '14 at 16:33

If you look at how your block devices work, your disk (e.g. /dev/sda) or a partition (e.g. /dev/sda1) or a cdrom (e.g. /dev/sr0), or even an image file (e.g. mycdrom.iso) all look pretty much the same.

You can use cat or dd to copy images around and use them however you see fit.

It sounds like all you want to do is: cat /dev/sr0 > /var/cdrom_image_path/whatever.iso

Then you can export whatever.iso as an iSCSI target with targetcli if you want it to appear as iSCSI, or use whatever PXE stack you think is best.

As just one example of copying images, maybe take a look at how the OpenStack bare metal project works. They PXE boot an iSCSI target server, share /dev/sda as a target, and then connect to it from the main server to write the disk image. It is quite slick.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.