Squeezebox Setup

PXE Booting CentOS

These days getting Linux onto a server, even with no cd drive is not that hard.  You can build bootable usb keys, plug in a usb cd drive or use network boot.  In the end I went for a network install.  I’m going to assume that you have access to a windows machine elsewhere on the network in order to get this working.  Before you start a network install you will need a few things on your windows box:

  • A DHCP / TFTP server – like this one
  • The centos pxe boot files – vmlinuz and initrd.img.  You can grab these off any centos mirror – here for example
  • pxelinux.0 – this is the key to remote booting.  It is in the /core folder of a syslinux distro – which you can get from here

To get the pxe boot to work you need to:

  1. Turn off any other DHCP server on your network (if you own a router there is almost certainly a dhcp server in there).  You can only have one running at once
  2. Unzip tftpd32 into its own directory (c:\tftp32 for example)
  3. Copy the vmlinuz, initrd.img and pxelinux.0 files into the tftp directory too
  4. Inside the tftpd directory create a sub directory called pxelinux.cfg (be careful – it’s a directory not a file)
  5. Inside the pxelinux.cfg directory create a text file called default (no file extension).  Open the file and put the following into it:
  6. default boot
    prompt 0
    say booting…
    label boot
    kernel vmlinuz
    append initrd=initrd.img

  7. Start tftp32.  Go into the settings screen and make the settings look like this:
  8. TFTP32 settings

    Note that the ip address is the ip of my windows machine – yours will be different.  The base directory will be set to the directory you installed tftp32 into.

  9. Configure the DHCP tab to match your current settings.  The router ip is the IP of your real router, but your DNS servers should be the ISP DNS servers (i.e. if your computer says that your gateway and dns server ip’s are the same then you’ll need to find out from your ISP what the real dns server is).  You can get the gateway and subnet mask ip from the network settings in control panel in windows or by doing start->run then type cmd.  In the command prompt that appears type ipconfig and hit return.  It will give you your ip, your subnet and gateway.  Make very sure that the ip address your pc has is in the same subnet that the dhcp server will give out – or the network boot will not work.  My settings were as follows.
  10. DHCP Settings
  11. Turn on your server and go into the bios.  Make sure that in the boot order section you have network boot at the top.  If all goes well then after a reboot you should see youself in the centos installation program.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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

Create a free website or blog at WordPress.com.

%d bloggers like this: