Page 1 of 1

PXE Conf Files by MAC Address

Posted: Sun Aug 22, 2010 1:37 pm
by jamesarbrown
Hi,

I am trying to prepare for multiple FE.

So to start
/tftpboot/PXEClient/pxelinux.cfg/01-00-40-63-ef-7e-d2

Works a treat for MAC address 00-40-63-ef-7e-d2 and MM starts to boot all ok.

But...

I was hoping to have /tftpboot/PXEClient/conf/01-00-40-63-ef-7e-d2 ie a conf directory per MAC address.

MM refuses to see the minimyth.conf file. Have tried 00-40-63-ef-7e-d2 also.

Looking at the logs it does not try alternatives to default

Code: Select all

Aug 22 12:25:38 (none) local0.info minimyth: fetching configuration file  ...
Aug 22 12:25:38 (none) local0.info minimyth: fetching 'confro:/minimyth.conf': local file will be '/etc/minimyth.d/minimyth.conf'.
Aug 22 12:25:38 (none) local0.info minimyth: fetching 'confro:/minimyth.conf': URL 'tftp://192.168.1.90/PXEClient/conf/default/minimyth.conf' not fetched (it may not exist).
Aug 22 12:25:38 (none) local0.err minimyth: 'minimyth.conf' not found.
Aug 22 12:25:38 (none) local0.info minimyth: init failed. check '/var/log/messages' for further details.
Aug 22 12:25:39 (none) daemon.info init: no more processes left in this runlevel
Aug 22 12:25:58 (none) auth.info login[401]: root login on 'pts/0'
But this link suggested it should. Is the MM or the link is inaccurate?

http://www.mythtv.org/wiki/Minimyth_Howto
Configure MiniMyth
MiniMyth will need a "conf" directory, and inside that directory you will need ether a "default" directory or a directory that is named off the mac address of you minimyth network card.
James

Re: PXE Conf Files by MAC Address

Posted: Sun Aug 22, 2010 8:25 pm
by JoeHenley
James,

Good catch! Looks like the "How_To" article is wrong/misleading. What I use (successfully) is:

/tftpboot ------- conf ------- <Client_1> ---- <conf files for Client 1>
/tftpboot ------- conf ------- <Client_2> ---- <conf files for Client 2>
/tftpboot ------- minimyth-0.21.0.53 --------- <all the minimyth files>
/tftpboot ------- pxelinux.cfg ------ 01-<Client_1_MAC_address file>
/tftpboot ------- pxelinux.cfg ------ 01-<Client_2_MAC_address file>

Joe Henley

Re: PXE Conf Files by MAC Address

Posted: Sun Aug 22, 2010 11:26 pm
by Pablo
Thank you for catching the error. Unfortunately, I do not have an account on www.myth.org/wiki (at least not one that I have documented somewhere). As a result, I am not in a position to correct the error.

As was explained by John Henley, MiniMyth expects the host name rather than MAC address in the file name. The logic is that DHCP is capable of providing the client with its host name based on information (including MAC address) provided by the client. Also, in the cases where the DHCP is not capable of priding the host name, MiniMyth allows you to provide it on the boot line using the MM_DHCP_HOST_NAME parameter.

Re: PXE Conf Files by MAC Address

Posted: Sun Aug 29, 2010 11:07 am
by jamesarbrown
Hi Pablo,

Isnt that a bit chicken or egg?

The MM_DHCP_HOST_NAME can only be set, once MM has found the minimyth.conf, but to find it, it has to have the hostname set via dhcpd server anyway?

Obviously you can not set MM_DHCP_HOST_NAME in default/minimyth.conf as it would then stick that to all FE.

Glad to say have it working now. Will look to maybe improve that article thats wrong on mythtv.

James

Re: PXE Conf Files by MAC Address

Posted: Sun Aug 29, 2010 6:16 pm
by Pablo
You can set it on the boot line.

Re: PXE Conf Files by MAC Address

Posted: Sun Aug 29, 2010 7:00 pm
by jamesarbrown
Ah ok.

Have redone the links on mythtv.org

http://www.mythtv.org/wiki/Minimyth
http://www.mythtv.org/wiki/Minimyth_Howto

Only thing that needs polishing off is howto implement libdvdcss.... have not done that in a while as garchive pulls it in and don't think MM_SCRIPT is supported anymore.... brain cells stretched even remembering that much..

Any volunteers to add that content appreciated.

James

Re: PXE Conf Files by MAC Address

Posted: Mon Aug 30, 2010 3:02 pm
by JoeHenley
James,

Maybe not what you're looking for, but I just copied it to
/tftpboot/..../rootfs-ro/usr/lib/libdvdcss.so.2

That was all I did, and it works fine.

Joe Henley

Re: PXE Conf Files by MAC Address

Posted: Wed Sep 15, 2010 4:29 am
by Pablo
There are multiple possible ways to handle it.

One is to create an extras.sfs (or extras.tar.bz2), put it in the read only MiniMyth configuration directory, and set MM_EXTRAS_URL='confro:extras.sfs' (or MM_EXTRAS_URL='confro:extras.tar.bz2'). As the extras.* filesystem/tarball is mounted as '/usr/local', libdvdcss.so.2 needs to be in the sub-directory lib in the filesystem/tarball.

The other is to use minimyth.pm (the replacement for minimyth.script) to copy the libdvdcss.so.2 shared library from the MiniMyth read only configuration directory to /usr/lib. There are examples of how to use minimyth.pm to copy files in the example minimyth.pm. Fetching and running of minimyth.pm is enabled by setting MM_MINIMYTH_FETCH_MINIMYTH_PM='yes'.