[LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: [LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients (/showthread.php?tid=83840)
- opdenkamp - 2010-11-15 20:44
just backing up xbmc.img is one of the nice things indeed
the image won't be overwritten until you call "install" by the way.
about the locales: chroot into the target and install language-pack-de or add that to the extra packages when creating a new installation. haven't checked if the name is 100% correct, so if it's not, apt-cache search for language-pack and select the one you need.
btw: if you know how to read bash scripts, open up /usr/sbin/xbmc-diskless.sh and have a look. no rocket science in there and it will make the process a lot clearer to you. it's just a script that I created to fasten up the actions I had to do to create a new diskless installation which I did manually before (cause once you created an image, the only thing you'll ever do is update it and create a new squashfs image). I never did much with bash scripts tbh, so if someone knows bash, you're free to improve/clean up the code
- castlec - 2010-11-23 16:34
So I've already got pxe boot set up with the mythbuntu-diskless-server package. I'd like to give xbmc and its myth plugin a shot to see if I like it better. Does anyone foresee any issues with just doing a standard install on top of my current image? It doesn't look like I need the xbmc-diskless package at all. I would just need to build an appropriate image, if anything; right? Are there PPAs for 10.10?
- opdenkamp - 2010-11-23 17:02
I'm using the same tcp port for the nbd mounted image (port 2000), so only one of them can be active at any time or you'll have to use another port number. Only port 2000 works for xbmc-diskless at the moment, so you'll have to do that in the mythbuntu config.
The rest should not interfere with mythbuntu-diskless.
You have two choices:
- use your mythbuntu installation and just install xbmc in it's image
- install xbcm-diskless-server and create a new image for xbmc
The first option is the easiest if you're not familiar with this, but it will be slower and probably won't boot anymore after a power failure or some os crash.
- castlec - 2010-11-23 17:57
dushmaniac Wrote:I'm using the same tcp port for the nbd mounted image (port 2000), so only one of them can be active at any time or you'll have to use another port number. Only port 2000 works for xbmc-diskless at the moment, so you'll have to do that in the mythbuntu config.
Not exactly sure what I'd need to do here. Would you be able to elaborate?
dushmaniac Wrote:The first option is the easiest if you're not familiar with this, but it will be slower and probably won't boot anymore after a power failure or some os crash.
dushmaniac Wrote:- install xbcm-diskless-server and create a new image for xbmc
can I just use an
Thanks a lot for your help.
- opdenkamp - 2010-11-23 18:41
castlec Wrote:Not exactly sure what I'd need to do here. Would you be able to elaborate?mythbuntu-diskless-server uses a squashfs image mounted using nbd. the default tcp port used by mythbuntu-diskless is 2000. I'm using the same port number for the image for xbmc-diskless and you can only serve 1 block device on a port.
it's configured in /etc/inetd.conf, so you'll have to change it there after using the "install" option in the xbmc-diskless menu (assuming you followed the howto on page 1)
Quote:Why slower?explained it on the previous page. to put it simple: I'm not using nfs for things that don't have to be persisted in xbmc-diskless and nfs is used differently in general. There are also a couple of differences in the init scripts, making it boot and shutdown a lot faster.
Quote:can I just use anyou could just install xbmc on a ltsp image. then you'll just have a normal ubuntu installation (but booted over the network) with xbmc on it. the xbmc-diskless images won't boot a full ubuntu installation but will just boot the basic things that are needed and xbmc (so no window manager etc.)
if you're going to install it on your ltsp image, don't try to install "xbmc-diskless-client" but install "xbmc" or it'll fail the preinstall checks, saying that you can't install the package on a non-diskless installation
- arionl - 2010-11-28 22:11
Today I decided to update the XBMC inside of my diskless chroot. I used the commands you listed earlier to properly enter the diskless root target at "/var/lib/xbmc-diskless/target" and then did an "aptitude update; aptitude safe-upgrade". When it got to upgrading "xbmc-diskless-client" I received an error saying " This package is only meant to be installed inside a XBMC diskless chroot." Should I force this package to install? Any suggestions?
- opdenkamp - 2010-11-28 23:57
it's a safeguard so that you don't make a non-diskless installation unbootable.
inside your chroot, do this and run the update process again:
you can also just choose "upgrade" in the xbmc-diskless menu.
- arionl - 2010-11-29 01:38
Thanks for the info. I was inside of the chroot doing some other tweaks and figured I'd do the package update there rather than using the menu selection. Thanks for pointing out how to place a trigger for successful package installation.
Btw, you mentioned that you would be working on integrating shared library support in your xbmc-diskless scripts. I was able to set up an SQL server for my diskless clients and configure them via advancedsettings.xml and it seems to be working good so far. The only other challenge I faced was providing a shared directory for the clients to all have access to a shared Thumbnails/images directory (normally found at "~/.xbmc/userdata/Thumbnails"). Here's what I did:
1) created a directory called "/var/lib/xbmc-diskless/overlay/library" and shared it out via NFS from the server
2) added a "/etc/fstab" NFS mount entry inside the target so the clients could mount the directory. To make things simple, I have this shared directory mounted as "/mnt" in the diskless clients
3) created a symlink inside each diskless client's userdata directory to point "Thumbnails" to /mnt.
4) added a "mount /mnt" to /etc/rc.local, since I had problems with normal NFS mount flags getting clients to automount the share, even when it was marked as mount-on-boot.
Does this seem reasonable or similar to an approach you've used? I know its kinda convoluted, but it seems to be working for now...
- opdenkamp - 2010-11-29 14:58
Quote:Btw, you mentioned that you would be working on integrating shared library support in your xbmc-diskless scripts.yeah that one's still on my todo list
Quote:2) added a "/etc/fstab" NFS mount entry inside the target so the clients could mount the directory. To make things simple, I have this shared directory mounted as "/mnt" in the diskless clientswhy not just mount ~/.xbmc/userdata/Thumbnails directly?
Quote:4) added a "mount /mnt" to /etc/rc.local, since I had problems with normal NFS mount flags getting clients to automount the share, even when it was marked as mount-on-boot.I currently have it mounted by an rc script too, because I'm checking if the Thumbnails folder doesn't exist yet, etc.
Quote:Does this seem reasonable or similar to an approach you've used? I know its kinda convoluted, but it seems to be working for now...I'll see if I have enough time to update the script somewhere this week.
- arionl - 2010-11-30 16:18
dushmaniac Wrote:yeah that one's still on my todo list
Yeah I suppose I should really mount it directly but for now I'm still manually tweaking each of my diskless clients (I only have two of them). I figured it was easier to let the clients create a skeleton "~/.xbmc" directory on first boot and then go to the server and add any client-specific customizations (including sources, advancedsettings, Thumbnails symlink). I guess there really isn't any reason I can't automate this and it would be a lot cleaner, but for now, with my two clients, its working ok
BTW, I had to update the NVidia drivers and ALSA in my XBMC target image to get HDMI audio working because one of my diskless clients is a Gen2 ION system (Zotac ZBOX HD-ID11-U). It took a bit of trial and error, but I was able to get everything working eventually using various Ubuntu PPAs.
Thanks again for your work on the diskless package. Its so much nicer to have a server-based solution for my media boxes than maintaining them separately before.