Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: [How To] PXE install server with ProxyDHCP

  1. #1
    Join Date
    Apr 2009
    Beans
    84

    [How To] PXE install server with ProxyDHCP

    This is a draft write up. There could possibly be some errors in paths.

    EDIT:I made a test version of a live PXE CD.
    http://ubuntuforums.org/showpost.php...3&postcount=16
    http://sourceforge.net/projects/qfpxeinstaller

    The goal of this is excersise is a pxe install & utility server targeted to home users.
    This is particular interesting since many device sold now does not have an optical drive.
    We want to use a proxyDHcp since most people are using dhcp on a home router without pxe support.

    I do not include a sub structure 32bit/64bit, in this example all is 32bit.

    I have documented this since it was quite a struggle to put it together. Not a lot of correct information out there.

    I think a consilidated wiki page should be created.

    My own contribution is making it work and collecting the info.
    I have copied much of it from:

    https://help.ubuntu.com/community/PXEInstallMultiDistro
    https://help.ubuntu.com/community/Installation/LocalNet
    https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
    https://help.ubuntu.com/community/PXEInstallServer

    I have tested this on Karmic so far.

    -------------------------------
    Install Ubuntu (karmic server)
    ---------------------------------

    sudo apt-get update
    sudo apt-get upgrade

    sudo apt-get install ssh

    (
    I have also installed gnome on the test server.
    sudo apt-get install xorg gnome-core
    )

    ==================================================
    Install dnsmasq
    ==================================================

    https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
    http://www.thekelleys.org.uk/dnsmasq...smasq-man.html

    sudo apt-get install dnsmasq

    sudo nano /etc/dnsmasq.d/pxe.conf
    add (this sample will connect to the local tftp server):

    Code:
    ####################################################################
    # Copied from https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
    # Modified by vikjon0 2010-10-22 for PXE install server
    #####################################################################
    # Sample configuration for dnsmasq to function as a proxyDHCP server,
    # enabling PXE clients to boot when an external, unmodifiable DHCP
    # server is present.
    # The main dnsmasq configuration is in /etc/dnsmasq.conf;
    # the contents of this script are added to the main configuration.
    # You may modify the file to suit your needs.
    
    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # Dnsmasq can also function as a TFTP server. You may uninstall
    # tftpd-hpa if you like, and uncomment the next line:
    #enable-tftp
    
    # Set the root directory for files available via FTP.
    tftp-root=/var/lib/tftpboot
    
    # The boot filename.
    dhcp-boot=/var/lib/tftpboot/pxelinux.0
    
    # rootpath option, for NFS
    dhcp-option=17,/var/www/PXE
    
    # kill multicast
    dhcp-option=vendor:PXEClient,6,2b
    
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    dhcp-no-override
    
    # PXE menu
    pxe-prompt="Press F8 for boot menu", 3
    
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    pxe-service=X86PC, "Boot from network", pxelinux
    
    # A boot service type of 0 is special, and will abort the
    # net boot procedure and continue booting from local media.
    pxe-service=X86PC, "Boot from local hard disk", 0
    
    # If an integer boot service type, rather than a basename is given, then the
    # PXE client will search for a suitable boot service for that type on the
    # network. This search may be done by multicast or broadcast, or direct to a
    # server if its IP address is provided.
    #pxe-service=x86PC, "Install windows from RIS server", 1
    
    # This range(s) is for the public interface, where dnsmasq functions
    # as a proxy DHCP server providing boot information but no IP leases.
    # Any ip in the subnet will do, so you may just put your server NIC ip here.
    dhcp-range=192.168.0.130,proxy
    
    # This range(s) is for the private network on 2-NIC servers,
    # where dnsmasq functions as a normal DHCP server, providing IP leases.
    #dhcp-range=192.168.0.20,192.168.0.250,8h
    
    # For static client IPs, and only for the private subnets,
    # you may put entries like this:
    #dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite
    ==================================================
    Install tftpboot
    ==================================================
    https://help.ubuntu.com/community/PXEInstallMultiDistro

    sudo apt-get -y install tftpd-hpa
    sudo /etc/init.d/openbsd-inetd stop
    sudo update-rc.d -f openbsd-inetd remove
    sudo sed -i s/no/yes/ /etc/default/tftpd-hpa
    sudo /etc/init.d/tftpd-hpa start

    Ubuntu installs the openbsd-inetd pakcage when the tfpd-hpa package is installed. In our example we will simply run TFTP as a daemon and will always be listening for connections.
    In the above code snippet:
    •tftpd-hpa was intsalled
    •The openbsd-inetd daemon was stopped
    •openbsd-inetd was removed from the startup scripts
    •/etc/defaul/tftpd-hpa was modified to allow tftpd-hpa to run as a daemon process
    •tftpd-hpa was started


    Verify the TFTP server is listening for connections:
    netstat -uap | grep tftp

    Sample output:
    Proto Recv-Q Send-Q Local Address Foreign Address State
    udp 0 0 *:tftp *:*


    ==================================================
    install SYSLINUX
    ==================================================
    https://help.ubuntu.com/community/PXEInstallMultiDistro

    sudo apt-get -y install syslinux

    Copy the PXELINUX bootstrap to the root of our TFTP server.

    sudo cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot


    Create the PXELINUX default configuration file.
    (dir missing in guide)
    sudo mkdir /var/lib/tftpboot/pxelinux.cfg/
    )

    sudo touch /var/lib/tftpboot/pxelinux.cfg/default


    /var/lib/tftpboot is the boot directory.

    ==================================================
    install apache
    ==================================================
    The client can access files on the server in a number of ways.
    e.g. tftp, http and nfs.

    What is available depends on the boot files, mostly initrd I think. It needs to have the drivers etc.
    http seems to be the easiest and most common what to access the installation CD and other files.

    We will install a web server and later put the installation CDs here.

    sudo apt-get -y install apache2


    sudo mkdir /var/www/pxe
    This will be the location of the installation media,
    (would be nice to move pxe outside www since it will also be accessed by nfs)


    ==================================================
    install NFS
    ==================================================
    We are also going to use nfs, not for install but for the live CDs.

    sudo apt-get -y install nfs-kernel-server

    sudo nano /etc/exports
    add:
    Code:
    /var/www/pxe                 192.168.0.0/24(ro,async,no_root_squash,no_subtree_check)
    Export our file system or restart the NFS server.

    sudo exportfs -a

    or

    sudo /etc/init.d/nfs-kernel-server restart



    ==================================
    setting up main menu
    ==================================

    https://help.ubuntu.com/community/PX...arget=logo.png

    sudo cp /usr/lib/syslinux/vesamenu.c32 /var/lib/tftpboot/
    sudo cp /location/of/image/logo.png /var/lib/tftpboot/pxelinux.cfg/

    sudo nano /var/lib/tftpboot/pxelinux.cfg/default
    add:
    Code:
    DEFAULT vesamenu.c32 
    TIMEOUT 600
    ONTIMEOUT BootLocal
    PROMPT 0
    MENU INCLUDE pxelinux.cfg/pxe.conf
    NOESCAPE 1
    LABEL BootLocal
            localboot 0
            TEXT HELP
            Boot to local hard disk
            ENDTEXT
    MENU BEGIN Ubuntu
    MENU TITLE Ubuntu 
            LABEL Previous
            MENU LABEL Previous Menu
            TEXT HELP
            Return to previous menu
            ENDTEXT
            MENU EXIT
            MENU SEPARATOR
            MENU INCLUDE Ubuntu/Ubuntu.menu
    MENU END
    
    MENU BEGIN Tools and Utilities
    MENU TITLE Tools and Utilities
            LABEL Previous
            MENU LABEL Previous Menu
            TEXT HELP
            Return to previous menu
            ENDTEXT
            MENU EXIT
            MENU SEPARATOR
            MENU INCLUDE utilities/utilities.menu
    MENU END
    sudo nano /var/lib/tftpboot/pxelinux.cfg/pxe.conf
    add:
    Code:
    MENU TITLE  PXE Server 
    MENU BACKGROUND pxelinux.cfg/logo.png
    NOESCAPE 1
    ALLOWOPTIONS 1
    PROMPT 0
    menu width 80
    menu rows 14
    MENU TABMSGROW 24
    MENU MARGIN 10
    menu color border               30;44      #ffffffff #00000000 std

    ================================
    Example 1 Booting LiveCD
    =================================
    Copy kernal & initrd

    sudo mkdir -p /var/lib/tftpboot/Ubuntu/lucidLiveCD


    (mount cd or image first)
    sudo cp /media/cdrom0/casper/vmlinuz /var/lib/tftpboot/Ubuntu/lucidLiveCD
    sudo cp /media/cdrom0/casper/initrd.lz /var/lib/tftpboot/Ubuntu/lucidLiveCD


    copy CD to installation directory
    sudo mkdir -p /var/www/pxe


    We need a complete copy including hidden files (folder .disk) otherwise it does not work.
    Not sure what is the best way in linux but this works.
    Assuming target directory does not exists!

    sudo cp -ra /media/cdrom0 /var/www/pxe/lucidLiveCD


    ==================================================
    setting up Ubuntu menu
    ==================================================
    sudo nano /var/lib/tftpboot/Ubuntu/Ubuntu.menu

    Code:
    LABEL 1
            MENU LABEL Ubuntu 10.04 LTS (32-bit) Live
            KERNEL Ubuntu/lucidLiveCD/vmlinuz
            APPEND boot=casper netboot=nfs nfsroot=192.168.0.130:/var/www/pxe/lucidLiveCD initrd=Ubuntu/lucidLiveCD/initrd.lz
            TEXT HELP
            Boot the Ubuntu 10.04 32-bit in Live Mode
            ENDTEXT
    It should now be possible to boot the live cd over pxe!



    ================================
    Example 2 Install from Alt CD
    =================================
    Copy Netboot kernal & initrd


    sudo mkdir -p /var/lib/tftpboot/Ubuntu/lucidAltCD

    (mount cd or image first)
    sudo cp /media/cdrom0/install/netboot/ubuntu-installer/i386/linux /var/lib/tftpboot/Ubuntu/lucidAltCD
    sudo cp /media/cdrom0/install/netboot/ubuntu-installer/i386/initrd.gz /var/lib/tftpboot/Ubuntu/lucidAltCD


    copy CD to installation directory
    sudo mkdir -p /var/www/pxe/

    *dest may not exist
    sudo cp -r /media/cdrom0 /var/www/pxe/lucidAltCD

    This will start the installation and allow you to select mirror. Including you local server,

    sudo nano /var/lib/tftpboot/Ubuntu/Ubuntu.menu

    Code:
    label 2
    	MENU LABEL Lucid Alt install (remote mirrors)
            KERNEL Ubuntu/lucidAltCD/linux
    	APPEND initrd=Ubuntu/lucidAltCD/initrd.gz
            TEXT HELP
            Boot the alt CD installer on remote mirrors
            ENDTEXT
    ================================================== ====
    Example 3 install from CD on server with kickstart
    ================================================== =====
    I am not going to use this is, since it does not seem to work in combination with expert mode (priority=low)

    https://help.ubuntu.com/community/PXEInstallServer:
    There is a package called system-config-kickstart which is a GUI frontend to creating kickstart files. The kickstart file tells the installer where to get its packages from, what to install and a number of other useful settings. See KickstartCompatibility for more info.

    This is for generating a kickstart file.
    we just need to point out the installation CD

    sudo nano /var/www/pxe/lucidalt.cfg

    Code:
    install
    url --url http://192.168.0.130/pxe/lucidAltCD
    sudo nano /var/lib/tftpboot/Ubuntu/Ubuntu.menu
    Code:
    label 3
    	MENU LABEL Lucid Alt install with kickstart, all local
            KERNEL Ubuntu/lucidAltCD/linux
    	APPEND ks=http://192.168.0.130/pxe/lucidalt.cfg initrd=Ubuntu/lucidAltCD/initrd.gz
            TEXT HELP
            Boot the alt CD installer on local http
            ENDTEXT

    ========================================
    Example 4&5 preseed
    ========================================

    EDIT: I get an error about corrupt package when I run the installer against the CD.
    I need to do some more tests. It was working before...
    EDIT2: I think it is not a good solution anyway.
    It is better to use a apt cache to minimize the network traffic.
    As mentioned in this post
    http://www.peterlyons.com/problog/2010/07/

    sudo nano /var/lib/tftpboot/Ubuntu/lucidAltCD/test.cli

    There is 3 pressed files on the alt CD (/preseed/).

    If you e.g. want to install a minimal CLI system you point to cli.seed.

    If we want to install a cli system but automatically point to the cd on the server:
    cp cli.seed => test.seed


    sudo nano /var/lib/tftpboot/Ubuntu/lucidAltCD/test.seed
    add:
    Code:
    ### Mirror settings
    # If you select ftp, the mirror/country string does not need to be set.
    d-i mirror/protocol string http
    d-i mirror/country string enter information manually
    d-i mirror/http/hostname string 192.168.0.130
    d-i mirror/http/directory string /pxe/lucidAltCD
    d-i mirror/http/proxy string

    sudo nano /var/lib/tftpboot/Ubuntu/Ubuntu.menu
    Code:
    label 4
    	MENU LABEL Lucid Alt CLI 
            KERNEL Ubuntu/lucidAltCD/linux
    	APPEND  preseed/url=http://192.168.0.130/pxe/lucidAltCD/preseed/test.seed initrd=Ubuntu/lucidAltCD/initrd.gz
            TEXT HELP
            Boot the alt CD installer cli preseed
            ENDTEXT
    
    label 5
    	MENU LABEL Lucid Alt CLI expert mode
            KERNEL Ubuntu/lucidAltCD/linux
    	APPEND  preseed/url=http://192.168.0.130/pxe/lucidAltCD/preseed/test.seed priority=low initrd=Ubuntu/lucidAltCD/initrd.gz
            TEXT HELP
            Boot the alt CD installer cli expert mode
            ENDTEXT
    If we want to install a server, there a server seed on the server cd. Not sure if it can be used with the local alt cd.
    If not it should work with a network mirror or of course the server cd.

    ========================================
    Example 6 install with minimal CD
    ===========================================

    sudo mkdir -p /var/lib/tftpboot/Ubuntu/lucidMiniCD

    sudo cp /media/cdrom0/linux /var/lib/tftpboot/Ubuntu/lucidMiniCD
    sudo cp /media/cdrom0/initrd.gz /var/lib/tftpboot/Ubuntu/lucidMiniCD


    copy CD to installation directory
    sudo mkdir -p /var/www/pxe/
    *dest may not exist
    sudo cp -r /media/cdrom0 /var/www/pxe/lucidMiniCD


    sudo nano /var/lib/tftpboot/Ubuntu/Ubuntu.menu
    Code:
    label 6
    	MENU LABEL Install Lucid mini expert
    	kernel Ubuntu/lucidMiniCD/linux
            append priority=low vga=normal initrd=Ubuntu/lucidMiniCD/initrd.gz
            TEXT HELP
            Boot the mini CD
            ENDTEXT


    =========================================
    clonezilla
    =========================================

    I had some problems with the ubuntu version, not sure if I made a misstake.
    This is tested with the debian stable.

    The parameters appears to change between versions. The idea seem to be to check the syslinux/syslinux.cfg on the cd.

    Copy kernal & initrd

    sudo mkdir -p /var/lib/tftpboot/utilities/clonezilla

    sudo cp /media/cdrom0/live/vmlinuz1 /var/lib/tftpboot/utilities/clonezilla
    sudo cp /media/cdrom0/live/initrd1.img /var/lib/tftpboot/utilities/clonezilla

    copy CD to installation directory

    sudo cp -r /media/cdrom0 /var/www/pxe/clonezilla

    sudo nano /var/lib/tftpboot/utilities/utilities.menu

    Code:
    label 1
    	MENU LABEL clonezilla 
            KERNEL utilities/clonezilla/vmlinuz1
    	APPEND initrd=utilities/clonezilla/initrd1.img boot=live union=aufs netboot=nfslive-config live-config  noswap nolocales edd=on nomodeset noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" vga=788 nosplash nfsroot=192.168.0.130:/var/www/pxe/clonezilla
            TEXT HELP
            Boot the Clonezilla CD
            ENDTEXT
    It is possible to skip NFS and load the image with http instead:
    The same work for gparted.

    Code:
    label 3
    	MENU LABEL clonezilla - http
            KERNEL utilities/clonezilla/vmlinuz1
    	APPEND initrd=utilities/clonezilla/initrd1.img boot=live union=aufs live-config  noswap nolocales edd=on nomodeset noprompt ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang=""  vga=785  nosplash fetch=http://192.168.0.130/pxe/clonezilla/live/filesystem.squashfs
            TEXT HELP
            Boot the Clonezilla CD
            ENDTEXT
    ===================================
    gparted
    =====================================

    Copy kernal & initrd

    sudo mkdir -p /var/lib/tftpboot/utilities/gparted

    sudo cp /media/cdrom0/live/vmlinuz1 /var/lib/tftpboot/utilities/gparted
    sudo cp /media/cdrom0/live/initrd1.img /var/lib/tftpboot/utilities/gparted

    copy CD to installation directory

    sudo cp -r /media/cdrom0 /var/www/pxe/gparted

    Same thing as for clonezilla when it comes to parameters.

    sudo nano /var/lib/tftpboot/utilities/utilities.menu

    Code:
    label 2
    	MENU LABEL gparted
            KERNEL utilities/gparted/vmlinuz1
    	APPEND initrd=utilities/gparted/initrd1.img boot=live config i915.modeset=0 xforcevesa radeon.modeset=0 noswap nomodeset noprompt vga=788 nosplash vga=788 netboot=nfs nfsroot=192.168.0.130:/var/www/pxe/gparted
            TEXT HELP
            Boot the gparted CD
            ENDTEXT
    It is possible to use http instead of nfs, check clonzilla example above.
    Last edited by vikjon0; November 1st, 2010 at 11:01 AM.

  2. #2
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    I had some problem making dnsmasq redirect to a tftp on a remote server.
    With the sample from the Ubuntu forum it is not enough to change the dhcp-boot.

    I think at least part of the problem is the multicast kill.
    It has to be removed.
    #dhcp-option=vendorXEClient,6,2b

    This is working:

    Code:
    ####################################################################
    # Copied from https://help.ubuntu.com/community/UbuntuLTSP/ProxyDHCP
    # Modified by vikjon0 2010-10-22 for PXE install server
    # This version for remote tftp
    #####################################################################
    # Sample configuration for dnsmasq to function as a proxyDHCP server,
    # enabling PXE clients to boot when an external, unmodifiable DHCP
    # server is present.
    # The main dnsmasq configuration is in /etc/dnsmasq.conf;
    # the contents of this script are added to the main configuration.
    # You may modify the file to suit your needs.
    
    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    #log-dhcp
    
    # Dnsmasq can also function as a TFTP server. You may uninstall
    # tftpd-hpa if you like, and uncomment the next line:
    #enable-tftp
    
    # Set the root directory for files available via FTP.
    # tftp-root=/var/lib/tftpboot
    
    
    
    # An example of dhcp-boot with an external TFTP server: the name and IP
    # address of the server are given after the filename.
    # Can fail with old PXE ROMS. Overridden by --pxe-service.
    # Enable for remore tftp server
    #dhcp-boot=/var/lib/ftpdboot/pxelinux.0,boothost,192.168.0.3
    dhcp-boot=pxelinux.0,boothost,192.168.0.130
    
    # The boot filenam When tftp server is on the same server
    #dhcp-boot=/var/lib/tftpboot/pxelinux.0
    
    
    # rootpath option, for NFS
    #dhcp-option=17,/var/www/PXE
    
    # kill multicast
    #dhcp-option=vendor:PXEClient,6,2b
    
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    dhcp-no-override
    
    # PXE menu
    # Chnage delay to 0 for quick boot of next menu
    #pxe-prompt="Press F8 for boot menu", 3
    pxe-prompt="Press F8 for boot menu", 0
    
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    #pxe-service=X86PC, "Boot from network", pxelinux
    
    # A boot service type of 0 is special, and will abort the
    # net boot procedure and continue booting from local media.
    #pxe-service=X86PC, "Boot from local hard disk", 0
    
    # If an integer boot service type, rather than a basename is given, then the
    # PXE client will search for a suitable boot service for that type on the
    # network. This search may be done by multicast or broadcast, or direct to a
    # server if its IP address is provided.
    #pxe-service=x86PC, "Install windows from RIS server", 1
    
    # This range(s) is for the public interface, where dnsmasq functions
    # as a proxy DHCP server providing boot information but no IP leases.
    # Any ip in the subnet will do, so you may just put your server NIC ip here.
    dhcp-range=192.168.0.0,proxy
    
    # This range(s) is for the private network on 2-NIC servers,
    # where dnsmasq functions as a normal DHCP server, providing IP leases.
    #dhcp-range=192.168.0.20,192.168.0.250,8h
    
    # For static client IPs, and only for the private subnets,
    # you may put entries like this:
    #dhcp-host=00:20:e0:3b:13:af,10.160.31.111,client111,infinite
    Last edited by vikjon0; October 27th, 2010 at 08:59 AM.

  3. #3
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    scrip to config dhcp for current subnet automatically
    (most of the code stolen from the wiki)

    Code:
    #!/bin/sh
    
    set -e
    trap "cleanup" 0 1 2 3 9 11 13 15
    
    printbold() {
        if [ -z "$printbold_first_time" ]; then
            printbold_first_time=true
            bold_face=$(tput bold 2>/dev/null) || true
            normal_face=$(tput sgr0 2>/dev/null) || true
        fi
        echo "${bold_face}$@${normal_face}"
    }    
    
    die() {
        printbold "Error: $@" >&2
        exit 1
    }
    
    cleanup() {
        trap - 0 1 2 3 9 11 13 15  # Stop trapping
        echo  # Skip the ^C line
    }
    
    create_dnsmasq_conf() {
        def_iface=$(route -n | sed -n '/^0.0.0.0/s/.* //p')
        if [ -z "$SERVER_IP" ]; then
            SERVER_IP=$(ip -oneline -family inet addr show dev "$def_iface" | sed -n '/inet 127\./! {s,.* \(.*\)/.*,\1,p;q}')
        fi
        if [ -z "$SERVER_IP" ]; then
            die "Could not determine this PC's IP address. Please provide it manually, by running
      sudo SERVER_IP=1.2.3.4 $0"
        fi
    
    
        cat >"/etc/dnsmasq.d/pxe.conf" <<EOF
    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # Set the root directory for files available via FTP.
    tftp-root=/var/lib/tftpboot
    
    # The boot filename.
    dhcp-boot=/var/lib/tftpboot/pxelinux.0
    
    # kill multicast
    dhcp-option=vendor:PXEClient,6,2b
    
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    dhcp-no-override
    
    # PXE menu
    pxe-prompt="Press F8 for boot menu", 0
    
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    # Boot from Network
    pxe-service=X86PC, ".", pxelinux
    
    # A boot service type of 0 is special, and will abort the
    # net boot procedure and continue booting from local media.
    pxe-service=X86PC, "Boot from local hard disk", 0
    
    # This range(s) is for the public interface, where dnsmasq functions
    # as a proxy DHCP server providing boot information but no IP leases.
    # Any ip in the subnet will do, so you may just put your server NIC ip here.
    dhcp-range=$SERVER_IP,proxy
    EOF
    }
    
    service dnsmasq stop
    echo ' * Delete old config'
    rm -rf /etc/dnsmasq.d/*.conf
    create_dnsmasq_conf
    echo ' * Creating new config'
    service dnsmasq start
    Last edited by vikjon0; October 27th, 2010 at 12:12 PM.

  4. #4
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    ...

  5. #5
    Join Date
    May 2006
    Location
    Australia
    Beans
    68
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [How To] PXE install server with ProxyDHCP

    I've tried to set this up on my headless 10.04 server, in order to install Xubuntu to an old laptop, but I have problems.
    Have got DD-WRT on the router giving DHCP, so added the DNSmasq bits there, and I get the pretty menu, can navigate to either Xubuntu or Dos 6.22 to install, but when I select either, I just get it 'Loading' for a bit, then "Boot failed: press a key to retry, or wait for reset..." error.
    Which config file could be wrong here?
    What have I screwed up??

    (I did use the first PXEInstallMulti... link, and then had to chmod -R 777 the tftp dir to get it to boot to the menu)

  6. #6
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    Are you talking about menu in dnsmasq or are you past that to tftpboot? I don't use the dnsmasq menu, I try to skip past it as much as possible.

    I have noticed that if you make any small error in dnsmasq conf you gets stuck in that menu.

    If you are already in the next menu the only problem I have seen is when the kernal options or paths are incorrect.
    If you are already booting the installer this is your problem.

    You could try with some stuff from my post and see if it works.
    The mini.cd variation is quickly setup.

  7. #7
    Join Date
    May 2006
    Location
    Australia
    Beans
    68
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: [How To] PXE install server with ProxyDHCP

    No DNSmasq issues - through to the tftp boot menu, and can navigate through it fine. Seems to be the last step - actually launching an install from the files on the server.
    Just setup the Dos6.22 one to see if it was an Xubuntu issue, but same prob (Q> why does the Dos6 go in /home/tftp dir, different to others?)
    Will try some more configs tomorrow (past midnight now), and maybe one more dist like you suggest. I seem so close!!
    Thanks.

  8. #8
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    (Q> why does the Dos6 go in /home/tftp dir, different to others?)
    Because some guides assume you will have only one boot alternative. I think you need to verify the menu and all paths.

    Also, why not try lucid ubuntu that we know for sure works without problems.

  9. #9
    Join Date
    Nov 2006
    Location
    Chicago burbs
    Beans
    75
    Distro
    Ubuntu

    Re: [How To] PXE install server with ProxyDHCP

    vikjon0,

    You need to get this into a wiki page. I'm going to be doing the same setup here for staging laptops, and will provide feedback to the process.
    This is great work, and extremely timely.

    -Bill

  10. #10
    Join Date
    Apr 2009
    Beans
    84

    Re: [How To] PXE install server with ProxyDHCP

    You need to get this into a wiki page.
    Yes, I agree. Perhaps it needs some cleaning up first.

    My concern is that there is already a number of wiki pages on this topic, some of them not up to date.

    Maybe the multi distro wiki page should be updated and the proxydhcp stuff put in a sub page? The best solution would be to create a new master PXE page and create a structure below.

    Is there any moderators dealing with the wiki structure? Is there an owner of the page that can be contacted?

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •