Author Topic: Diskless Media Directors on a 1 NIC Core, is that possible?  (Read 6592 times)

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Diskless Media Directors on a 1 NIC Core, is that possible?
« on: March 09, 2008, 10:19:12 pm »
Does LinuxMCE support diskless MD's when configured to use only 1 NIC and be the DHCP server?

My very old Compaq supports PXE booting. It just kept trying to load different ranges of the same thing.

A new AMD 4200+ system stalled and then fell back to HD. (yes a slight contradiction of terms. The drive is only a 40 GB test drive but can be utilized the MD. I'm just 'seeing if it works')

My Dell Latitude D600 Notebook... talks about PXE booting when you select internal NIC from the temp boot menu. it eventually times out and falls back to a HD boot.

Nobody answered one of my posts about the dhcp config.

It talks about "next-server 192.168.0.2"

and I asked if that was correct (that's the IP # of the core) or should it be changed to the regular IP pool? I changed it to the first IP of the pool. No idea if that is correct.


1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #1 on: March 09, 2008, 11:03:14 pm »
A one NIC core works fine as long as you are using the default settings that LMCE setup. You will need to set the external address to static and point it at the router. Otherwise strange things could happen. Also you must disable the DHCP in the external router or the PXE will never work.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #2 on: March 09, 2008, 11:11:28 pm »
A one NIC core works fine as long as you are using the default settings that LMCE setup. You will need to set the external address to static and point it at the router. Otherwise strange things could happen. Also you must disable the DHCP in the external router or the PXE will never work.

 I set up both network cards in the admin to 192.168.0.2 yada yada.

 I disabled the DHCP server in my LinkSys router.

 I tried to boot 3 machines via network today. Nothing.

 Sorry, but MythTV is looking better all the time. I'm downloading the ISO now and will set it up on yet another test machine before wiping LinuxMCE with my ass.
« Last Edit: March 10, 2008, 12:02:59 am by freymann »

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #3 on: March 10, 2008, 12:11:33 am »
You changed the default settings. The external needs to be in the range that the router supports DHCP off. The internal needs to be  192.168.80.1 and the DHCP needs to be on. The default will work fine except for setting the external IP to talk to the router. If both the internal and external are the same it won't work.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #4 on: March 10, 2008, 12:26:44 am »
You changed the default settings. The external needs to be in the range that the router supports DHCP off. The internal needs to be  192.168.80.1 and the DHCP needs to be on. The default will work fine except for setting the external IP to talk to the router. If both the internal and external are the same it won't work.

 Yes, but I followed the instructions given in "Single NIC & Existing DHCPd" which I can't locate the link for, because I guess, I hate this wiki system.

 I printed that page out and as far as I can figure, both nics are to given the same IP.

 I have a linksys router, 192.168.0.1

 I said, I disabled the DHCP server in it.

 I set both nic specs in admin to 192.168.0.2 as instructed...

 And the DHCP server is active in LinuxMCE.

 My wireless and networked computers that need DHCP work OK.

 I've asked about the wording in /etc/dhcp3/dhcpd.conf but nobody has responded.

 I'm beginning to feel if you want to run LinuxMCE, you either have to be part of the development team or part of the "gang" or else you're screwed. The documentation is terrible, the forum support is not that great, and you get "yeah it works" or "no it doesn't work" answers instead of "instructions" that people can read and follow, or worse, you get pointed to several variations that do different things but claim the same result and nothing works.

 I'm no dummy, but after 4 days of struggling (and hey, I have made great progress to date) with LinuxMCE, my views about it are rather dim right now.

 Search my posts. I've made it a point to document my experiences in the hopes of helping the "team" or "gang" follow along. I've asked decent questions and I've provided (what I think) are good details.

 I spent the entire day today just trying to figure out how to make my remote change the channel on my Bell Dish Receiver with no luck. No setup should take an entire day just to configure a remote!

 So I gave up on that, thought I'd see if a MD would boot up. 3 machines. Nada.

 That "demo video" should be taken down and destroyed. It's completely mis-leading.

 Sure, if you gave me all the equipment that he had I could do the same thing. Try building it yourself? and you're s-o-l, unless you're "in the club"

 Yeah, I'm steamed, 'cause I spent 4 days friggin with the stuff. Believing the "demo video" I went out and spend $300-$400 on equipment to make media directors, get gyro mouses, video capture cards, IRD transceivers and remote, and gave up my ubuntu workstation to act as the core.

 Impressed? Not.


1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #5 on: March 10, 2008, 02:00:28 am »
I'm really sorry that someones effort to use the system in a non-standard way lead you down this path. I know that its frustrating when this happens. I have been going in circles for weeks sorting out Alsa with tons of misleading info on the web.

I'm using your exact setup and have back to before 1.1.

Here is how I have it and have recommended to many for the last year:

1) enable DHCP server (so LMCE passes out IP addresses and can host PXE boot)
2) Range for Pluto devices 192.168.80.2 to 192.168.80.129 (the devices that LMCE interacts with. PXE boot devices will be in this range. It needs to be in the same range as the internal IP.))
3) Range for non-pluto devices 192.168.80.130 to 192.168.80.256 (Non LMCE devices like desktop computers)
4) Use a static IP address (with DHCP off on the router there is no other way to get an address)
5) ip 192.168.0.2 (in the same range as the router)
6) subnet mask 255.255.255.0
7) gateway 192.168.0.1 (Router's IP address)
8) dns 192.168.0.1 (DNS server. You can use Opendns here and it may speed things up. Or at the router itself.)
9) internal ip 192.168.80.1
10) subnet mask 255.255.255.0

update and reload the router. If the PXE targets already started to boot they may have IP's in the table outside the range that the system will support so it won't hand out boot images. That may take a bit of snooping to untangle. This is why I don't recommend changing anything that isn't necessary. The Static IP change above should be all that is necessary on a clean DVD install. There are many interlocking scripts to make the system run and when one gets disconnected the machine can jam up tight. Like a very complex Swiss watch.

I hope this helps.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #6 on: March 10, 2008, 02:29:38 am »
I'm really sorry that someones effort to use the system in a non-standard way lead you down this path. I know that its frustrating when this happens. I have been going in circles for weeks sorting out Alsa with tons of misleading info on the web.

I appreciate your response, especially after my last rant. However, your response is like "tease". It gives me a "hint"

So here's what I did (with failed results again of course).

First, let's talk about the "admin" page

http://192.168.0.2/pluto-admin/index.php

I go there, click on Advanced > Network > Network Settings.

This is what I have:

EXTERNAL_IFACE     eth0
EXTERNAL_MAC    00:04:4B:06:F4:9A
EXTERNAL_IP    192.168.0.2
EXTERNAL_NETMASK    255.255.255.0
EXTERNAL_DHCP    0
INTERNAL_IFACE    eth0:0
INTERNAL_MAC    00:04:4B:06:F4:9A
INTERNAL_IP    192.168.0.2
INTERNAL_NETMASK    255.255.255.0
GATEWAY    192.168.0.1
DNS1    192.168.0.1
DNS2    207.164.234.193

DHCP server on Core:
   Enable DHCP server (checked)
     Range of IP addresses for Pluto devices: 192.168.80.2 - 192.168.80.129
     Provide IP addresses for anonymous devices not in Pluto's database.
             Range of IP addresses for non-Pluto devices: 192.168.80.130 - 192.168.80.254
Number of network adapters: 1

Your core has the following network adapters:
1. External network card eth0
Obtain an IP address from DHCP
Use a static IP address
     Core's IP address:    192.168.0.2
     Subnet mask:    255.255.255.0
     Gateway:    192.168.0.1
     Nameserver (DNS) #1:    207.164.234.193
     Nameserver (DNS) #2:    192.168.0.1
2. Internal network card eth0:0
     IP address:    192.168.0.2
     Subnet mask:    255.255.255.0
   OfflineMode (unchecked)

I'm "guessing" the internal network should be 192.168.80.1?

Then, in  /etc/dhcp3/dhcpd.conf

--start---
option domain-name-servers 192.168.0.1;
authoritative;

option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
(other lines omitted)
subnet 192.168.80.0 netmask 255.255.255.0 {
        next-server 192.168.0.2;
        filename "/tftpboot/pxelinux.0";
        option pxelinux.reboottime = 30;

        default-lease-time 86400;
        max-lease-time 604800;
        pool {
                 allow unknown-clients;
                 range 192.168.80.130 192.168.80.254;
        }
}

# PXE booting machines
group {
        next-server 192.168.0.2;
        filename "/tftpboot/pxelinux.0";
        option pxelinux.reboottime = 30;

}
# regular machines
group {
}
----end---

From your perspective, what needs to be corrected?

After Edit:

I did update the ip on the core for the internal IP address to 192.168.80.1

reload, etc..

Hmmm. One of my test machines actually booted off the network! I've been through the A/V wizard and I'm waiting for it to finish.

Odd, she comes up and I get if you can see and hear me, but then it freezes and no mouse/keyboard.

Hard Reset #1.

Then the core talks about a device being added but something needs to be downloaded from the net.

The core screensaver (flickr) images can't be seen, the background is all gray, and the boxes around your options are "empty" so going by memory, I tell the core to reload and I power off the MD.

The core now has a grey screen/background and I can see the network lights blinking... beats me what's going on. I'll let the core do its thing for a while. Since it's now 11pm ET, I think I'll go to bed, let the core do whatever it's doing, and see what's happening in the morning.

My MythUbuntu iso image is here and I've burned it to a CD. If nothing happens in the morning, I'll load MythTV on the "MD" box I was just trying to play with and see what happens.





« Last Edit: March 10, 2008, 04:06:08 am by freymann »

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #7 on: March 10, 2008, 05:11:01 am »
At the risk of sounding like Microsoft, going outside of the supported configurations can be difficult to sort out.

All of the settings are database driven and "sometimes" manual edits get over written. Not always.

What I would do in your position would be to do a clean re-install from the DVD. When it gets past the first orbiter rebilt I would go to advanced-computing from the UI and select the web configuration screen. There I would set the static IP of the external interface and turn of DHCP for the external interface and the network stuff should be done. no need to fiddle again.

Its possible that the changes have disconnected the UI from the MD, a mess I have been in before. My fix was to start over. While time consuming you don't need to watch and it will announce when its done.
               
Actually with so many interlocking settings you may be troubleshooting for a week.

freymann

  • Douchebag
  • Guru
  • *
  • Posts: 380
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #8 on: March 10, 2008, 01:06:08 pm »
At the risk of sounding like Microsoft, going outside of the supported configurations can be difficult to sort out.

What's surprising to me the Wiki gave explicit directions on how to set up with 1 nic and they appear to be wrong. It was those instructions I followed.

Quote
               
Actually with so many interlocking settings you may be troubleshooting for a week.

If it came down to struggling with this for yet another week, it would be gone. My wife misses me.

So at the end of last night, I had a test MD going through the setup phase, and frooze in the AV Wizard. At that time the core screen was just a big gray background, but I could see the network lights blinking so I powered off the MD and let the core do whatever it wanted all night.

This morning (MON - Day 5 of my experiment) the core is still doing whatever it is doing, so it's HARD RESET #2 (of Sun, or #1 of Mon), rebuild all orbiter screens, it's back.

Then I fire up the test MD (this is actually the machine destined for use upstairs in the living room with the other dish) and it boots up just fine into the LinuxMCE interface! Nice. I can view pictures, playback music, playback video and even watch TV. It actually works!

I think for fun I'll even try to set up my old compaq as a MD today.

I have a box of X10 home automation arriving this week. I got too excited about LinuxMCE and ordered some stuff online last week. If I knew then what I know now, I would have waited and saved my $70. But that's another challenge forthcoming (I think).

Getting a MD running is another success story. But again, something that shouldn't take a day to accomplish.

Where I'm stuck at now is getting my IR Transceiver set up to change channels on the dish receiver. The dish is our main source for TV viewing (antenna feed out here sucks). If we can't have the unit change channels it is no good.

Over at MythTV and all their distros, they talk about using the Hauppage PVR15-MCE IRD transceiver (the one that includes the usb blaster) as a piece of cake (to control the dish).

Here in LinuxMCE land? I have no idea. I did post about it yesterday, with a thorough description of what I had done and where I got lost. Will it take a week before somebody has time to drop me another 'tip'? can you? ;-)

Without your advice I'd never have gotten the MD to fire up, and I thank you for that. If I ever find the wiki page I will add a comment about setting up the network config as you have suggested.

boris

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #9 on: March 22, 2009, 08:51:51 am »
Sorry all, this post is more suitable for this http://forum.linuxmce.org/index.php?topic=6042.0 , sorry I got them mixed up .

Yes it is possible.
I just upgraded to 710 adm64 from 704 with keep settings, well that did not really work well. In retrospect I should have just done clean install.

If you planing to have only one NIC then the best thing to do, in my opinion is to disable the the second NIC on hardware level before installation. Most of motherboard have option to disable NIC in BIOS.  Also, in order to have NetBoot working you must check "Provide IP addresses for anonymous..." in network setup and provide range of for addresses for anonymous devices. If you do not, then DHCP server configuration file (/etc/dhcp3/dhcpd.con) is not generated correctly by /usr/pluto/bin/PlutoDHCP, and as result DHCP server does not re/start due to error in configuration file. If there is no rage specified for anonymous devices PlutoDHCP writes incorrect range to dhcp.conf file and sets it to 0.0.0.0-0.0.0.0.
Here what it looks like in file :
...
pool { allow unknown-clients; range 0.0.0.0 0.0.0.0;}
...

You need DHCP server in order to do netboot, aka diskless media director.

If you do not feel like reinstalling then keep reading.
1. In Advance->Configuration->Devices->CORE change "Network Interfaces" and remove everything after "|" and including  "|" (without "s), and Save changes. This will force network reconfig on reboot". Only do this step if you had previously 2 NICs and removed/disabled second NIC and the first thing after "|" is "eth1".
2. Remove everything in /etc/network/interfaces that has to do with configuring eth1 (ex.
auto eth1
iface eth1 inet static
        address 192.168.1.101
        netmask 255.255.255.0
).

3. If you disabled second NIC then check /etc/udev/rules.d/70-persistent-net.rules and remove or comment out (with #) all the lines that are not for your existing interface. To match you interface use MAC address, also make MAC address be assigned to eth0 interface in this file (ex. SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:1d:60:54:35:56", NAME="eth0").
4. Set up your network, check "Enable DHCP server" and "Provide IP addresses for anonymous devices....". And provide not over lapping ranges (ex. 192.168.1.100-192.168.1.150 and 192.168.1.151-192.168.1.170). Set static IP address for external interface, and remove IP address and Sub Net mask from second NIC.

Once you click Update your Core should reboot. After reboot you internal network card should be eth0:0, set the address and sub net mask for this interface (I used the same address for internal and external interfaces). Your Core should reboot one more time. Then go to Wizard->Devices->Media Directors and click Setup Diskless MD, pay attention to any errors after (and make user that dhcp server re/starts), it may make a while for Setup Diskless to complete. If you get no errors  and dhcp server started then your Diskless boot should work. To check if your dhcp server running run this "/etc/init.d/dhcp3-server status" without "s from command prompt.

I did all of my changes vi ssh/command prompt and directly in database using mysql so, above is the best interpretation of how to do same steps via admin web interface and ssh/command prompt. To get to command prompt press Crl+Alt+F2 and login as linuxmce user.

Here are my setting that work for me (make sure to replace MAC addresses if you try to use them):
-----/etc/default/dhcp3-server---
INTERFACES="eth0"
-------------------------------------
----/etc/dhcp3/dhcpd.conf----------
# option definitions common to all supported networks...
#option domain-name "fugue.com";
#option domain-name-servers toccata.fugue.com;
option domain-name-servers 192.168.1.101;
authoritative;

option routers 192.168.1.101;
option subnet-mask 255.255.255.0;

# lease IPs for 1 day, maximum 1 week
default-lease-time 86400;
max-lease-time 604800;

allow booting;
allow bootp;

option space pxelinux;
option pxelinux.magic code 208 = string;
option pxelinux.configfile code 209 = text;
option pxelinux.pathprefix code 210 = text;
option pxelinux.reboottime code 211 = unsigned integer 32;

subnet 192.168.1.0 netmask 255.255.255.0 {
        next-server 192.168.1.101;
        filename "/tftpboot/pxelinux.0";
        option pxelinux.reboottime = 30;

        default-lease-time 86400;
        max-lease-time 604800;
        pool {
                 allow unknown-clients;
                 range 192.168.1.231 192.168.1.250;
        }
}

# PXE booting machines
group {
        next-server 192.168.1.101;
        filename "/tftpboot/pxelinux.0";
        option pxelinux.reboottime = 30;

        # Generic PC as MD (75)
        host moon75 { hardware ethernet 00:E0:18:A7:BD:4B; fixed-address 192.168.1.200; }
        # Generic PC as MD (98)
        host moon98 { hardware ethernet 00:1D:7D:D6:F5:F7; fixed-address 192.168.1.201; }
}

# regular machines
group {
        # CORE (1)
        host pc1 { hardware ethernet 00:1D:60:54:35:56; fixed-address 192.168.1.101; }
        # DCEROUTER - DCEROUTER (120)
        host pc2 { hardware ethernet 00:00:00:00:00:00; fixed-address 192.168.1.203; }
}
-----------------------------------

Out put from Network Config on admin site:

EXTERNAL_IFACE     eth0
EXTERNAL_MAC    00:1D:60:54:35:56
EXTERNAL_IP    192.168.1.101
EXTERNAL_NETMASK    255.255.255.0
EXTERNAL_DHCP    0
INTERNAL_IFACE    eth0:0
INTERNAL_MAC    00:1D:60:54:35:56
INTERNAL_IP    192.168.1.101
INTERNAL_NETMASK    255.255.255.0
GATEWAY    192.168.1.2
DNS1    64.59.176.13
DNS2    64.59.176.15

« Last Edit: March 22, 2009, 08:04:28 pm by boris »

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4508
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #10 on: March 22, 2009, 10:49:23 am »
Does LinuxMCE support diskless MD's when configured to use only 1 NIC and be the DHCP server?

My very old Compaq supports PXE booting. It just kept trying to load different ranges of the same thing.

A new AMD 4200+ system stalled and then fell back to HD. (yes a slight contradiction of terms. The drive is only a 40 GB test drive but can be utilized the MD. I'm just 'seeing if it works')

My Dell Latitude D600 Notebook... talks about PXE booting when you select internal NIC from the temp boot menu. it eventually times out and falls back to a HD boot.

Nobody answered one of my posts about the dhcp config.

It talks about "next-server 192.168.0.2"

and I asked if that was correct (that's the IP # of the core) or should it be changed to the regular IP pool? I changed it to the first IP of the pool. No idea if that is correct.



Ok...firstly turn off DHCP on your Broadband Router and set its LAN side address to a range other than 80.xx ie in the example below I set it to 192.168.20.1. Next install LinuxMCE-0710 from scratch with only a single NIC installed. Setup your Orbiter etc with the AVwizard as normal... Now from the Orbiters 'Computing' menu select Web Admin and go to the Advanced -> Network -> Network Settings page (see my screenshot attachment)

You'll notice that the WAN side address for the Core is 192.168.20.99 so that it is in the same range as the Broadband Router (this is critical as it is your WAN side connection) and it is not in the same range importantly as the LAN side addresses that your Core's DHCP server will hand out to devices (eg MD's, IP Cams, N800's etc etc) ie 192.168.80.xx

Make sure you select 'Use a static IP address' for the external network card eth0 and then click 'Update' at the bottom of the page. your Core will then reboot to configure the new IP setup and on reboot you are all set. No editing of conf files or other changes required. My home Core has been setup like this for years...

All the best

Andrew
Andy Herron,
Convergent Home Technologies Ltd

My Blog; http://ellipticalcurve.com

Get RaspSqueeze-CEC or Raspbmc-CEC Wifi enabled for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

For Smart Home consulting advice;
@herron on Twitter, inquiries@ellipticalcurve.com via email or PM me here.

Get a Dianemo License: http://forum.linuxmce.org/index.php?topic=8880.msg100221#msg100221
Follow us on Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

dbs

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #11 on: March 22, 2009, 07:27:03 pm »
This thread has been very helpfull. Thanks to all the patient responders. I do have a question to add to the mix.

Since I'm in the early stages of implementing LinuxMCE and I know the core will be down more than it's up, what is the best approach to keeping my existing PCs onliine while I play and configure?

Thanks

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #12 on: March 22, 2009, 11:39:59 pm »
Leave them on the external network for now, so they are not dependant on the core being up. Patch one over to the internal network whilst you are testing and back again, when done. The only other sane option is to dual home one of the PCs on both internal and external networks, but even that is not very sane!

dbs

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #13 on: March 23, 2009, 05:24:35 am »
Leave them on the external network for now, so they are not dependant on the core being up. Patch one over to the internal network whilst you are testing and back again, when done. The only other sane option is to dual home one of the PCs on both internal and external networks, but even that is not very sane!

Given that it's a single NIC core configuration, I was contemplating turning off the DHCP server on the firewall/router and assigning fixed IPs to the existing PCs as well as the LinuxMCE core itself.  I'm thinking that should keep me going with a minimum amount of fuss. Do you see a problem with this?

Thanks

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: Diskless Media Directors on a 1 NIC Core, is that possible?
« Reply #14 on: March 23, 2009, 07:19:49 am »
Yeah, you'll break it all.

Why do you people make this so difficult, really?

-Thom