Install a new image
- after completing the previous steps succesfully, we're going to install our new image. Choose 'install' in the menu.
- first, you're asked to shut down all your clients, because replacing the image of an existing installation will crash running installations (yes they will crash, really, don't try).
- next, the kernel and initrd are copied, the new squashfs image is installed and the configuration of inetd and NFS are adapted (if needed).
- if everything worked correctly, you'll see the following image:
![[Image: alldone.jpg]](http://lars.opdenkamp.eu/xbmc-diskless/images/alldone.jpg)
- you're almost done. continue to the final step.
Adding your server to the DHCP options of the clients
You only have to do this once.
Your clients have to know where to find the files it needs to boot. This is done by adding it to the DHCP of the clients. If you are using ISC dhcp, the default dhcp server on Ubuntu, add these lines to your host's configuration lines:
Code:
next-server XXX.XXX.XXX.XXX;
filename "/pxelinux.0";
Replace XXX by your server's IP address.
Example:
Code:
subnet 192.168.64.0 netmask 255.255.192.0 {
range 192.168.90.100 192.168.90.125;
next-server 192.168.64.1;
filename "/pxelinux.0";
}
Restart your dhcp server to make the new configuration active:
Code:
sudo /etc/init.d/dhcp3-server restart
On your clients, enable "boot from LAN" in the BIOS. Check your motherboard's or network card's manual on how to do that.
Provisioning (optional)
You might want to distribute some files to one or more clients without adding them to the image. Think about your video database, lirc config files, etc.
That's what the provisioning mechanism is for. In the directory /var/lib/xbmc-diskless/provsion you can create a directory 'default' with files you want to have copied to all clients on the first boot. Those files will be copied to the client's /home/xbmc directory on the first start of each client.
You can also add directories for each separate client by creating a directory with the mac address of the client as name (without the colons).
Please make sure you have the permissions set correctly:
chown 1000:1000 to each of the files.
/etc is symlinked to /home/xbmc/config so you can add files there too.
To update the provisioning package, start the xbmc-diskless.sh GUI and choose "provision"
Upgrading (optional)
If you created an image before, you can upgrade it without creating a new image. Choose "upgrade" from the menu to run "sudo apt-get -f dist-upgrade" on the target.
If for some reason the update failed, you can manually fix it by running these commands (this will be simplified in the next version):
Code:
sudo mount -o bind /dev /var/lib/xbmc-diskless/target/dev
sudo mount -t proc none /var/lib/xbmc-diskless/target/proc
sudo mount -t sysfs none /var/lib/xbmc-diskless/target/sys
sudo mount -t devpts none /var/lib/xbmc-diskless/target/dev/pts
sudo cat << EOF > /var/lib/xbmc-diskless/target/usr/sbin/policy-rc.d
#!/bin/sh
exit 101
EOF
sudo chmod +x /var/lib/xbmc-diskless/target/usr/sbin/policy-rc.d
sudo chroot /var/lib/xbmc-diskless/target apt-get -f install
sudo umount /var/lib/xbmc-diskless/target/dev/pts
sudo umount /var/lib/xbmc-diskless/target/sys
sudo umount /var/lib/xbmc-diskless/target/proc
sudo umount /var/lib/xbmc-diskless/target/dev
Extras (optional)
There are a few more options available by editing the configuration files. Check the readme file in /usr/share/doc/xbmc-diskless-server, or choose 'help' in the GUI.
Checklist
- if you have multiple network cards, the hostmask and server ip might not have been detected correctly with this version. verify the contents of these files:
Code:
nano /etc/inetd.conf
nano /etc/exports
nano /var/lib/tftpboot/pxelinux.cfg/default
- verify that the required software is running correctly by executing the following command.
Code:
sudo xbmc-diskless.sh check
If everything is alright, it should show this output:
Code:
Loading the default configuration
Checking your configuration:
image present: yes
inetd running: yes
tftpd running: yes
tftpd (69) listening: yes
nfsd running: yes
mountd running: yes
statd running: yes
portmap running: yes
/etc/exports has overlay: yes
portmap (111) listening: yes
nfs (2049) listening: yes
If anything went wrong, go back to the first post and verify each step. If it still doesn't work, report it here.
Source
The latest sources can be found at
http://github.com/opdenkamp/xbmc-diskless
Disclaimer
Not every advanced option from the config file is working correctly at the moment, because this is still in beta stage. e.g. the option for the nbd server port that is used is not read and port 2000 is always used. All the functions described here are working fine and have been tested using various setups, but all of them are using nvidia video cards. I haven't tested any others since I don't have any.
I have a lot of things that I want to add later. Think about a centralised user database, the ability distribute one client's config to others, wake on lan for clients, resetting a clients config from the GUI, etc. Since this version is usable and tested already (I'm using this system for months on all my clients now), I didn't want to wait till all those features are added before releasing it. Be sure to check for updates regularly!
If you're having trouble, be sure to check the log file /var/log/xbmc-diskless.log for information about what went wrong. If you need more help, post your question here or ask me on irc.
This software is based on mythbuntu-diskless-server, which is based on ltsp-client-core. Their copyright notices can be found in /usr/share/doc/xbmc-diskless-server
This howto is updated for xbmc-diskless v0.4.9.1