Saturday, August 28, 2010

Overview for installing Ubuntu via network

Simple overview for installing Ubuntu via network.
  • Ubuntu Server is the OS we will install in this guide.
  • Note: this is just the big picture, other guides can instruct on setting up the various DHCP, DNS, TFTP, and HTTP servers.
  • The main idea is to focus on the fact that once the detail work is done (and most local networks have these setup) there's basically only 3 major steps to net install nirvana.

  • Let's say you have a new energy efficient small, maybe 1U rack or smaller device with no CD reader. You don't want to spend the cash for an external CD(DVD)/R(W), you don't want to deal with the various USB guides, you already have a the following prereqs, or a device or two you can easily install and configure the services on.
  • A PXE enabled NIC on the target device.
  • A capable DHCP server.
  • A TFTP server.
  • An HTTP server (FTP, NFS are also fine but not explored here).
  • The Ubuntu install ISO you wish to use - ubuntu-10.04.1-server-amd64.iso will be used in this example.
Mount the ISO at the TFTP server root, and (re)start the TFTP server:
  • mount -o loop /path/to/ubuntu-10.04.1-server-amd64.iso /path/to/tftproot
Mount the ISO at an HTTP host or vhost root (this assumes your TFTP and HTTP servers are on separate hosts - see notes below):
  • mount -o loop /path/to/ubuntu-10.04.1-server-amd64.iso /path/to/www
Edit your DHCP server to provide the proper data to the PXE client, by adding:
  • filename "install/netboot/pxelinux.0";
  • next-server tftpserverhostname;
  •                  pool {
  •                         deny known-clients;
  •                         range;
  •                         filename "install/netboot/pxelinux.0";
  •                         next-server mytftpserver;
  •                         }
Restart the DHCP server.

Enable PXE boot in your target device and boot. The installation will begin.

As you follow the installation you will be asked what mirror to use for the Ubuntu archive. Scroll to the top of the country list and select "enter information manually". When prompted type in the HTTP hostname that will serve up the previous mounted ISO's files, ex: www.mylocalsrv.soho. On the next screen leave /ubuntu/ as the archive mirror directory. Finish installation.

  1. If your DHCP server and TFTP server are on the same host then the "next-server" DHCP entry may not be needed (I haven't tested this as these are different servers on my network).
  2. If your TFTP and HTTP servers are on the same host then instead of two separate loop mounts you could symlink one to the other. Again not the case on my network (and of course I had a copy of the ISO on each system).
  3. Without DNS resolution you will need to specify the TFTP "next-server" and your HTTP server using IP addresses instead of hostnames.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.