Kodi Community Forum
[LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/forumdisplay.php?fid=110)
--- Thread: [LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients (/showthread.php?tid=83840)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

- JohnPollaert - 2011-01-05

The windows firewall was in the way. Now
TFTP GET initrd.img
is working.
TFTP GET /xbmc-netboot/initrd.img
gives me a file not found.

- opdenkamp - 2011-01-05

I assume you verified that the file is present on that server in /var/lib/tftpboot/xbmc-netboot/initrd.img ?

are you running tftpd-hpa? if not, install it. then open /etc/default/tftpd-hpa and add "-v" to the options. restart the daemon with /etc/init.d/tftpd-hpa restart

now try to access the file again from your diskless client or windows machine and have a look at the log.

- JohnPollaert - 2011-01-05

Thank you! That did it. After adding the -v option I was able to see in the log that all the needed files where in the /var/lib/tftpboot/ folder, and not in /var/lib/tftpboot/xbmc-netboot. After copying the files over to the correct location, it started working!
Thanks for your help!

- JohnPollaert - 2011-01-06

One of my clients is an Acer Revo 3600. It is having the exact same issue as drefas has. Does anyone has a solution for this problem?
drefas Wrote:Thank you for a great product!

However, i'm having a weird problem on one of my clients. It starts booting from PXE, after the first splash screen it fails to receive an IP:

Attempting to get a DHCP address...
info, udhcpc (v0.9.9-pre) started
Sending discover. . .
Sending discover. . .
Sending discover. . .
No lease, failing

dmesg is telling me this:

[ 2.850909] eth0: no link during initialization.
[ 2.851754] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4.023525] eth0: link up.
[ 4.024748] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 4.680443] eth0: link down.

The really weird thing is that if I unplug and then reconnect the ethernet cable, it receives an IP address and continues to boot. I'm getting the same behavior when setting a static IP in pxelinux.cfg/default.

When booting xbmclive installed on the harddrive, ir receives IP without any hiccups.

Hardware-wise, this is an Acer Revo 3600.

Does anyone know what to do?

- opdenkamp - 2011-01-06

looks like an issue with the network driver or the udhcp script.

adding a sleep before calling udhcp might help. I'll add a boot option so you can configure a sleep time before calling udhcp.

- ErAzOr2k - 2011-01-08

JohnPollaert Wrote:One of my clients is an Acer Revo 3600. It is having the exact same issue as drefas has. Does anyone has a solution for this problem?

Are you using DHCP server or ProxyDHCPHuh

- opdenkamp - 2011-01-08

it's probably caused by this issue: https://bugs.launchpad.net/ubuntu/+source/ltsp/+bug/505916

should be fixed now if you get the latest source from github. I'll build new packages later.

- wetwilly - 2011-01-09

Let me start by thanking you for your work on this it's a great project!

I installed it earlier today from the ppa on a fresh kvm based on ubuntu 10.10 server 32bit.

After reading through the forum and re-installing again on another kvm I experience some of the same problems as others have mentioned.

First I noticed that some of the configuration files did not get created correctly.
pxelinux.0 gets created in /var/lib/xbmc-diskless/target/usr/lib/syslinux/

xbmc-netboot is created but empty.

pxelinux.cfg/default are not created at all.

So I created the needed files and edited them and got my htpc to boot, showing the xbmc logo with dots loading underneath, looking at the console I noticed it was asking for dhcp-requests which kept getting rejected over and over again. I use pfSense as router.

Then I read that you updated today probably fixing that bug so I installed git and cloned the source but couldn't figure out how to install it from source, should I just replace the files currently installed with the ones from source? move xbmc-diskless.sh to /usr/sbin and so forth?

If you are interested in suggestions for improvements it would be really nice to have a central library installed on the server and then provision clients to use that library by default.
Like this: http://forum.xbmc.org/showthread.php?tid=80829

Update: After assigning a static DHCP-lease in pfSense to the mac-address that wants to pxeboot the DHCP NAK stopped spamming and all booted fine. I'm running the 2.beta version of pfSense. Could be useful for the others out there.

for further reference, would this be correct config to set a static ip in pxelinux.cfg/default (as long as I'm only using one client it should be ok)

- opdenkamp - 2011-01-09

I noticed that the files are not going into /var/lib/tftpboot/xbmc-netboot indeed. I'll correct it.

The central library has been suggested earlier. I would already have implemented it if the whole git move thing and pvr refactoring wouldn't take that much time Smile

If you're building from source, you'll have to build the packages with dpkg-buildpackage and install those. Don't copy files directly.

Like I said, I'll build new packages later that includes the dhcp thing.

- murph - 2011-01-09

arionl Wrote: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.

Arion, could please tell which PPAs you've used? I'm also stuck in the trial and error loop.

I've installed alsa 1.0.23 from here: ppa:x3lectric/experimental and the kernel module from here: ppa:ubuntu-audio-dev/ppa.

aplay -l shows one hdmi device afterwards, but there should be many since I need a device like plughw:1,7 which doesn't show up.

Many thanks,

- wetwilly - 2011-01-09

I dont use hdmi for audio Murphy but you should try to unmute all channels available in alsamixer, I experienced that on a friends asrock.

I read something about suspend not being able to restore, is there any way to put the root device in the ram during suspend together with Suspend to Ram?

- murph - 2011-01-10

Thx for the tip. but my problem WAS that I didn't even had a device.

But it's solved now - I used latest nvidia driver from ppa:ubuntu-x-swat/x-updates (I guess this was the problem) and didn't need to upgrade to alsa 1.0.23 tools, but the kernel module from ppa:ubuntu-audio-dev/ppa.

Here is what I did:
- created a new lucid image (without packing it) with xbmc-diskless.sh
- added lucid-updates repos to the /var/lib/xbmc-diskless/target/etc/apt/sources.list
- added the "ppa:ubuntu-x-swat/x-updates" inside the chrooted target
- added the "ppa:ubuntu-audio-dev/ppa" inside the chrooted target
- did "apt-get update" inside the chrooted target
- did "apt-get dist-upgrade" inside the chrooted target which gives kernel 2.6.32-27
- installed corresponding "linux-alsa-driver-modules-2.6.32-27-generic" inside chrooted target
- installed latest nvidia driver "nvidia-current", "nvidia-current-modaliases", and "nvidia-settings" inside chrooted target
- went back to xbmc-diskless.sh to pack and install the image

thx Lars for xbmc-diskless and all you do on xbmc PVR!

- opdenkamp - 2011-01-10

wetwilly Wrote:I read something about suspend not being able to restore, is there any way to put the root device in the ram during suspend together with Suspend to Ram?
nope, not at the moment. maybe something like that could be implemented, but then you would have to download the whole fs image to each client: not so nice.

rather have a look at if it's possible to restore the network connection without disk access. I found out that it works in some occasions, but not yet why.

- ErAzOr2k - 2011-01-10

does anyone know where the file MyTV4.db is located for earch client? I couldn't find it in the overlay dir :/

- opdenkamp - 2011-01-10

/var/lib/xbmc-diskless/overlay/[MAC OF CLIENT]/.xbmc/userdata/Database

This forum uses Lukasz Tkacz MyBB addons.