Pxeboot Multiple image
Olivia Zamora
How to do the multiple OS in a single Pxeboot server.
I want to boot different OS like Fedora, CentOS, RHEL in the client
1 Answer
I thought it is good to mention the whole setup I have which may contain interesting tricks.
It is possible to make separate directories within tftp root folder:
$ tree -L 2 . ├── anax_bios_flash.img ├── clonezilla_20100623 │ ├── filesystem.squashfs │ ├── initrd.img │ ├── parameters.txt │ └── vmlinuz ├── display_ubuntu │ ├── adtext.cfg │ ├── f10.txt │ ├── f1.txt │ ├── f2.txt │ ├── f3.txt │ ├── f4.txt │ ├── f5.txt │ ├── f6.txt │ ├── f7.txt │ ├── f8.txt │ ├── f9.txt │ ├── menu.cfg │ ├── po4a.cfg │ ├── prompt.cfg │ ├── splash0.png │ ├── splash1.png │ ├── splash.png │ ├── splash.xcf │ ├── stdmenu.cfg │ ├── text.cfg │ └── vesamenu.c32 ├── etc │ └── boot.conf ├── FDSTD.144 ├── hello.boot ├── memdisk ├── Notes.txt ├── openbsd_3.9 │ ├── bsd │ ├── bsd.mp │ ├── bsd.rd │ └── pxeboot.0 ├── ploplinux_4.0.0 │ ├── boot.msg │ ├── bzimage │ ├── initrfs.gz │ ├── memtest │ ├── ploplinux │ ├── plpbt.bin │ ├── plpinstc.com │ ├── pluspacks │ ├── pxelinux.0 │ ├── pxelinux.cfg │ └── readme.txt ├── pmagic_5.5 │ ├── boot │ ├── bzImage │ ├── initramfs │ └── sample_pxelinux.cfg ├── pmagic_6.7 │ ├── boot │ ├── bzImage │ └── initramfs ├── pxechain.com ├── pxelinux.0 ├── pxelinux.cfg │ ├── default │ └── default.backup ├── slitaz-cooking.iso ├── ubuntu_10.04 │ ├── initrd.gz │ └── vmlinuz ├── ubuntu_mini.iso └── unattended_4.9 ├── bzImage ├── default ├── initrd ├── menu.c32 └── pxelinux.0Then change , or
For me, I used Ubuntu Netboot as template, So as you can see includes
display_ubuntu/menu.cfgwhich by itself includesdisplay_ubuntu/text.cfgwhich contains the main menu of Ubuntu boot:Contents of
include display_ubuntu/menu.cfg default display_ubuntu/vesamenu.c32 prompt 0 timeout 0Contents of
display_ubuntu/menu.cfgmenu hshift 7 menu width 65 menu margin 5 menu title GNU/Linux Rescue Collection include display_ubuntu/stdmenu.cfg include display_ubuntu/text.cfg menu begin advanced menu title Advanced options label mainmenu menu label ^Back.. menu exit include display_ubuntu/stdmenu.cfg include display_ubuntu/adtext.cfg menu end label help menu label ^Help config display_ubuntu/prompt.cfgContents of
display_ubuntu/text.cfgDEFAULT partedmagic_6.7 LABEL test_kernel MENU LABEL ^Test Kernel KERNEL hello.boot LABEL partedmagic_6.7 LINUX pmagic_6.7/bzImage INITRD pmagic_6.7/initramfs APPEND edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 LABEL partedmagic_5.5 MENU LABEL PartedMagic 5.5 LINUX pmagic_5.5/bzImage APPEND initrd=pmagic_5.5/initramfs edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 loglevel=0 max_loop=256 menu begin pmagic_advanced menu title PartedMagic 5.5 Advanced label mainmenu menu label ^Back.. menu exit include /pmagic_5.5/boot/syslinux.cfg menu end LABEL clonezilla_20100623 MENU LABEL ^CloneZilla 2010.06.23 KERNEL clonezilla_20100623/vmlinuz APPEND initrd=clonezilla_20100623/initrd.img boot=live union=aufs noswap noprompt vga=788 ocs_live_keymap=NONE ocs_lang=en_US.UTF-8 fetch=tftp://192.168.10.123/clonezilla_20100623/filesystem.squashfs LABEL unattended_4.9 MENU LABEL Unattended 4.9 for ^XP KERNEL unattended_4.9/bzImage APPEND initrd=unattended_4.9/initrd z_path=\\192.168.10.123\install_4.9 LABEL slitaz MENU LABEL ^Slitaz.iso TEXT HELP Testing boot from iso. ENDTEXT KERNEL memdisk APPEND initrd=slitaz-cooking.iso LABEL mini_ubutnu MENU LABEL Mini-Ubuntu KERNEL memdisk APPEND initrd=ubuntu_mini.iso LABEL freedos_std MENU LABEL ^FreeDOS STD TEXT HELP Testing boot from Floppy IMG. ENDTEXT KERNEL memdisk APPEND initrd=FDSTD.144 LABEL anax_bios_flash MENU LABEL Anax Bios Flash KERNEL memdisk APPEND initrd=anax_bios_flash.img LABEL openbsd MENU LABEL ^OpenBSD 3.9 KERNEL openbsd_3.9/pxeboot.0 LABEL plop_4.0.0 MENU LABEL PlopLinux 4.0.0 KERNEL ploplinux_4.0.0/bzimage APPEND initrd=ploplinux_4.0.0/initrfs.gz vga=1 nfsmount=192.168.10.123:/media/gnu_files/_servers/tftp/ploplinux_4.0.0/ploplinux LABEL ubuntu_10.04_install menu label ^Ubuntu 10.04 net install kernel ubuntu_10.04/vmlinuz append vga=normal initrd=ubuntu_10.04/initrd.gz -- quiet LABEL ubuntu_10.04_cli menu label Ubuntu 10.04 ^command-line net install kernel ubuntu_10.04/vmlinuz append tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu_10.04/initrd.gz -- quiet LABEL pxeserver2 menu label Switch to 2nd PXE server... kernel pxechain.com append 192.168.10.254::pxelinux.0
Notes:
hello.bootis a just tiny kernel, I used it for initial PXE tests.memdiskis used as kernel to load (over PXE):Raw floppy images:
anax_bios_flash.imgandFDSTD.144CD ISO images:
slitaz-cooking.isoandubuntu_mini.isopxechain.comused to chain load other PXE server.pxechain.comis available withinsyslinux-commonpackage starting from trusty (Thanks to @muru) or syslinux project archive under different filenamepxechn.c32.All listed Linux distributions are loaded by same
pxelinux.0located on tftp root folder. The exception is with OpenBSD (which has BSD kernel),pxelinux.0loadsopenbsd_3.9/pxeboot.0, the PXE bootstrap coming with OpenBSD. It has its own configuration atetc/boot.conf. (This method is called chain loading)Contents of
etc/boot.confset image openbsd_3.9/bsdYou can use
includeinstead of listing the whole menu in a single file, or may be chain menus to to keep the original advanced menus/options of each distribution.