[GUIDE] - PXE Boot OpenELEC in a KVM VM


Recommended Posts

Not sure what I am missing here. NO

 

TFTP folder:

root@Tower:/mnt/user/TFTP# ls
ldlinux.c32  openelec/  pxelinux.0  pxelinux.cfg/
root@Tower:/mnt/user/TFTP# cd openelec/
root@Tower:/mnt/user/TFTP/openelec# ls
KERNEL  SYSTEM

 

01-00-00-00-15-15-15 (inside pxelinux.cfg):

DEFAULT OpenElec.tv
PROMPT 0

LABEL OpenElec.tv
       KERNEL openelec/KERNEL
       APPEND ip=dhcp boot=NFS=192.168.1.104:/mnt/user/TFTP/openelec disk=NFS=192.168.1.104:/mnt/user/VMs/OE ssh

 

Exports:

root@Tower:/mnt/user/vms# cat /etc/exports
# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.

"/mnt/cache" -async,no_subtree_check,fsid=10 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Albums" -async,no_subtree_check,fsid=100 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Fitness" -async,no_subtree_check,fsid=101 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Movies" -async,no_subtree_check,fsid=102 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Music Videos" -async,no_subtree_check,fsid=103 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Pictures" -async,no_subtree_check,fsid=104 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/Software" -async,no_subtree_check,fsid=105 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/TFTP" -async,no_subtree_check,fsid=110 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/VMs" -async,no_subtree_check,fsid=111 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/docker_configs" -async,no_subtree_check,fsid=109 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/torrents" -async,no_subtree_check,fsid=108 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/tvshows" -async,no_subtree_check,fsid=106 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/vms" -async,no_subtree_check,fsid=111 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/xbmc_stuff" -async,no_subtree_check,fsid=107 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)

 

I am using the TFTP Plugin with the path "/mnt/cache/TFTP/"

 

Link to comment

@johnodon, here are the answers to your questions (TFTP settings please see the attached screen shot).

NFS is enabled in general (settings/NFS) and update as well as the VM share is cache-only.

root@Tower2:~# cat /etc/exports
"/mnt/cache" -async,no_subtree_check,fsid=10 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/REC" -async,no_subtree_check,fsid=103 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/appdata" -async,no_subtree_check,fsid=104 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)
"/mnt/user/backup" -async,no_subtree_check,fsid=101 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash)

I can access all the required shares via NFS from my Mac.

Link to comment

@Johndon, thanks for checking with sparkly if he could add dnsmasq into his TFTP Docker.

 

I have implemented the package (the 64bit version is here: http://packages.slackware.com/?r=slackware64-current&p=dnsmasq-2.72-x86_64-1.txz). Message:

Starting dnsmasq:  /usr/sbin/dnsmasq
dnsmasq: failed to create listening socket for port 69: Address already in use

 

I changed the TFTP port (see screen shot) and restarted dnsmasq:

Starting dnsmasq:  /usr/sbin/dnsmasq

openElec was booting fine.

 

You might have mentioned it but can I shorten the start of openElec? ("A start jobs running ....." needs 1 1/2min).

 

TV via MythTV is running now !!!  :D :D :D :D

Link to comment

Thanks johnodon. Teh startup screen look like the fanart of Matrix, so I can't see what's going on but the start doesn't need that long any more.

 

Some minor issues to solve, e.g. dnsmasq isn't starting via boot. This is what I'm having in my go file:

# dnsmasq for PXE Boot
installpkg /boot/custom/dnsmasq-2.72-x86_64-1.txz
cp /boot/custom/dnsmasq.conf /etc
chmod +x /etc/rc.d/rc.dnsmasq
/etc/rc.d/rc.dnsmasq start

 

That does' work....I always have the enter the command manually:

root@Tower2:/boot/config# /etc/rc.d/rc.dnsmasq start
Starting dnsmasq:  /usr/sbin/dnsmasq

 

Additionally my server completely crashed after coming back from S3 sleep. Anyhow, that's a great start. Thanks to you, sparkly and grumpy....

Link to comment

If anybody is interested in a docker container that provides proxy pxe booting and tftp services purely from dnsmasq (so ideal if you can't change the appropriate settings on your router), I spent some time yesterday getting it setup. I used sparklyballs tftp docker file as a base.

 

You can grab it by cloning from my github https://github.com/butlerpeter/dnsmasq-docker

 

The README.md file has the command line that I use to run it. Couple of things to be aware of:

 

Two volumes are mapped - /config is where the dnsmasq configuration file gets stored and /tftpboot is the path to the tftp folder.

When running pass an environment variable called HOST_ADDRESS which is set to the ip of your server (e.g. -e HOST_ADDRESS=192.168.0.10)

 

You should be able to drop this in as a replacement for the tftp server section in johnodons guide

 

I created it mainly for my own use but am happy to share. If anybody wants to "unraid-ify" it - creating docker manager templates and all of that please feel free as I have no idea how all of that hangs together as yet.

 

Link to comment

If anybody is interested in a docker container that provides proxy pxe booting and tftp services purely from dnsmasq (so ideal if you can't change the appropriate settings on your router), I spent some time yesterday getting it setup. I used sparklyballs tftp docker file as a base.

 

You can grab it by cloning from my github https://github.com/butlerpeter/dnsmasq-docker

 

The README.md file has the command line that I use to run it. Couple of things to be aware of:

 

Two volumes are mapped - /config is where the dnsmasq configuration file gets stored and /tftpboot is the path to the tftp folder.

When running pass an environment variable called HOST_ADDRESS which is set to the ip of your server (e.g. -e HOST_ADDRESS=192.168.0.10)

 

You should be able to drop this in as a replacement for the tftp server section in johnodons guide

 

I created it mainly for my own use but am happy to share. If anybody wants to "unraid-ify" it - creating docker manager templates and all of that please feel free as I have no idea how all of that hangs together as yet.

 

if you haven't already, get a docker hub account and then use my template repo as a template for your own repo...

https://github.com/sparklyballs/docker-repo

make a support thread announcing your repo....

 

 

Link to comment

If anybody is interested in a docker container that provides proxy pxe booting and tftp services purely from dnsmasq (so ideal if you can't change the appropriate settings on your router), I spent some time yesterday getting it setup. I used sparklyballs tftp docker file as a base.

 

You can grab it by cloning from my github https://github.com/butlerpeter/dnsmasq-docker

 

The README.md file has the command line that I use to run it. Couple of things to be aware of:

 

Two volumes are mapped - /config is where the dnsmasq configuration file gets stored and /tftpboot is the path to the tftp folder.

When running pass an environment variable called HOST_ADDRESS which is set to the ip of your server (e.g. -e HOST_ADDRESS=192.168.0.10)

 

You should be able to drop this in as a replacement for the tftp server section in johnodons guide

 

I created it mainly for my own use but am happy to share. If anybody wants to "unraid-ify" it - creating docker manager templates and all of that please feel free as I have no idea how all of that hangs together as yet.

 

Thanks. This worked perfectly!

Link to comment
  • 4 weeks later...

I've got PXE / TFTP working. I can PXE boot to OpenELEC. But I cannot get the video GPU pass-through working with an Nvidia GT 730.

 

I know PXE is working b/c if I boot to VNC I watch the boot process although there is a video compatibility error which I assume is b/c of VNC. But it does boot. If I boot to the NVIDIA GeForce GT 730, I get no display not even during the PXE boot process but it will boot and I can eventually SSH into the OpenELEC.

 

It's strange because I can video pass-through working via an Ubuntu 15.04 VM. So the video card seems compatible with GPU pass-through. The motherboard/CPU must also be compatible because it works on other VMs. Others said they had OE working with the GT 730 (which is why I chose it).  But I cannot get video through OpenELEC. I tried both the SeaBIOS & OVFM. I've compared the xlm to johnodon's xml and don't see any major differences.

 

Any suggestions?

openelec-vm.txt

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.