Category: Applications, How to..., Installation, Linux Projects - Hands On — UbuntuLinuxHelp @ 11:43 am —

LaptopLast month we posted a great idea “Make Your Own Plug ‘N Play Zone Using Ubuntu Linux!“, discussing and introducing the concept of a “zone” where laptop (or other) users could plug their units into and have Linux automatically installed upon boot up.spacer_gif Ubuntu Linux Plug N Play Zone Revisited

…It’s a simple 3-step method. Users plug their laptop into one of the two ports and boot off the network. Go away, come back later and it’s all done…spacer_gif Ubuntu Linux Plug N Play Zone Revisited

Some readers have asked me about the actual “code” or parameters - this means the PXELinux Boot Loader - for the auto install feature that would be on the TFTP server. If you’re not familiar with the “Plug ‘N Play Zone”, please do read that earlier post first.spacer_gif Ubuntu Linux Plug N Play Zone Revisited ;) spacer_gif Ubuntu Linux Plug N Play Zone Revisited

One specific question asked:spacer_gif Ubuntu Linux Plug N Play Zone Revisited

This is a nice how to, but I’m a little confused on one point. It may have to do with me not actually doing the steps … but I have used netboot images before, both on Ubuntu and on Debian.spacer_gif Ubuntu Linux Plug N Play Zone Revisited

My problem is that the netboot images I’ve always used just launched an installer. I know you can kickstart autoinstall, but I don’t see that step here. Has netboot changed in the last year, or am I missing something?spacer_gif Ubuntu Linux Plug N Play Zone Revisited

The netboot.tar.gz file that you download, contains the PXELinux boot loader. In my case the boot loader points to this directory: ubuntu-installer/i386/ (because I’m using Ubuntu Linux). The tar contains the following:spacer_gif Ubuntu Linux Plug N Play Zone Revisited

pxelinux.cfgspacer_gif Ubuntu Linux Plug N Play Zone Revisited
pxelinux.0spacer_gif Ubuntu Linux Plug N Play Zone Revisited
ubuntu-installer (the directory with files in it).spacer_gif Ubuntu Linux Plug N Play Zone Revisited

When you look in the ‘ ubuntu-installer’ directory, you’ll see the i386 I mentioned above, as well a Linux kernel, initrd image (in the initrd.gz file). To clarify, the boot loader (netboot.tar.gz) gets placed on the TFPT server in /var/lib/tftpboot (and don’t forget to chown it, I forgot the first time and did have trouble because of it).spacer_gif Ubuntu Linux Plug N Play Zone Revisited

To automate the Plug ‘N Play Zone (so that you just need to set the BIOS to boot of PXE and walk away, you should add a configure a preseed file. Preseed is pretty much like Kickstart, where the file can contain the information you would normally be prompted (on screen) during an installation. Things like timezone, language, keyboard, package selection, repositories, etc.spacer_gif Ubuntu Linux Plug N Play Zone Revisited would be included in that file. We would call the file “preseed.cfg”. An example of a preseed file is pnpzone-generic.cfg. If any of you wonder why it’s referring to Debian in that sample preseed file, that’s because Ubuntu Linux is Debian based.spacer_gif Ubuntu Linux Plug N Play Zone Revisited

One nice feature is that you can locate the preseed file anywhere you want.spacer_gif Ubuntu Linux Plug N Play Zone Revisited For example, you can control your Linux Plug ‘N Play Zone, but allow authorized personnel to edit the preseed file to fit the needs of the batch of units receiving the Linux installation; then they simply ftp the revise file to the web server and it gets used. Easy customization! :) spacer_gif Ubuntu Linux Plug N Play Zone Revisited

Here’s the rub…spacer_gif Ubuntu Linux Plug N Play Zone Revisited

In order for the installation (PXELinux et al) to be able to get the preseed file (in my case plugnplayzone.int), we need to tell it where that file is; at which point it will download the file for use. Here’s how we do that:

(Using the command line),spacer_gif Ubuntu Linux Plug N Play Zone Revisited go back to /var/lib/tftpboot and look for ‘/pxelinux.cfg/default’ to edit it, something like this:

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

Find this:spacer_gif Ubuntu Linux Plug N Play Zone Revisited

LABEL server
kernel ubuntu-installer/i386/linux
append base-installer/kernel/linux/extra-packages-2.6= tasks=standard pkgsel/language-pack-patterns= pkgsel/install-language-support=false vga=normal initrd=ubuntu-installer/i386/initrd.gz --

Change to this:spacer_gif Ubuntu Linux Plug N Play Zone Revisited

LABEL server
kernel ubuntu-installer/i386/linux
append locale=en_US console-setup/layoutcode=en_US netcfg/wireless_wep= netcfg/choose_interface=eth0 netcfg/get_hostname= url=http://plugnplayzone.int/preseed.cfg vga=normal initrd=ubuntu-installer/i386/initrd.gz --

In the above example, you can see I actually forced the US keyboard layout, etc. But you can leave all your preferences in the preseed or override them in the ‘default’ for pxelinux.cfg. Also, ‘plugnplayzone.int’ is just the domain created on a web server, yours will be different.

Hopefully this helps to further round-out the original post and gives some of the less experienced a little more insight.spacer_gif Ubuntu Linux Plug N Play Zone Revisited

Above all…spacer_gif Ubuntu Linux Plug N Play Zone Revisited
Have fun!
:)

1 person has left a comment

#1

[…] For those not aware, I posted a follow-up to the original about a month later, where I finalized some extra issues and information. You can find that post here: Ubuntu Linux Plug ‘N Play Zone Revisited […]

You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.