Automatic diskless boot of media directors

From LinuxMCE
Revision as of 19:33, 26 September 2007 by Lozzo (Talk | contribs)

Jump to: navigation, search

LinuxMCE allows media directors to be booted over the network. This means that you can boot up thin clients without hard drives, or systems with other operating systems without affecting what is already on the disk.

How to set it up

1: Enable PXE boot

This is also known as network boot and can be accessed in your computer's BIOS. The exact procedure varies depending on your PC. Normally you press F2 or DEL right after turning the PC on to enter the BIOS settings. There is then usually an advanced option to enable this.

2: Set the correct boot order

You are also going to want to set the boot order in the BIOS so the network boot comes first, and your hard drive second. However most BIOS's will make you first enable network boot, save your changes, restart the computer, and then enter the BIOS settings a second time to set the boot order.

3: Determine your network card's MAC address

When network boot is working you should see at bootup the PC's mac address, and a messages about trying to contact a DHCP server, or trying to find a network boot image. This will be a new message you didn't see before and it means network boot is active on the PC. It will usually try for about 10 seconds to do a network boot image, and then give up and boot off the hard drive. This is what you want. When you see the message that it is trying to do the network boot, write down the mac address.

You can also get the mac address in Windows by running IPCONFIG command prompt, or in Linux by typing ifconfig as root from a console.

4: Setup the media director in LinuxMCE

In LinuxMCE Admin go to Wizard, Devices, Media Directors. Add the media director if this is a new one, and set the mac address. The mac address should be a series of six 2 character sequences separated by colons, like this: 1A:00:F2:21:23:9F

Click 'update' to save your changes, and then click 'Setup Diskless Media Directors'. Wait for the popup window to finish. If this is a new media director you just added, go to Wizard, Restart and click 'Quick Reload Router' so the Router is aware of this new device.

5: Boot up from the network

Now turn on the PC. You should see that it gets an IP address and boots into the media director software. The first time you boot it, it can take up to 30 minutes to boot because it will be installing a lot of the software on the diskless image on the core, and it will also need to generate a user interface.

Once it's up, use the Wizard, Devices, Media Directors page to set the display resolution and also choose extra software you want to run on that Media Director with the 'Edit Computing Applications' button.

How to use it

Using LinuxMCE. If this media director has a hard drive in it that contains another operating system (like Windows or Linux), then from the media director's on-screen orbiter, or from any other orbiter that is currently controlling that media director, hit the 'power' button and choose 'restart as windows/linux' to boot up the computer off the hard drive and use it like a normal PC. Then choose 'restart as LinuxMCE' from the orbiter to boot it back again into LinuxMCE.

GRUB PXE network boot

In some situations, it may be more appropriate to use GNU GRUB bootloader:

  1. The machine does not support PXE booting directly (no boot-ROM).
  2. You can use a GRUB bootmenu to decide wheter you want to boot LMCE or the native OS.
  3. Booting is a lot faster when you boot the native OS by skipping the network step.
  4. GRUB allows for easy adjustments of the boot parameters at boottime.

This is described in detail at GRUB PXE network boot.

Programmer's guide

The network boot images are contained in /usr/pluto/diskless/[ip address]. If a network image is corrupted, just delete that directory, and re-run 'Setup Diskless Media Directors'.

When the user hits the power button to change which device is booted, the command is sent to "General Info Plugin", which updates /tftpboot/pxelinux.cfg/01-[mac address]. That file contains a line KERNEL or LOCALBOOT 0, depending on what the user wants to boot. If it's LOCALBOOT 0, then when the media director tries to do a network boot the Core will tell it to boot off the hard drive instead. General Info Plugin then sends the App Server running on that machine a command to reboot.

Since there is both a Linux and Windows version of App Server, if App Server is installed and running on the Windows PC, then LinuxMCE can still reboot it remotely back into the network boot even if it's running Windows. Also the Windows App Server utility gives you a tray icon to switch back to network boot.