Home > Uncategorized > Use DNS 323 to intall Ubuntu using TFTP Boot

Use DNS 323 to intall Ubuntu using TFTP Boot

I got this all working on my dns 323. Here’s what I did :

  1. Install ipkg following instructions from here : http://wiki.dns323.info/howto:optware
  2. Do a ipkg list.
  3. You will need two packages, xinetd and tftpd.
    # ipkg list |grep xinetd
    xinetd - 2.3.14-9 - Highly configurable, modular and secure inetd
    # ipkg list |grep tftp
    atftp - 0.7-9 - Advanced TFTP server and client
    linksys-tftp - 1.2.1-1 - TFTP Client customized for a non-standard tftp authentication process.
    tftp-hpa - 5.0-1 - A tftp package


    Install tftp-hpa and xinetd using ipkg install
  4. Create or modify /opt/etc/xinetd.d/tftp file like this :

    #
    # ftp://ftp.kernel.org/pub/software/network/tftp/
    #
    service tftp
    {
    flags = REUSE
    socket_type = dgram
    protocol = udp
    instances = 30
    wait = yes
    user = root
    server = /opt/sbin/in.tftpd
    server_args = -s /mnt/HD_a2/tftpboot
    cps = 100 2
    log_on_success = HOST PID
    log_on_failure = HOST
    disable = no
    }
  5. Start xinetd daemon
  6. Download the Ubuntu boot image from here : http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/. Copy the contents to /mnt/HD_a2/tftpboot or where ever your config file points to. This will install Ubuntu Natty 64 bit on your system.
    If you want anything else, install the corresponding tftp boot image from the ubuntu server. For example, for Maverick 32 bit, this will be the location : http://archive.ubuntu.com/ubuntu/dists/maverick/main/installer-i386/current/images/netboot

    At this time, you should test your tftp server.

    From any machine with a tftp client, do this :

    tftp X.X.X.X
    tftp> get pxelinux.0
    Received 14928 bytes in 0.4 seconds

    where X.X.X.X is the IP of the tftp server. This should work. If it fails, you know you did something wrong.
  7. Modify the udhcpd config file. If the IP address of your dhcp server is X.X.X.X then, add the following lines in /etc/udhcpd.conf :

    boot_file pxelinux.0            #default: (none)
    siaddr X.X.X.X #default: 0.0.0.0
    option tftp X.X.X.X

    Then restart udhcpd process:

    #killall udhcpd
    # udhcpd

At this point you have done two things :

  • Installed and configured a tftp server that serves the boot kernel image and initializes the ubuntu setup.
  • Configured the native dhcp server in DNS 323 so that it tells the client what the name of the PXE boot kernel image name is.

Note that upon reboot, your customizations to /etc/dhcpd.conf will be lost.DNS 323 installs pristine copies of config scripts every time it reboots (see /etc/rc.sh). You can automate installation  by scripting the steps in funplug.sh.

Also note that you need to disable any other dhcp servers that you might have in the network so that when your machine boots, it only gets dhcp response from your configured server.

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: