Author Topic: LinuxMCE factory reset wanted  (Read 2089 times)

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
LinuxMCE factory reset wanted
« on: August 25, 2009, 09:55:43 am »
I'm having an unbelievable set of problems with the network settings so I'd like to start afresh.

My main problem is that my Hybridcore PC has an embedded wireless card and LMCE insists it is its primary interface. And NO, I can't seem to turn it off from within the BIOS.

It might not be so bad were the web admin interface not cripled. The advanced>network screen says my PC has five interfaces then only lists two of them. I tried the "swap interfaces" option and everything has gone down hill since.

Is there an installation option I can run that resets everything back to how LMCE was out of the box?

Peter

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5501
  • DOES work for LinuxMCE.
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #1 on: August 25, 2009, 10:01:40 am »
Not at this time. Sorry.

-Thom

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #2 on: August 25, 2009, 10:05:29 am »
Whoops ... just read KOOMARs note and found he is in the same part of the learning curve as myself - at the bottom and struggling.

Is there a way to reset the network settings? As I said in the original post, LMCE has it in its head that the primary interface is wlan0. SWAP INTERFACES seems unpredictable.

Peter


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #3 on: August 25, 2009, 01:28:48 pm »
do a search on udev rules.... (forum or wiki) you will find posts from me and others. You can use udev to force a particular physical interface to be a particular name....

be aware, as has been posted in other threads recently on this subject, wlan cards are NOT supported. LMCE requires eth0 to be your internet side, and eth1 to be your internal LAN side..... recently someone did some preliminary work to allow LMCE to work more generally with interfaces names such as your situation, and determine which is the internet side on its own.... however that is very ALPHA, and you should not be relying on it. At this stage using anything other than 2 physical NICs configured as eth0 and eth1 is pushing shit up hill.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #4 on: August 25, 2009, 03:48:52 pm »
As per this ticket: http://svn.linuxmce.org/trac.cgi/ticket/169

It is not possible to swap NICs other than eth0 and eth1.  There is a patch on the ticket to swap other interfaces, but it was not included in the current code (and probably will not be any time soon) because the only "officially" supported configuration is one with exactly two wired NICs.  The patch probably will have unforeseen consequences, and it is not well tested.

As colinjones says, you're kind of on your own in this space.

Kooma

  • Veteran
  • ***
  • Posts: 102
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #5 on: August 25, 2009, 08:56:44 pm »
Hey infoteksec, yep learning curve tends to become learning curse or something. I might be few steps ahead of you in this, though. In my experience, anything I do with the lmce, gets me into (relatively) big trouble. Things brake down..

NIC problem was solved by installing another network card, so I have two PCI-NICs at the moment. The motherboard one is not supported in linux(?)/might be malfunctioning, found out eventually. Other people have had problems with that particular MoBo card in Ubuntu. After days of web research, ended up to find out that the easiest solution is to get another card. And, the whole slow installation process again.

Once the DVD installation is available, life's easier with the lmce.

Overall, great expectations with the lmce. It integrates a whole lot of different systems into a working entity.. just takes a little time (years in my case).

Good luck with this!

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #6 on: August 26, 2009, 06:08:46 pm »
Thanks to one and all. I've gotten myself (is "gotten" really a word?) out of the wlan hole I dug myself by finding that wlan was provided by a mini PCI card plugged into the MoBO. Scraped some skin off in the process but unplugging the card stopped WiFi in its tracks.

I had some NICs kicking around so plugged one in. Just to be annoying, it declares itself as eth3 so it looks as though I'll have to research that udev nonsense after all - hmm. I think the port number is determined by how far the board is plugged in away from the controller.

I though I'd edit /etc/networks/interfaces and change all occurrences of wlan0 to eth3 but was annoyed to find that $sudo su didn't give me the privileges needed to edit the file. I tried to log into one of the VTs and tried logging in a me (peter) and root but I couldn't find the right password.

BTW. There seems to be some conflicting advice on the forum as to the right way for newbies to go. Some suggest the DVD approach while others suggest the 8.10 route.

I have to say I got into quite a lot of difficulty until I realised that LMCEs wiki is significantly different to wiki's LMCE entry. Perhaps the discrepancies should get fixed.

BTW: just ordered an extra 2Gb ram for my hybrid core - 512Mb really is a tad small. LMCE was taking an age to startup what with all the paging and swapping going on.

Peter







jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #7 on: August 26, 2009, 07:07:36 pm »
You're doing it all wrong... :P

First, there is no root password in Ubuntu.  This is done on purpose to keep you from completely hosing your install and for security.  The only way to perform root-privileged actions is to use sudo as a "su-do-er".  If you Log in with the user name and password you picked during installation you are a sudoer.

Do not edit /etc/networks/interfaces - it is generated by LinuxMCE.  Go to the web admin and switch your interfaces and watch what happens to all your changes.

The reason you have eth3 and not eth1 is because of the udev rules which assign such names to devices.  Search the forums and you'll see how to fix that quite easily.

The reason everything else about your network setup is busted (even if you haven't noticed yet, it is) is that all the configuration files that depend on your network adapter name are now pointing to a non-existent device.  This needs to be corrected.  Either reinstall with the current hardware setup, or take some hints from this page as to what needs to be corrected: http://wiki.linuxmce.org/index.php/Single_to_Double_NIC  You can consider "eth0:0" to be your "wlan0" for most of that.  Use your judgment - it's not a perfect process and hasn't been updated in a while.

0810 is pretty stable in my experience, and the install procedure isn't too hard.  I would suggest it over 0710, since there are quite a few new features, tons of fixes, and much better hardware support.  Everything you need to know is well documented on the alpha wiki page.  http://wiki.linuxmce.org/index.php/LinuxMCE-0810_alpha2 Of course, 0710 is still the "official" release, and it's a bit easier to install with the DVD, but it's getting a bit old so hardware support is lacking.

I'm not sure what you mean by "LMCEs wiki" being different from "wiki's LinuxMCE entry".

Yes, 512MB is not really enough.  1-2GB is more realistic.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #8 on: August 26, 2009, 09:50:06 pm »
everything jimbodude said!

To edit any file, login to any terminal (either at the console or via ssh/Putty) using your initial username/password - for earlier versions of 0710 this was linuxmce/linuxmce for later versions, it is whatever you set when it asked you during the install. Then you just need to elevate the individual command, so

sudo nano /etc/file/name or
sudo joe /etc/file/name or whatever other text editor you prefer to use - it will prompt you for your password again, its the same as the user you are logged in as again (not some "root" password, so linuxmce again probably)

udev has set eth3 because it assigns them in sequence, even if you have removed one of them... it makes the assumption that you might readd it at some stage, and want the mapping to be the same. This is a realistic assumption. All you need to do is create a single file with 2 lines of text in it in the udev rules folder forcing it to assign a particular NIC to a particular name, and its done .... or rebuild as suggested.

0710 is the simplest, fastest, official way of going... however no further development is being done on it, you will get support and advice for it, however 0810 has far better hardware support, and is the version which all the development is going on for, has lots of fixes and new features... just takes longer to install (for the immediate term) and is marginally more involved (also for the immediate term)

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #9 on: August 27, 2009, 12:01:09 am »
Thanks again to those who took the time to help me, esp Colin.

I sorta understood the "pseudo" thing. However, things did not quite behave as expected. In my dealings with ubuntu 9.whatever, I'd open up a terminal session and do the sudo su thing and get asked for my password. I provided that and expected the prompt to change from a $-form to a #-form. Well, ... it didn't which means my privileges were not elevated. Since that didn't work, I looked through the wiki and found a few standard accounts but realised I didn't know the passwords for any of them ... hence my comments.

I had realised that I should not be editing /etc/network/interfaces but the admin portal got in its head that I had 5 network devices and then short changed me by only listing two of them. Since one of the two was a wlan interface no amount of swapping or resetting was going to allow me access to eth3. - incorrect name not withstanding.

Hmmm ... don't see me rebuilding again this month as the last attempt of downloading the DVD version AND the CD of kubuntu plus LMCE extras took me close to my download limit on my broadband package.

re udev stuff. I guess there must be a rule already in place which binds my eth3 to its name. Is it not simply a case of removing the rule and letting linux recreate the entry when next I boot. Since there's already an eth0, surely it'll choose to call the NIC "eth1" then I'm home and dry ... but then again, perhaps not.

Since I've made the investment in downloading the DVD of 710, I'll have a go at installing that on another spindle - AFTER IVE INSTALLED THE EXTRA 2GB of memory. What have I got to loose?

Kindest regards to one and all for your support.

Peter


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #10 on: August 27, 2009, 12:07:47 am »
the kernel is just assigning ethX as it sees fit. use udev to override this (search the forum for my post on this process) but you do need to tidy up the interfaces first by deleting any interfaces that don't actually exist. If you only have 2 physical interfaces then ifconfig -a should only show 3 (the 2 plus loopback - lo ), any others that are subinterfaces/aliases you should be able to delete by saying sudo ifconfig eth0:1 down (for instance), then set your udev rules and reboot

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Re: LinuxMCE factory reset wanted
« Reply #11 on: August 27, 2009, 01:22:07 am »
Just figured that having
Code: [Select]
peter@dcerouter:/etc/udev/rules.d$ cat 70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x1106:0x3106 (via-rhine)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:76:a8:ab:5e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1260:0x3890 (prism54pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:60:b3:91:c4:05", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:40:f4:68:d3:f3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10ec:0x8139 (8139too)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:50:fc:fa:96:9d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x100b:0x0020 (natsemi)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:09:5b:04:19:a1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
peter@dcerouter:/etc/udev/rules.d$

... so I thought I'd use nano and get rid of / edit the offending rules, reboot and hey-presto. Not so.

Code: [Select]
peter@dcerouter:/etc/udev/rules.d$ sudo nano 70-persistent-net.rules
[sudo] password for peter: peter
Sorry, try again.
[sudo] password for peter: <blank>
Sorry, try again.
[sudo] password for peter:
Sorry, try again.
sudo: 3 incorrect password attempts
peter@dcerouter:/etc/udev/rules.d$

What gives ... the admin portal allows me to login with peter/peter !!!


totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4527
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: LinuxMCE factory reset wanted
« Reply #12 on: August 27, 2009, 02:15:36 am »

... so I thought I'd use nano and get rid of / edit the offending rules, reboot and hey-presto. Not so.

Code: [Select]
peter@dcerouter:/etc/udev/rules.d$ sudo nano 70-persistent-net.rules
[sudo] password for peter: peter
Sorry, try again.
[sudo] password for peter: <blank>
Sorry, try again.
[sudo] password for peter:
Sorry, try again.
sudo: 3 incorrect password attempts
peter@dcerouter:/etc/udev/rules.d$

What gives ... the admin portal allows me to login with peter/peter !!!

When you installed you from the DVD you were asked for a password...right at the beginning before the install actually started. That is the login you use when using 'sudo'

The peter/peter you mention is a LinuxMCE user that you created when in the SetupWizard (its probably the first user...and that first user has admin privileges)...you can choose that user from the Orbiters UI and can use it to login to WebAdmin too.

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

infoteksec

  • Regular Poster
  • **
  • Posts: 27
    • View Profile
Where, oh where, is the network hardware config stored??
« Reply #13 on: August 27, 2009, 08:46:50 am »
OK, I give up.

I've edited udev rules and got rid of all trace of wlan and a reboot correctly populated 70-persistent-lan

I've even edited /etc/networks/interfaces and replaced wlan entries with eth1 - yes, I know I should touch it but I'm desperate.

I've unplugged the wireless card - its in a box in another room  and rebooted endlessly.

AND STILL the LMCEs admin portal advanced network screen shows the inner interface being wlan.

Where the hell is the data that LMCEadmin uses to populate this screen held - there must be a cache somewhere since LMCEadmin isn't using  any reliable source I can find.

This is driving me nuts. I have a compliant network but LMCE refuses to configure it and instead relies on a stale hardware configuration.

I know I'm a bit of and old duffer, but something aint right and its not me.

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: LinuxMCE factory reset wanted
« Reply #14 on: August 27, 2009, 10:52:10 am »
If you've downloaded the DVD intstall of 710, I'd try re-installing the server. You won't be using broadband allowance and it'll give your system the chance to detect everything correctly. This will probably end up being quicker than trying to fix the broken install.

As others have said, though, 810 is the way to go, although at the moment every install is a huge download, so multiple attempts is  not for people with a limit!!
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65