You are on page 1of 3

PXE

The basics: PXELINUX First you need to convert a Parted Magic ISO to PXE format. Mount the ISO, run a script: mkdir /tmp/cdrom mount -oloop pmagic-20xx_xx_xx.iso /tmp/cdrom sh /tmp/cdrom/boot/pxelinux/pm2pxe.sh and follow the instructions as output on which files to copy to the PXE server and on how to edit the pxelinux.cfg file. Adding extra packages and/or bundles: For details on packages and bundles refer to our Adding Programs page. Starting with Parted Magic 2014_01_04 the recommended way to add packages and/or bundles is as follows: 1. Unpack the Parted Magic ISO: mkdir /tmp/cdrom mount -oloop pmagic-20xx_xx_xx.iso /tmp/cdrom cp -a /tmp/cdrom . umount /tmp/cdrom Note the "." at the end of the "cp -a" line! 2. Download/locate the desired packages and/or bundles and place them in one of these folders: cdrom/pmagic/pmodules: packages and/or bundles to be loaded at boot; cdrom/pmagic/pmodules/scripts: additional scripts to be run at boot; cdrom/pmagic/optional: packages and/or bundles to be loaded manually. 3. Run the script: sh cdrom/boot/pxelinux/pm2pxe.sh and follow the instructions as output on which files to copy to the PXE server and on how to edit the pxelinux.cfg file. 4. If wanted you can save the ISO as it is now: sh cdrom/mkgriso

Adding packages and/or bundles by creating an additional cpio archive to be merged with the initrd.img used to boot the system is now deprecated. For backwards compatibility however things will remain supported for the time being: 1. Create a dummy directory called anything you wish. E.g. mydir. mkdir -p mydir/{modules,scripts} 2. Download/locate the desired packages and/or bundles and place them in the newly-created modules folder. Add your scripts (if any) to scripts. 3. Create the cpio archive: cd mydir find | cpio --quiet -H newc -o | gzip -9 > ../modules.cgz You can call the file anything that you choose. We just picked modules.cgz for this example. You can create multiple cpio archives if this is the way you prefer to do it. Just keep in mind, our directory structure needs to be used or this system will not work. 4. Add the cpio archive to the INITRD line in the pxelinux.cfg: DEFAULT pmagic # Boot the kernel and initrd.img over PXE. LABEL pmagic LINUX pmagic/bzImage INITRD pmagic/initrd.img,files.cgz,pmagic/modules.cgz APPEND edd=on vga=normal Workaround for tftp servers which cannot transfer files larger than 32 MB: We know there are tftp servers out there that cannot transfer files larger than 32 MB. For such servers add split to the pm2pxe.sh invocations above, e.g.: sh /tmp/cdrom/boot/pxelinux/pm2pxe.sh split The resultant INITRD line may be too long for the tftp server. In such cases a workaround such as symlinking the pmagic/ directory to e.g. p/ and amending the pxelinux.cfg file accordingly often will succeed. In extreme cases even more aggressive symlinking may be necessary. PXE: the "memdisk - boot the standard PM ISO" way Provided that your PXE server does not have a filesize limitation the memdisk - boot the standard PM ISO method is a complete alternative for the classic method as described above. Your pxelinux stanza is really simple: DEFAULT pmagic_iso # Boot the entire ISO over PXE. LABEL pmagic_iso

LINUX pmagic/memdisk INITRD pmagic/pmagic-20xx_xx_xx.iso APPEND iso The ISO is the standard Parted Magic one as distributed, the memdisk program came from the /boot/syslinux directory on the ISO. Whereas with the classic PXE method there is no user menu (the options are preset on the server), with the memdisk method the user can choose his/her options from the standard menu. Depending on the specific use case this may or may not be an advantage.

You might also like