0

I have a disk image (A) with a custom installation of CentOS 7. This disk image is included in another disk image (B) which also contains an installation of CentOS (minimal) as well as an installer which is using dd to write disk image A to the target disk. Disk image B (which includes disk image A) is then typically written to a usb drive and installation of disk image A is done by booting from this usb drive and running the installer.

Now I would like to have the option to install disk image A using pxe boot as well. Preferably I would like to use disk image B for this, so that I don't have to create two different artifacts, but if this is not possible I am open to alternatives.

I have tried loading disk image B (3.3 Gb) using memdisk, and it starts loading the image, but after a while I get the error message "Not enough memory to load specified image". I have tried resolving this by setting "uppermem" and "append hardisk", but neither does help.

This is by pxe-boot configuration for that label:

label 1
  menu label ^5) Custom CentOS
  uppermem 5000000
  kernel memdisk
  initrd installer_image
joaerl
  • 397
  • 1
  • 3
  • 11

1 Answers1

0

Forget about memedisk.

The first image has to be PXE booted. By editing its init script somehow net retrieve the second image (wget, curl, SMB mapped disk, NFS, etc) next the init script has to do what it always did installing the second image with dd etc etc.. On a PXE environment every component must be net-retrieved before its use.

Pat
  • 3,519
  • 2
  • 17
  • 17
  • Thank you for the reply. How do I PXE boot image A? Do I take the kernel from the image and specify it instead of memdisk (and put it on tftp server)? What about inird, is it image A or something else? If it is something else, how do I get and load image A? – joaerl Aug 14 '17 at 08:21
  • PXE is not rocket science but it takes time and knowledge doing it by hand. see here for Linux PXE booting with Serva https://www.vercot.com/~serva/an/NonWindowsPXE3.html – Pat Aug 14 '17 at 13:17