Need Help: PXE Booting OpenELEC from unRAID


Recommended Posts

In my case, I rsync one of the music drives to the local htpc. This way, I can always play music if I choose.  unRAID is redundant, , but it's not a real backup.  It affords me a second copy of the data should a disaster occur.  Speaking from experience. This saved much of my music collection.

 

This is why I like to have 2 servers. :)

 

 

I have two as well... I'm still paranoid about my music collection! Gotta have tunes and gotta be ready to run out and spin some tunes should someone need a dj!

Link to comment
  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I think it definitely would have to be a plugin to stop the issue where the array can't shut down due to open files/processes from tftp

 

Clearly this will be a requirement for me long term. Hanging unRAID for reboot is painful.

 

I've never been aware of the unRAID shutdown hanging, even when watching a Movie ... and believe me, with an average of one power outage a day (it was out for almost 3 hours yesterday), it would have caused me major headaches.

Link to comment

it looks like the gods have pushed me into a decision :-), my zotac id41 ssd failed last night, how is that for freaky, of all the nights to fail just after i was posting about pxe!. ok so i spent the rest of the night playing with dnsmaaq, different versions of pxelinux and all sorts of linux goodies :-).

 

it looks like im close to having it boot up, im having the exact same issue as johnodon, in that it cannot mount the nfs share to read the SYSTEM file and thus halts, im doing my testing using vmware player, so looking at johnodon resolution it could be just vmware tripping me up, we shall see tonight when i boot up my zotac box.

 

in the meantime i have come up with a neat way of potentially switching openelec builds and thought i would share, my idea being that i can have my "live" version i.e. my main machine runs this most of the time, and then a "test" build which can run beta/rc releases of openelec should i want to take a little look at the latest bits and pieces. i can switch between live and test at boot time via the pxe menu so it would mean minimal config hacking, only additional headache is refreshing the KERNEL and SYSTEM files when there is a new beta/rc.

 

still reading or fallen asleep? :-), ok so onto the way i have structured this:-

 

contents of file dnsmasq.conf:-

 

port=0
log-dhcp
enable-tftp
tftp-root=/mnt/cache/.Apps/PXE/TFTP
dhcp-boot=pxelinux.0
dhcp-range=192.168.1.0,proxy
pxe-prompt="Press F8 for Menu",5
pxe-service=x86PC, "OpenELEC Lounge (live)", lounge/live/pxelinux
pxe-service=x86PC, "OpenELEC Lounge (test)", lounge/test/pxelinux

 

so all this does it give you the two boot options, the important bit is the section after the label, this tells it the path to the pxelinux.0 file and thus the path to the pxelinux.cfg folder and file which then importantly tells tftp which files to boot and where to store openelec, so my directory structure for the root of my TFTP folder looks like this:-

 

- lounge

-- live

--- pxelinux.cfg

--- openelec

---- storage

 

- lounge

-- test

--- pxelinux.cfg

--- openelec

---- storage

 

so thats pretty much it, like i said at the start im having issues mounting so this is unproven as of yet, but im fairly confident this should work as  tftp is able to read my config file in the pxelinux.cfg folder, any questions let me know.

 

oh yes btw, if your trying to use pxelinux 5.01 then you will need both the pxelinux.0 file AND ldlinux.c32 in order to successfully boot, also if your using your cache drive dont forget to switch export to yes for your cache drive like i did! :-)

Link to comment

i've been trying to get this working. but it stops at *** Error in mount_flash... Could not mount 10.0.0.10:/mnt/cache/apps/tftp/openelec  ***

 

Not sure where to go now. i have checked the file and folder permissions and they seem fine. any ideas?

 

log-dhcp
enable-tftp
tftp-root=/mnt/cache/apps/tftp
domain-needed
bogus-priv
local=/local/
dhcp-range=10.0.0.50,10.0.0.99,12h
dhcp-option=option:router,10.0.0.1
dhcp-option=option:dns-server,10.0.0.10,8.8.8.8
dhcp-leasefile=/boot/packages/dnsmasq/dnsmasq.leases
dhcp-authoritative
local-ttl=60
dhcp-host=6C:F0:49:EF:30:04,10.0.0.20
dhcp-boot=/mnt/cache/apps/tftp/pxelinux.0,tower,10.0.0.10

 

DEFAULT OpenElec.tv
PROMPT 0

LABEL OpenElec.tv
       KERNEL openelec/KERNEL
       APPEND ip=dhcp boot=NFS=10.0.0.10:/mnt/apps/tftp/openelec disk=NFS=10.0.0.10:/mnt/apps/tftp/openelec/storage/ overlay

 

Cheers James

Link to comment

i've been trying to get this working. but it stops at *** Error in mount_flash... Could not mount 10.0.0.10:/mnt/cache/apps/tftp/openelec  ***

 

Not sure where to go now. i have checked the file and folder permissions and they seem fine. any ideas?

 

log-dhcp
enable-tftp
tftp-root=/mnt/cache/apps/tftp <----------------------
domain-needed
bogus-priv
local=/local/
dhcp-range=10.0.0.50,10.0.0.99,12h
dhcp-option=option:router,10.0.0.1
dhcp-option=option:dns-server,10.0.0.10,8.8.8.8
dhcp-leasefile=/boot/packages/dnsmasq/dnsmasq.leases
dhcp-authoritative
local-ttl=60
dhcp-host=6C:F0:49:EF:30:04,10.0.0.20
dhcp-boot=/mnt/cache/apps/tftp/pxelinux.0,tower,10.0.0.10

 

DEFAULT OpenElec.tv
PROMPT 0

LABEL OpenElec.tv
       KERNEL openelec/KERNEL
       APPEND ip=dhcp boot=NFS=10.0.0.10: ---------------> /mnt/apps/tftp/openelec disk=NFS=10.0.0.10:/mnt/apps/tftp/openelec/storage/ <------------- overlay

 

Cheers James

 

I've pointed it out above in your dnsmasq.conf file you have /mnt/cache/apps/... as your tftp root, and in your pxelinux.cfg file your trying to mount /mnt/apps/...

 

You can try that and see if it solves it.

Link to comment

hi pimp, firstly i think hooger has def hit the nail on the head regards your issue, i had a look at your dnsmasq.conf and it looks a heck of a lot more complex than mine (working), looks like your specifying all your ip config in the dnsmasq.conf, which isn't incorrect, its just a different way of doing it, here's mine incase you want to take a look:-

 

port=0
log-dhcp

#enable tftp service for dnsmasq
enable-tftp

#set root folder for tftp to serve files
tftp-root=/mnt/cache/.Apps/PXE/TFTP

#set boot file in root of tftp folder
dhcp-boot=pxelinux.0

#set dhcp range and proxy to internet router, static ip set in "default" file
dhcp-range=192.168.1.0,proxy

#set pxe menu with 5 second timeout, will default to first item
pxe-prompt="Press F8 for Menu",5

#set boot options with subfolders (from root of tftp-root) in order to boot different pxelinux.cfg/default file
pxe-service=x86PC, "OpenELEC Lounge (live)", lounge/live/pxelinux
pxe-service=x86PC, "OpenELEC Lounge (test)", lounge/test/pxelinux

 

the advantage to using the proxy method is that you dont have two dhcp servers running at the same time (assuming your router is running dhcp), i have specified the static ip, gateway, mask etc in the pxelinux.cfg/default file as shown below:-

 

DEFAULT OpenElec.tv
PROMPT 0

#ip config specified in the following format
#ip=<client-ip>:<server-ip>:<gateway>:<subnet mask>:<client-hostname>:<interface>:<configuration-method>

LABEL OpenElec.tv
       KERNEL openelec/KERNEL
       APPEND ip=192.168.1.3:192.168.1.10:192.168.1.1:255.255.255.0:openelec-lounge:eth0:none boot=NFS=192.168.1.10:/mnt/cache/.Apps/PXE/TFTP/lounge/live/openelecdisk=NFS=192.168.1.10:/mnt/cache/.Apps/PXE/TFTP/lounge/live/openelec/storage overlay quiet

 

i hope this helps somebody, btw anybody else getting the following error shown when openelec splash screen shown:-

 

chown /mnt/...../.ssh access is denied

 

i understand its trying to change owner for .ssh folder and failing, not exactly sure how/if this can be resolved

 

Link to comment

I had successfully gotten PXE booting of OE down solid, with an integrated menu that let me choose differing versions of the OE system (1.95, 2.0, 3.0.1 etc) each with their own NFS mounted "storage" volumes.

 

I also was getting the .ssh permissions change issue, as well as some other funkiness. Plugins (common.plugin.cache and weather) would crap out on me. I'd have to reboot the machine (and re-do the chmod to 755 on the "storage" mount) to get them to work.

 

After a lot of poking around on the intertubes, it seems that NFS mounting the "storage" volumes will not work 100% correctly. It has to do with permissions and such. Bummer.

Link to comment
btw anybody else getting the following error shown when openelec splash screen shown:-

 

chown /mnt/...../.ssh access is denied

 

i understand its trying to change owner for .ssh folder and failing, not exactly sure how/if this can be resolved

 

Yes, I get that every time.  I've looked into a way of removing the error message ... unsuccessfully!

However, I've not been aware of any ill-effect, so I just ignore it.

 

Plugins (common.plugin.cache and weather) would crap out on me. I'd have to reboot the machine (and re-do the chmod to 755 on the "storage" mount) to get them to work.

 

I've not encountered this.

Link to comment

hi Peterb, yeah i havent seen any ill effects either, just hate seeing errors  :D, i too concur with you peter, i havent seen any of the issues reported by tophicles, seems pretty damn stable to me, only thing i have done to prevent any funnies is prevent my cache drive from spinning down, not sure how openelec would take having the virtual os drive spun down, its probably memory resident so im being over cautious :-)

 

now started playing with moving boot options into my pxelinux.cfg/default file instead of specifying in dnsmasq.conf file, means you can then have fancy menu's for a bit more eye candy hehe, examples:-

 

http://damsteen.nl/blog/how-to-set-up-a-graphical-pxe-boot-menu-using-pxelinux-syslinux

Link to comment

I had successfully gotten PXE booting of OE down solid, with an integrated menu that let me choose differing versions of the OE system (1.95, 2.0, 3.0.1 etc) each with their own NFS mounted "storage" volumes.

 

I also was getting the .ssh permissions change issue, as well as some other funkiness. Plugins (common.plugin.cache and weather) would crap out on me. I'd have to reboot the machine (and re-do the chmod to 755 on the "storage" mount) to get them to work.

 

After a lot of poking around on the intertubes, it seems that NFS mounting the "storage" volumes will not work 100% correctly. It has to do with permissions and such. Bummer.

 

I get the same ssh error, and the only plugin I've had crap out on me is youtube.  So I just stopped using it.  Other than that openelec is very stable, and easy to fix if something does freeze or crash.  Compared to my old windows xbmc machine this is a breeze, just have to ssh in from my phone and killall xbmc if it freezes and were good to go!

Link to comment

Actually, I have not seen the SSH error since I upgraded to OE 3.02.  I'm not sure if it was the upgrade the fixed it or something else I did.

 

John

 

Hmm that's odd I have upgraded from 3.0.0 to 3.0.2 and the issue is present, must of been something you did John, would love to know what :))

 

Sent from my GT-I9300 using Tapatalk 2

 

Link to comment
I get the same ssh error, and the only plugin I've had crap out on me is youtube.  So I just stopped using it.  Other than that openelec is very stable, and easy to fix if something does freeze or crash.  Compared to my old windows xbmc machine this is a breeze, just have to ssh in from my phone and killall xbmc if it freezes and were good to go!

 

i know this is slightly off topic, but you do know there is an easier way than having to ssh in right?, you can map a key on your remote to be a "panic button" which basically kills the xbmc process and forces a restart (without rebooting the machine), thus clearing any misbehaving addons :-). i have a ms remote with the 4 coloured buttons at the bottom, one is red, so ive got this mapped to kill process on press, its extremely wife friendly, stops me having to get down a dirty with cli or hard shutdown the machine, if you want more details then pm me.

Link to comment

Reading this thread a couple of weeks ago inspired me to try PXE booting Openelec myself. Here's how I got on...

 

My XBMC machine is an Acer Revo 3700, since I've had it I've booted it from an XBMC install (Ubuntu based but not XBMCBuntu) on the internal drive. That was all fine and dandy, then I read this thread and decided to have a play.

 

For sometime I've had dnsmasq running on my unraid box - no fancy plugin or anything, just install the package and copy over a config file that I keep on my flash drive. I don't use the dhcp functionality and purely use it fot tftp and pxe booting. As well as booting Openelec I have it setup to pxe boot a couple of Linux distros and memtest - stuff like that.

 

For the pxe configuration, I have a configuration file speciifc to the MAC of my Revo, this just contains a line to include another file which is actually the meat of my Openelec boot menu. My reasoning for doing it this way is in case I ever decide to add another client machine booting the same way. I can just add a MAC specific file which includes the main file and if I need to change the Openelec boot options or whatever, I only have to do it in one place.

 

The Openelec boot menu consists of an option to boot Openelec or an option to go to the default pxe boot menu (the "pxelinux.cfg/default" such as would be seen when booting from any other machine on the network). I found a nice image of the Openelec logo and spent some time fiddling around with the various settings to get a half decent looking pxe menu. (image should be attached)

 

When tinkering with the pxe menus I found it useful to use a QEmu virtual machine, rather than keep firing up the actual hardware, which worked really well.

 

Small disclaimer - I haven't actually tried the 'pretty' boot menu on actual hardware yet, only from the virtual machine. I have however been booting openelec from a plain text boot menu with no issues.

 

Once Openelec starts to boot, it can take a little while to get going. Especially if my unraid box has been idle for a while, I guess it has to spin drives up or something before it can load the Openelec kernel/system file over NFS - I haven't looked into it too much yet. Could also be a network issue - the unraid box is connected to a gigabit switch, but the XBMC machine is in another room, on another floor connected to the gigiabit switch via 500Mbps powerline adapters.

 

When Openelec starts up I do get an error about script.common.plugin.cache failing (as also seen earlier in this thread). But that's no huge problem, although I would like to solve it if anyone has any insight?

 

Overall I haven't noticed any huge difference between pxe booting Openelec and the Ubuntu install that is on the hdd of the Revo. Probably the only difference is loading thumbnails etc.

 

On the whole I'm pretty pleased with my experiment.

 

Peter

openelec-pxe.jpg.b808b1fe17da64611c16c3ebf56b77ac.jpg

Link to comment

Peter I like your work :)) any chance of sharing your boot menu background image file and posting the contents of your pxelinux.cfg file so I can see what colors you set the fonts etc?

 

Sent from my GT-I9300 using Tapatalk 2

Sure, see attached.

 

The .png is obviously the background image.

The 01-52-... file is the MAC specific (not a real MAC, just a dummy one I use with QEmu) config which directs to...

The openelec.menu file shows the options for booting openelec or going to the default pxe menu, this file includes...

The openelec-graphics.conf file which is where I fiddled around to get the look of the menu.

 

Peter

 

Quick edit to say - ignore the ".txt" extensions on a couple of the files. I had to add those to be able to attach them to the post. Everything should be considered ".txt" free :)

openelec.png.40c2bae6d6ca5deb61a6b6fd815f2956.png

openelec.menu.txt

openelec-graphics.conf

01-52-54-00-12-34-56.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.