Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Pxeboot Multiple image

Writer 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.0
  • Then change , or

    For me, I used Ubuntu Netboot as template, So as you can see includes display_ubuntu/menu.cfg which by itself includes display_ubuntu/text.cfg which contains the main menu of Ubuntu boot:

    Contents of

    include display_ubuntu/menu.cfg
    default display_ubuntu/vesamenu.c32
    prompt 0
    timeout 0

    Contents of display_ubuntu/menu.cfg

    menu 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.cfg

    Contents of display_ubuntu/text.cfg

    DEFAULT 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.boot is a just tiny kernel, I used it for initial PXE tests.
  • memdisk is used as kernel to load (over PXE):

    Raw floppy images: anax_bios_flash.img and FDSTD.144

    CD ISO images: slitaz-cooking.iso and ubuntu_mini.iso

  • pxechain.com used to chain load other PXE server.

    pxechain.com is available within syslinux-common package starting from trusty (Thanks to @muru) or syslinux project archive under different filename pxechn.c32.

  • All listed Linux distributions are loaded by same pxelinux.0 located on tftp root folder. The exception is with OpenBSD (which has BSD kernel), pxelinux.0 loads openbsd_3.9/pxeboot.0, the PXE bootstrap coming with OpenBSD. It has its own configuration at etc/boot.conf. (This method is called chain loading)

    Contents of etc/boot.conf

    set image openbsd_3.9/bsd
  • You can use include instead 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.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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