[LINUX] HOW-TO create a XBMC server for diskless PXE network booting clients

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
mason Offline
Senior Member
Posts: 266
Joined: Sep 2008
Reputation: 0
Location: Germany
Post: #31
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...
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 1,948
Joined: Feb 2009
Reputation: 24
Location: Heerlen, The Netherlands
Post: #32
is the correct server ip setup in the pxe commandline?

my config looks like this and works fine:
Code:
DEFAULT vmlinuz ro initrd=initrd.img nbdroot=192.168.64.1 nbdport=2000 xbmcdir=nfs=192.168.64.1:/var/lib/xbmc-diskless/overlay 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.

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
mason Offline
Senior Member
Posts: 266
Joined: Sep 2008
Reputation: 0
Location: Germany
Post: #33
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!
(This post was last modified: 2010-11-09 00:15 by mason.)
find quote
harryzimm Offline
Posting Freak
Posts: 852
Joined: May 2008
Reputation: 6
Location: Auchtermuchty, Scotland
Post: #34
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

cheers

HTPC 1 : Acer revo R3700 ion2 HTPC 2 :Apple TV2 HTPC 3 : Apple TV2 HTPC4 Acer revo R3700 ion2 Remote : x2 Riimote2
SERVER : 10TB Ubuntu Server 10.04, dual wintv nova hd s2 cards, tvheadend, Newcs, Omnikey reader, White *Sky uk* Card, Mysql Db, Sabnzbdplus, SickBeard, Couchpotato, FlexRaid. :cool:
--------------------------------------------
[Image: widget]
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 1,948
Joined: Feb 2009
Reputation: 24
Location: Heerlen, The Netherlands
Post: #35
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.

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
mason Offline
Senior Member
Posts: 266
Joined: Sep 2008
Reputation: 0
Location: Germany
Post: #36
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?
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 1,948
Joined: Feb 2009
Reputation: 24
Location: Heerlen, The Netherlands
Post: #37
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:
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
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:
Code:
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

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
mason Offline
Senior Member
Posts: 266
Joined: Sep 2008
Reputation: 0
Location: Germany
Post: #38
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 :

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

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

Code:
/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
(This post was last modified: 2010-11-09 21:31 by mason.)
find quote
opdenkamp Offline
Team-XBMC PVR Developer
Posts: 1,948
Joined: Feb 2009
Reputation: 24
Location: Heerlen, The Netherlands
Post: #39
your ip and netmask weren't detected. should detect that and ask to enter one.

replace that line by:
Code:
/var/lib/xbmc-diskless/overlay/ xxx.xxx.xxx.xxx/yy(rw,no_root_squash,async,no_subtree_check)
xxx = ip, yy = netmask

opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
find quote
mason Offline
Senior Member
Posts: 266
Joined: Sep 2008
Reputation: 0
Location: Germany
Post: #40
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...
find quote
Post Reply