Kodi Community Forum

Full Version: [LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
I tried the suggested, and this looks totally fine. I can browse the mounted image in the mount point. I guess the daemon somehow connects to the wrong server...
is the correct server ip setup in the pxe commandline?

my config looks like this and works fine:
DEFAULT vmlinuz ro initrd=initrd.img nbdroot= nbdport=2000 xbmcdir=nfs= xbmc=autostart probe_mask=4 vga=0x361 quiet splash
the nbdport isn't parsed correctly at the moment.

I'll make some changes this week that make it more verbose and look to the config options too.
Thats it, the config was missing the IP for the nbdroot! Thanks a lot... not it's starting up fine. Now i need to add the persistent stuff and fine-tune the whole thing.

I didn't time the bootup but it feels as fast as from the HDD, awsome!

Great addon!
Thought i would report back...

The process went without a hitch, thanks again. I'm especially impressed by the boot speed and gui performance. The only thing that wont work is suspend. I wasn't sure it would work anyway, i take it its a limitation of network booting? Anyway, all praise here.... great work

Good to hear that it works properly Smile

Suspend won't work because the root device won't be reachable when your pc starts up again.
After fiddling around with it for the whole night, I am hugely impressed. This is the first time EVERYTHING including HD Channels are absolutely smooth!

If you ever around, the beer is on me Wink

But I'm afraid i have to come back for support soon, since I'm not familiar with the whole idea of a nbd served file system and I need to integrate some attached device drivers and stuff to it. Also anyone have some experience performance wise with a big library full of artwork, infos and so on?
Hehe thanks Smile

I'll create an "easy access command line" later for changing the ndb image. Until then, use these commands to chroot into the target filesystem:
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
exit 101
sudo chmod +x /var/lib/xbmc-diskless/target/usr/sbin/policy-rc.d
sudo chroot /var/lib/xbmc-diskless/target
This will give you a bash shell in the target with all virtual filesystems mounted. The policy-rc.d file makes sure that dpkg doesn't try to run daemons etc. after installing them (you don't want those running on your server).

After you did your thing, press ctrl+d to logout (or just type "logout" and press enter) and umount the virtual filesystem:
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
Then you can start xbmc-diskless.sh again and choose "pack" to create an update nbd image. Choose "install" to make it active.

About your libraries: I got the video and music database on mysql on my server and I'm using nfs to share the images and stuff. I'll integrate this in a future version so you don't have to do any manual configuration. Stay tuned Smile
Due to a lazy day at work I managed to understand the whole concept a little bit better, also i managed to get some of my needed tools compiled and packaged to install it into the chroot to keep the image clean from any compiler stuff. Looking pretty good so far. I only noticed the xbmc home didn't get mounted, so my settings weren't saved. As usual you notice that 'after' you configured everything Wink

But it looks like its my server that isn't able to export the netmask for xbmc, if i try to start the server I'll end up with :

/etc/init.d/nfs-kernel-server start
* Exporting directories for NFS kernel daemon...                                                                                                                exportfs: invalid netmask `' for

the /etc/export on the server look like this :

/var/lib/xbmc-diskless/overlay/ /(rw,no_root_squash,async,no_subtree_check)

is this correct? since the path isn't a squash fs isn't it?

Edit: Nevermind, I'll added the correct client IP to the netmask of the export. Now the server is up and running. Somehow the configuration of the whole thing is missing IPs.... weird
your ip and netmask weren't detected. should detect that and ask to enter one.

replace that line by:
/var/lib/xbmc-diskless/overlay/ xxx.xxx.xxx.xxx/yy(rw,no_root_squash,async,no_subtree_check)
xxx = ip, yy = netmask
I have everything up and running, it's awesome! Thanks again for your help and the tool in the first place. I'm still struggling with some minor details (EPG Info) but this is something for another threat...
if you're having trouble with the epg in tvheadend, check out the sources from my sig.
Aren't you are using your PVR builds for the diskless version? The problem lies with XBCMC i guess, the EPG Info thats injected into TVHeadend are displayed fine on the Webif of TVHeadend but not added to the XBMC EPG....but we are going offtopic!
I am using my own builds ofc Smile The EPG works fine in these builds.
But you are correct, this is not something for this topic but for the tvheadend topic.
Quick question,

Whats the best way to update the nvidia driver?

I'm just using a lucid dist with the included drivers, because I haven't run into any issues (yet) that require upgrading.

You can use the normal, dkms based, packages from the ubuntu repos for upgrading your clients, or you can grab the latest ones from the nvidia site and run the installer. I wouldn't recommend that on normal systems (because you could get into trouble with the next upgrade). For these diskless images it's no problem, but I wouldn't use apt-get (dist-)upgrade after installing anymore but rather create a new image then.

If you want to change anything in the image, use the commands I put a few posts back (or the main post) on how to chroot into the target.

Do NOT install anything on a running diskless system, because it will be lost on the next reboot. I'm only persisting changes in /etc and /home/xbmc and the rest is only kept in memory. An htpc with xbmc doesn't need anything else, so I made it like this to improvement the speed.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17