Provisioning Linux Using PXELINUX - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Provisioning Linux Using PXELINUX

Description:

SYSLINUX supports simple standalone programs, using a file format similar to DOS '.com' files. ... Create bootable dos floppy. dd it to a file. Then boot it ... – PowerPoint PPT presentation

Number of Views:112
Avg rating:3.0/5.0
Slides: 21
Provided by: GOP79
Category:

less

Transcript and Presenter's Notes

Title: Provisioning Linux Using PXELINUX


1
Provisioning Linux UsingPXELINUX
  • Scott Mewett
  • Rackable Systems
  • Linux World Solutions Summit 2007
  • February 15, 2007

2
Agenda
  • What is PXELINUX
  • What PXELINUX is not
  • Requirements
  • Booting Process
  • Config files
  • COMBOOT and COM32
  • memdisk
  • memtest86
  • Setting up - DHCP, TFTP
  • Demo
  • Questions

3
Quote
  • PXELINUX is really cool
  • - Scott Mewett Just Now

4
What is PXELINUX
  • SYSLINUX is for booting Linux from a FAT file
    system
  • ISOLINUX is for booting Linux ISO 9660 CDs
  • Therefore PXELINUX is the counterpart for booting
    Linux and other operating systems from network
    servers.

5
What PXELINUX is not
  • Not Linux - It helps you to boot Linux
  • In fact it can be used for booting OSs other
    than Linux
  • Not a boot ROM. It requires PXE support for your
    NIC

6
Requirements
  • PXE Compliant network adapter
  • DHCP Server with the following options
  • next-server
  • Filename
  • If using Option 43 and a PXE Daemon, then also
    add vendor-class-identifier PXEClient
  • TFTP Server
  • on your tftp server
  • pxelinux.0, config files, menu files,
  • kernel and ram disks you want to boot

7
Booting Process
  • A PXE boot is initiated either by adjusting the
    BIOS boot order selecting network boot during
    POST
  • Network adapter starts PXE Boot and requests DHCP
    address.
  • DHCP response has IP information ip, netmask,
    gateway, dns server, PLUS
  • next-server 192.168.1.5
  • filename /tftpboot/pxelinux.0
  • Client configures network adapter using dhcp info
  • Client requests filename /tftpboot/pxelinux.0
    from next-server 192.168.1.5 via tftp.
  • pxelinux.0 is executed and starts requesting
    config files from tftp server

8
Booting Process - cont
  • First requests config file name based after the
    MAC address the client used to boot. i.e.
    /tftpboot/pxelinux.cfg/01-00-0a-0b-0c-12-13
  • If not found then it will search for the config
    file using its own IP address in upper case
    hexadecimal
  • e.g. 192.168.1.100 -gt C0A80164
  • If that file is not found, it will remove one hex
    digit and try again
  • Ultimately it will try looking for a file called
    default in lowercase
  • All filename references are relative to the
    directory that pxelinux.0 lives in
  • Config file is processed and any menu is
    displayed
  • Client selects boot option to boot. Kernel and
    ram disk are downloaded from the same tftp server
    and kernel is executed.

9
Standard Config file
  • Uses syslinux syntax
  • Instead of files being located on a dos file
    system, they are downloaded from the tftp server.
  • First section defines global settings
  • default linux
  • prompt 1
  • timeout 600
  • display boot.msg
  • F1 boot.msg
  • The rest is made up of boot options
  • Boot options start with a label definition
  • label linux
  • kernel rhel/3/u6/vmlinuz
  • append initrdrhel/3/u6/initrd.img
    ramdisk_size8192
  • ipappend 2

10
Standard Config file - Cool options
  • IPAPPEND 2
  • Addes BOOTIFltMACADDRgt to kernel append line
  • Files can be organized on your tftp server in
    directories.
  • Kernels can be in one dir, initrds in another,
    and menus in yet another
  • Kernels and initrds can be on an alternate tftp
    server.
  • 192.168.1.6/images/rhel/3/u6/vmlinuz
  • tftp1.foo.com/images/rhel/3/u6/vmlinuz
  • LOCALBOOT
  • Boot from local disk
  • Great if you have BIOS pxeboot by default, then
    on timeout you can have it localboot

11
COMBOOT and COM32
  • SYSLINUX supports simple standalone programs,
    using a file format similar to DOS ".com" files.
  • A 32-bit version, called COM32, is also provided.
    A simple API provides access to a limited set of
    file system and console functions.
  • For info on writing your own see http//syslinu
    x.zytor.com/comboot.php
  • Interesting example of COM32 put into practice
  • http//people.cs.uchicago.edu/gmurali/gui/autoboo
    t.html

12
Cool COM32 programs
  • menu.c32
  • Simple menu system
  • Uses standard syslinux syntax plus more but
    starts with
  • default menu.c32
  • prompt 0
  • Supports serial console
  • Menu items can reference other menu files
  • label othermenu
  • menu label Other Menu
  • kernel menu.c32
  • append othermenu.conf

13
Cool COM32 Programs - cont
  • mboot.c32
  • Allows booting of kernels that use the multiboot
    standard
  • i.e. Xen
  • LABEL Xen
  • KERNEL mboot.c32
  • APPEND xen.gz dom0_mem15000 nosmp noacpi ---
    linux.gz consoletty0 root/dev/hda1 ---
    initrd.img
  • chain.c32
  • chainload another operating system on a hard disk
  • label windows
  • kernel chain.c32
  • append hd0 2

14
memdisk - booting dos
  • Memdisk which is part of SYSLINUX can be used to
    boot dos floppy images
  • Create bootable dos floppy
  • dd it to a file.
  • Then boot it using pxelinux and memdisk
  • label dos
  • kernel memdisk
  • append initrddosfloppy.img
  • keeppxe
  • Keeppxe will keep the PXE and UNDI stacks in
    memory so that DOS can use it.

15
memtest86
  • Memtest86 is thorough, stand alone memory test
    for x86 architecture computers
  • Download it from www.memtest86.com
  • Boot it with pxelinux like so
  • label memtest
  • kernel memtest86
  • append -

16
Setting up - DHCP
  • ISC DHCP supports lots of great options for PXE
  • See lots of examples here http//syslinux.zytor.
    com/pxe.phpdhcp
  • You at least need options next-server and
    filename
  • If using option 43, you must have option 60 set
    to PXEClient
  • Older bios work with out it, but Broadcom
    recently fixed this so now its required as
    according to spec.

17
Setting up - TFTP
  • Great tftp server is hpa-tftp available from
    kernel.org
  • Written by author of PXELINUX
  • Create /tftpboot
  • Put pxelinux.0 in /tftpboot
  • Create /tftpboot/pxelinux.cfg and put config
    files in there.
  • Create symlink of /tftpboot/tftpboot to .
  • ln -s . /tftpboot/tftpboot
  • This way /tftpboot/pxelinux.0 and pxelinux.0 are
    valid ways of requesting the same file

18
  • Demo

19
  • Questions?

20
  • Contact info
  • Scott Mewett
  • smewett_at_rackable.com
Write a Comment
User Comments (0)
About PowerShow.com