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


- ivanmacx - 2011-03-19

...also, here's the relevant output of glxinfo:

Code:
name of display: :0.0
display: :0  screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGIX_visual_select_group
[b]client glx vendor string: NVIDIA Corporation[/b]
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_EXT_import_context, GLX_SGI_video_sync,
    GLX_NV_swap_group, GLX_NV_video_out, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer,
    GLX_SGI_swap_control, GLX_EXT_swap_control, GLX_ARB_create_context,
    GLX_ARB_create_context_profile, GLX_NV_float_buffer,
    GLX_ARB_fbconfig_float, GLX_EXT_fbconfig_packed_float,
    GLX_EXT_texture_from_pixmap, GLX_EXT_framebuffer_sRGB,
    GLX_NV_present_video, GLX_NV_copy_image, GLX_NV_multisample_coverage,
    GLX_NV_video_capture
GLX version: 1.2
GLX extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGI_swap_control,
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_ARB_get_proc_address
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 945GM GEM 20091221 2009Q4
OpenGL version string: 1.4 Mesa 7.7.1
OpenGL extensions:
    GL_EXT_texture_env_add, GL_ARB_depth_texture, GL_ARB_draw_buffers,
    GL_ARB_fragment_program, GL_ARB_multitexture, GL_ARB_point_parameters,
    GL_ARB_point_sprite, GL_ARB_shadow, GL_ARB_texture_border_clamp,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_mirrored_repeat, GL_ARB_texture_non_power_of_two,
    GL_ARB_vertex_program, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra,
    GL_EXT_blend_color, GL_EXT_blend_func_separate, GL_EXT_blend_minmax,
    GL_EXT_blend_subtract, GL_EXT_draw_range_elements,
    GL_EXT_framebuffer_object, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_EXT_stencil_wrap,
    GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine,
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic,
    GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
    GL_IBM_texture_mirrored_repeat, GL_NV_blend_square,
    GL_NV_light_max_exponent, GL_NV_texture_env_combine4,
    GL_NV_texture_rectangle, GL_NV_texgen_reflection, GL_NV_vertex_program1_1,
    GL_SGIS_generate_mipmap, GL_SGIS_texture_lod

Client vendor string is showing as Nvidia. Is this the problem? If so, can anyone tell me what to do to change this?

UPDATE: Pretty sure it's the Nvidia issue that's the problem because on the client I did an

Code:
apt-get remove nvidia*

and it has solved the problem but broken the xbmc-diskless package. I did this on the client not the server so I am presuming it will break again on reboot, and I don't want to apply this fix to the target because of it breaking the package dependencies. Is there anything I can put in the overlay to stop it using the Nvidia glx client?

Thanks.


- opdenkamp - 2011-03-20

did you install the drivers in the image? because you can't do that on a running client. changes to anything except /etc and /home/xbmc will be gone after a reboot, so your drivers that are installed to /usr/something are gone then.


- ivanmacx - 2011-03-20

When I originally changed the drivers I did it by chrooting into the target on the server, installing the packages and then re-packing and installing the image.

With my latest change of removing the nvidia drivers I did that on a running client because I didn't want to permanently break the xbmc-diskless package. I know that the changes will be gone when I reboot so I'm not rebooting!

Can you tell me what package or module provides the glx client? I have the feeling this will work if I can get that back from the Nvidia version to the x.org one?

I also don't understand why the xbmc live image isn't correctly detecting the Intel graphics chip and using the correct modules.


- opdenkamp - 2011-03-20

I think I made the nvidia package a dependency of the xbmc-diskless-client package so it installs automatically. you could customise the debian/control file so it installs the intel package instead. you can find the sources in my sig.


- ToKy - 2011-03-27

How can I edit the image that gets loaded every time?
Is the only/best way to go about this is to create the provisioning part?

I want to load the same image to all my xbmc clients and would like to include all the config files I have already created in my current setup (with disk). So it uses my nvidia onboard card to its full potential and so I can use different themes other than the default one.

Currently testing on a Zotac Zbox HD-ID11 w/ 4GB of RAM

Thanks for this great setup ;-)


- ivanmacx - 2011-03-27

If it's just a case of adding files then you can add them in the target directory on your server which will normally be /var/lib/xbmc-diskless/target and then run

Code:
sudo xbmc-diskless.sh

and choose 'pack' then 'install'.

If you need to install packages then you need to chroot into the target directory, install the packages then leave the chroot and pack and install as above. I have two scripts 'xbmcchroot' and 'xbmcumount' to chroot into the target and to unmount the relevant filesystems on leaving the chroot. They look like this:

xbmcchroot:

Code:
#!/bin/bash
echo 'chrooting into xbmc target'
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 chroot /var/lib/xbmc-diskless/target

xbmcumount

Code:
echo 'unmounting chroot filesystems'
sudo umount /var/lib/xbmc-diskless/target/dev/pts
sudo umount /var/lib/xbmc-diskless/target/dev
sudo umount /var/lib/xbmc-diskless/target/proc
sudo umount /var/lib/xbmc-diskless/target/sys

So to install packages I do:

Code:
./xbmcchroot
apt-get install [packages]
exit
./xbmcumount
sudo xbmc-diskless.sh

Select 'pack' then 'install' then you're done.


- ToKy - 2011-03-27

Thanks for the prompt reply! I will try this once I've "normalized" my network, got too many things running in multiple places AND i'm about to setup openfiller to help me with disk-space and central sharing.


[FIXED] Foxconn NT-330i working! - Wag3Slav3 - 2011-03-29

To get this to work I had to do an install using maverick instead of lucid.

Run the script as usual, after it fails giving a goofy error about a repository go into the target dir.

Modify this file
/target/usr/share/initramfs-tools/hooks/xbmc_diskless

change this line
copy_exec /usr/sbin/ethtool /sbin

to read
copy_exec /sbin/ethtool /sbin

Then run the upgrade step, it should repair the initramfs.

You now have a working image with maverick, with has a working atl1c.ko module for the Foxconn NT-330i!

dushmaniac: You might want to make a change to your xbmc_diskless package to verify the location of ethtool for that hook.


static Wrote:I have a Foxconn NT-330i flashed with the latest BIOS. I followed your instructions on the first page and I end up with a kernel panic:

Code:
Begin: Running /scripts/nfs-top ...
Done.
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-21-generic #32-Ubuntu
Call Trace:
? printk+0x1d/0x23
panix+0x48/0xf3
forget_original_parent+0x2bd/0x2c0
exit_notify+0x13/0x170
do_exit+0x181/0x310
do_group_exit+0x3e/0xa0
sys_exit_group+0x18/0x20
syscall_call+0x7/0xb

(I left out the boot timestamps and the leading hex offsets from the trace. The Kernel panic - line was at 2.847896)

I chrooted to the install and tried to dist-upgrade, but it found no updates. I tried running the xbmc-headless.sh install with both the team-xbmc repo and your PVR repo.

Is there a more recent version I can pull down besides what is in your repository? Do you think I should just try installing a different kernel?



EDIT: This looks like it may be relevant. Would it make sense for me to have to include that driver? If I were to do this, can I just chroot in, modify the modules file and initramfs?

http://forum.linuxmce.org/index.php?topic=9578.msg75035#msg75035



- opdenkamp - 2011-03-29

I'll fix it as soon as I got time. You could also send me a pull request for this on github.

thanks


- Wag3Slav3 - 2011-03-30

If your changes are all within the /home/xbmc or /etc/ directories what I would suggest you do is set up one the way you want it, then compress the /overlay/[macaddress] folder into the default.tgz provision file.

Anything else that needs to be done you would have to do under the chroot /target/ folder and re-squash the image. The changes made to the /target/ files will not be client specific, they will be made to all. Only the changes to /overlay/ are client specific.

I don't think there is anything you can do for the nvidia card outside of the newest drivers and some /etc/X11/ config file tweaks so you'd be covered by the provisioning.

ToKy Wrote:How can I edit the image that gets loaded every time?
Is the only/best way to go about this is to create the provisioning part?

I want to load the same image to all my xbmc clients and would like to include all the config files I have already created in my current setup (with disk). So it uses my nvidia onboard card to its full potential and so I can use different themes other than the default one.

Currently testing on a Zotac Zbox HD-ID11 w/ 4GB of RAM

Thanks for this great setup ;-)



- ToKy - 2011-03-31

So, I created a new VBox and installed Maverick, installed the diskless-xbmc package, everything seemed fine... BUT its not populating the /var/lib/tftpboot path.

Its leaving the initrd and the vmlinuz files there instead of xbmc-netboot and its not creating the pxeboot file either..

This is the content of /var/lib/tftpboot :

Code:
toky@xbmcMaster:/var/lib/tftpboot$ ls
initrd.img  ltsp  vmlinuz  xbmc-netboot

I've removed the diskless package and reinstalled it but I keep getting the same output...not enough files.


#####Update#####
I thought I had found the problem, most of the entries in /etc/default/xbmc-diskless-server.conf but it didn't make a difference after uncommenting them.

Ideas?


- opdenkamp - 2011-03-31

what's the output of "xbmc-diskless.sh check"?
are you using a 64 bit server?

I know others had problems with this too and posted the solution in this thread. Just can't find it now Smile


- ToKy - 2011-03-31

Everything seems fine when I run the check.
System is not x64.

I saw messages about vmlinuz and initrd files being 1directory higher and that was the case for me too but I don't remember reading about the pxeboot directory not being created at all.


- MegaX - 2011-04-01

Hello

Sorry for my english, its not so good.
I install xbmc-diskless-server on Ubuntu 10.04 and create an image by select lucid, xbmc-pvr (ppa: opdenkamp), no packages and password.
Then follow ivanmacx instruction to install my ATI HD4200 (driver is fglrx 8.732):
ivanmacx Wrote:...
xbmcchroot:

Code:
#!/bin/bash
echo 'chrooting into xbmc target'
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 chroot /var/lib/xbmc-diskless/target

xbmcumount

Code:
echo 'unmounting chroot filesystems'
sudo umount /var/lib/xbmc-diskless/target/dev/pts
sudo umount /var/lib/xbmc-diskless/target/dev
sudo umount /var/lib/xbmc-diskless/target/proc
sudo umount /var/lib/xbmc-diskless/target/sys

So to install packages I do:

Code:
./xbmcchroot
apt-get install [packages]
exit
./xbmcumount
sudo xbmc-diskless.sh

Select 'pack' then 'install' then you're done.


At next I pack and install my image, boot from network and xbmc starts.
Then I go to System Info and see HD 4200 and OpenGL is installed.
When reboot xbmc a get an error message:

"XBMC needs hardware accelerated OpenGL rendering.
Install an appropirate graphic driver"


My xorg.conf:
Code:
Section "ServerLayout"
    Identifier     "aticonfig Layout"
    Screen      0  "aticonfig-Screen[0]-0" 0 0
EndSection

Section "Files"
EndSection

Section "Module"
EndSection

Section "Monitor"
    Identifier   "aticonfig-Monitor[0]-0"
    Option        "VendorName" "ATI Proprietary Driver"
    Option        "ModelName" "Generic Autodetecting Monitor"
    Option        "DPMS" "true"
EndSection

Section "Device"
    Identifier  "aticonfig-Device[0]-0"
    Driver      "fglrx"
    Option        "Capabilities" "0x00000800"
    BusID       "PCI:1:5:0"
EndSection

Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    Monitor    "aticonfig-Monitor[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

I dont no what I must do and hope anyone can help me that my ATI HD4200 works in xbmc-diskless.


- opdenkamp - 2011-04-01

@ToKy
think the pxe stuff is part of the syslinux package. not entirely sure and I can't check it right now. try installing that package.

@MegaX
try removing the nvidia-glx package(s).