Raspberry Pi and Wheezy

MrMobileWill Debian, Linux, raspberry pi, Tutorials 0 Comments

I finally decided to take the plunge and upgrade to Debian Wheezy. I have been putting it off because Squeeze works and it would involve re-configuring everything I have setup so far. At the same time, the longer I wait the more stuff there will be to setup. The great thing about re-installing: I get to do a clean install without the mistakes of figuring things out. It is also a refresher of how I got where I am now. Jump below for notes about the upgrade process.

Firstly, you should make a backup of the SD card in case you need to restore back or to check how you did something. I used win32diskimager on my Windows 7 PC to make an image of the card. Before I shutdown the Pi, I also made a file backup of my scripts and programs to restore to the new build.

I decided to go with the Adafruit build for a few reasons:

  • SSH works on first boot and it runs a keygen script
  • I2C
  • SPI
  • rpi-update/hexxeh firmware already
  • sound works by default
  • www-data group already exists
  • Much faster

You can download it here: http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/

I am not sure if this was around before but you can use raspi-config to resize the partition. It has some other options for configuring locale and timezones but they didn’t work, not sure if that is just this distro.

After I was up and running, the first thing was to change the raspberry pi user password and add an account for myself. I used the adduser command which sets up the account completely instead of useradd which doesn’t.

Before I forget, edit the sudoers file giving www-data right to run your c/python programs with root. Also add your new account you created for yourself. You can also set it up to not require password every time you use sudo, but that might not be the best idea in regards to security.

Now its time to reinstall lighttpd and PHP.

This time I used the enable mod command instead of editing the conf file. Found how to at the end of this page.

$ sudo lighty-enable-mod fastcgi
$ sudo lighty-enable-mod fastcgi-php

If you edit the file don’t use the enable mod command, otherwise you will have errors about duplicate configuration.

I did noticed that PHP is much faster than when on squeeze.

This might help, so you can check PHP version and if you want to do the conf file route.

It’s nice having my blog to refer back to. It really helped to get back and running with everything setup. Kinda funny using my own blog as a guide/reminder though. I also was able to update some of the install processes with missing or updated steps.


For some reason when reinstalling LIRCD again it didn’t install the init.d script. So I got a copy from here: http://forum.xbmc.org/showthread.php?tid=116590

Both times I had to install it after hosing the sudoers file it didn’t insatll the init.d script. Really odd since it was fine in squeeze, but at least this time around the init.d script works. So I don’t know if there was a problem with the init.d script that did get installed in squeeze or not. But I’d rather have this problem than it not having start/stop control.

After you save it to /etc/init.d/ directory then run this:

$ chmod 755 /etc/init.d/'ScriptName'

Then add it to startup

$ update-rc.d lircd defaults

Here is how I found the information on setting scripts on runtime:

It does brother me that the init.d script wasn’t there after install. The good thing though, when you run the script manually, it outputs the status. That is something that didn’t work before.

At first I was getting some errors trying to start LIRC:

[FAIL] Starting remote control daemon(s) : LIRC : failed!
[….] Starting remote control mouse daemon : LIRCMD :lircmd: could not connect to socket
lircmd: No such file or directory

Odd how I got it to work.
Not sure if this helped
I only did the first modprobe.
I ran lircd and lircmd manually.
That fixed the No such file or directory. I was still getting a error loading lircd.
So I edited the config file and set LIRCMD to not start. (Hopefully I won’t need LIRCMD)
And BAM! It worked and it now works on start-up.

So I ended up messing up sudoers file while troubleshooting LIRCD being controlled from PHP.(Which ended up being a different reason, more on that later.)
Here are some tweaks you can do on the Pi, I didn’t do all of them, I might look into tweaking the Pi later on to reduce the memory usage.

I couldn’t get IRSend to work from PHP after hours of troubleshooting and asking on IRC, I figured out that PHP needed the absolute path to IRSend, not sure if PHP is setup differently from squeeze or maybe it is a difference of PHP versions. The path for PHP doesn’t include /usr/local/bin where IRSend resides.

Don’t forget to set your timezone using:

$ tzselect

Finally, restore your scripts, programs, web files, and config files like for LIRCD.

Overall the process wasn’t too bad. It is a nice refresher and I was able to reinstall everything fresh without mistakes, so it should be a cleaner install.

Comment below if you upgraded to wheezy from squeeze. How did it go?

Leave a Reply