Justin Latimer


OpenELEC SSH Issues

Have you found you can't connect to your Raspberry Pi running OpenELEC even though SSH is enabled? This happened to me, so I thought I'd write down what happened in case anyone else does the same thing. It actually took me quite a while to work out.

Around the time of the first release of Kodi, I was running OpenELEC 4.2.1 on my Raspberry Pi. I use USB drive for storage to speed things up because I have an average SD card. Unfortunately I forgot to turn of auto updates for add ons, and some of them auto updated to Kodi versions and broke. Rollback didn't work. So when OpenELEC 5.0 was released, I thought I'd do a fresh install. I formatted my SD and USB and imaged them. But even though I could successfully go through the OpenELEC installer, I couldn't connect over SSH!

Turns out when I formatted the USB, I accidently formatted it FAT32 instead of ext4. This meant that the SSH process couldn't create the key files because FAT32 doesn't support the right permissions model. It took me a while to figure this out, especially without being able to SSH in... Luckily OpenELEC makes log files accessible via Samba if you enable that. Once I formatted the USB drive ext4, everything worked perfectly!


Raspbmc to OpenELEC

Last night my Raspbmc setup hung while opening a movie. I cycled the power, and I guess that corrupted the memory card. When it booted, it got stuck in an infinite loop trying to start XBMC. You know, the infamous "Relax..." screen. Well, yeah, I was trying to relax and watch a movie, but ended up rebuilding my media center instead. I tried all the usual tricks to fix a XBMC reboot loop:

  • Reboot without network plugged in.
  • SSH in and remove the ~/.xbmc folder.
  • Desperately try removing the ~/.xbmc-current symlink.
  • Try and edit /scripts/xbmc-watchdog.sh to actually write logs somewhere, which doesn't work.
  • Throw raspberry pi out window.

Once I had resigned myself to rebuilding the image, I decided to switch to OpenELEC. A couple of hours later, everything was up and running. I have my library running on a MySQL server and all my media accessed via SMB, so once I copied the right XML files over everything was just like I left it.

Installing tvheadend was a bit different from Raspbmc. OpenELEC doesnt come with it preinstalled, but it includes an add-on system that shows up in the XBMC menus. So all you've gotta do is pick the package and go. It was really easy, much easier than I expected.