Tuesday, September 30, 2014

Raspberry Pi - Overclocking

I have worked with computers professionally for 20 years now, yet in all that time I have never once experimented with overclocking and/or thermal management.  Given that the 1) Raspberry Pi is so easy to overclock, 2) it is relatively cheap to replace should I break it, and 3) the whole idea behind the Raspberry Pi is to be used as an education tool; this seems like the perfect time for me to experiment.

Before purchasing my Raspberry Pi I researched it and the general consensus is the Raspberry Pi does not need heatsinks unless you are trying to overclock to extreme levels.  I wanted to test this for myself, so I purchased a set of heatsinks shown here.  What is nice about these heatsinks is they are made of copper (which conducts heat better than aluminum) and they have tall fins for maximum heat dissipation.  So this should be the most effective passive cooler for the Raspberry Pi.

As far as overclocking, the creator of the Raspberry Pi, Eben Upton, said that overclocking your Raspberry Pi will not damage it, but overvolting it may.  As such, overvolting voids the warranty (and they will know because of a burned out internal fuse).  So I plan to avoid overvolting, which also limits how much overclocking I can do.

Overclocking is accomplished by setting values inside the config.txt.  There are a lot of values you can tweak, but there are 3 main settings.

  1. arm_freq = The frequency of the CPU.  The default value is 700.
  2. core_freq = The frequency of the GPU.  The default value is 250.
  3. sdram_freq = The frequency of the RAM.  The default value is 400.
I started playing with these numbers, and I noticed something odd.  I could crank the speed up higher than most people on the Internet reported and I had no problems with stability nor extra heat generation.  Was the model B+ significantly improved in this area?  Turns out the answer is no.  By default the Raspberry Pi (like all modern processors) has a base line and a "turbo" frequency.  It runs at the above default values and only switches to the overclocked values when the CPU reaches a certain use threshold.  There is an additional setting called "force_turbo" that disables this dynamic switching and forces the Pi to always run at the overclocked values.  I recommend enabling this "force_turbo" setting, at least during initial testing.

When you overclock the Pi there are two concerns.  First is heat generation, you need to make sure the CPU is thermally cooled (more on that later).  The second problem is SD card corruption.  Some overclock settings are not stable and the result in corrupted SD cards.  The reason I recommend enabling "force_turbo" during testing is because then it will force SD card corruptions to happen more frequently if you are using unstable overclocking settings.  But with "force_turbo" disabled the Raspberry Pi will run at slower speeds most of the time even if the overclock settings are unstable.  The long term result would be random crashes that would be hard to diagnose.

Ok, so let us put this all together.  The first question is, does overclocking make a performance difference, and if so how much.  For this I used sysbench which can stress the CPU calculating prime numbers.  At the default 700/250/400 settings, it took 8:29 to calculate the first 10,000 primes.  When overclocked to 900/300/400 this dropped to 6:34 - approximately 25% faster.

As for thermal, during the initial 700/250/400 the starting temperature was 106°F (41°C) and went up to 109°F (43°C).  Overclocked to 900/300/400 the starting temperature was 106°F (41°C) and went up to 111°F (44°C).  As you can see, the temperature increase was very small.  In all of my tests, overclocking added about 2°F (1°C).  Given this small increase in temperature versus the noticeable gains in performance, it makes sense to overclock your Pi.

Lastly I was curious how much of a difference the heatsink made.  I repeated all of my tests this time with the heatsinks attached.  The change was minor but consistent.  Adding the heatsinks reduced the temperature by 2°F (1°C).  In addition to the minor drop in temperature, I noticed temperatures rose less sharply than they did without the heatsinks, and when the load dropped off the CPU cooled off quicker.

I was curious if forced air (like a fan) would make a difference.  The answer is most definitely yes!  In fact, this is far more effective than a heatsink.  Merely blowing on the CPU cooled the processor more than the heatsink ever did.  So if you are looking to seriously overclock your Pi, you need to look into a fan solution, with or without a heatsink.


Conclusions
After all of my tests, here are my conclusions.
  1. Everyone should at least mildly overclock their Raspberry Pi.  Set it to 800/250/400 with force_turbo disabled.  You will not damage your hardware, nor will it overheat, but you will see speed improvements under load.
  2. If you are looking for a little more speed (like me), then set your CPU between 800 and 900, bump the GPU to around 300, and try increasing the RAM to 450.  Be sure and set force_turbo at least during the testing to make sure it is stable.
  3. At these overclock settings, it will run a degree or two warmer, which is exactly how much cooling is provided by the heatsinks.  So think of the heatsinks as piece of mind, they perfectly balance out the slight overclocking.
  4. If you wish to overclock to extreme levels then you will most likely need fans and probably overvolting as well.  So proceed at your own risk.

Monday, September 29, 2014

Raspberry Pi DVR - XBian

Xbian is the last of the XBMC specific distros for the Raspberry Pi I wanted to look at.  XBian, like OpenElec, is updated fairly regularly - which is good.  Beyond that, XBian sounds like a cross between Raspbmc and OpenElec.  A good description of Xbian is OpenElec, but not trimmed down to the bone.  They leave more Linux in place should you need to perform maintenance outside of what they consider to be typical.

XBian - 1.0 release candidate 3
When I first tried Xbian the latest version was 1.0 RC2.  This version was not compatible with the Raspberry Pi model B+.  When you booted Xbian all USB ports were dead, so the mouse and keyboard would not work.  This is where I first learned about the manual firmware update I talked about in a recent post.  But only a few days after running into that problem, RC3 was released which fixed this problem.

Using RC3 I am able to go further, but I hit another wall.  Once XBMC has loaded I noticed my WiFi adapter is not working so I have no network access.  What is worse, I am not able to connect my Pi up to a wired ethernet jack right now.  And without network access, XBian is useless to me.  As I previously started in my review of OpenElec, I am going to go with a headless tvheadend server for now and I will purchase a second Pi to use as a HTPC.  At that point I will revisit Xbian.  Hopefully by then they will either fix the network issue, or I will have access to a wired network port then to be able to test with.

Raspberry Pi DVR - OpenElec

OpenElec is another Linux distro that is centered around XBMC.  OpenElec has several things going for it.  First, they take the "flying gas can" approach, which is to say they strip off everything from Linux that is not vital to either the operating system, XBMC, or operations therein like TV and WiFi.  So OpenElec is a very small image - the entire image file is around 100MB compared to 3+GB for many other distros.  This "light" approach means OpenElec performs better on the Raspberry Pi's limited hardware.  Another plus for OpenElec is the level of active development.  My impression is OpenElec is probably the XBMC-cenetered distro with the most active development, which is good for feature support and bug fixes.  Because of all this, OpenElec has become probably the most popular HTPC distro for the Raspberry Pi.  So going into this I am expecting good things.

OpenElec - 4.0.7
The first thing you notice when working with OpenElec is how quickly you can write the image to your SD card.  Because of the small image size creating a SD card is a lot quicker than other distros.  On first boot it goes straight into XBMC after which an initial configuration wizards comes up.  This wizard allows you to set up things like your network.  Like all other distros, the Rosewill RNX-N180UBE was supported out of the box.

Next I went to try out the TV tuner and tvheadend.  OpenElec includes both the firmware file for my TV tuner, and has pre-installed the tvheadend server.  All I need to do is enable the tvheadend server, which is disabled by default.  Of course, that seemingly simple task proved hard to find.  All the guides on the Internet were old and were no longer the way to enable tvheadend.  After much poking around I found the setting.  From XBMC select System | Settings | Add-ons | Get Add-ons | OpenElec Media Center OS Add-ons | Services | tvheadend.  From this deep buried menu you can enable tvheadend.

The next step is to setup tvheadend.  When started a TV channel scan, the Raspberry Pi hung.  I know the hardware works because I was able to scan for channels under Raspbian, so there must be a software problem causing this.  OpenElec just released 4.2.0 which might address this problem.  I will have to give that a try sometime.

But this was the point where I decided to stop with OpenElec.  My original plan was either a headless DVR in the garage, or a full HTPC in the house.  I have since decided to do both.  This Raspberry Pi will become the headless unit in the garage recording TV, and I am going to buy a second Raspberry Pi to function as a HTPC connected to a TV.  So I do not want to install OpenElec on a headless unit.  When I get a second Raspberry Pi I will reevaluate OpenElec using the latest release of the distro.

Friday, September 26, 2014

Raspberry Pi - BIOS, firmware, and other basic topics

I wanted to take a break from reviewing Raspberry Pi distros and talk about some basics of the Raspberry Pi.  Things I have learned that others might find useful.

First I think it is important to understand I come from a background of Windows.  I know a little bit of Linux, and even less of the specifics of the Raspberry Pi.  So if you are a Linux guru then this will not help you.  But chances are, if you are reading this then you use Windows and will be coming from that background as well.  So below is a list of topics or things I have learned about the Raspberry Pi thus far.

1.  Most, but not all, distros for the Raspberry Pi are "installed" or copied to the SD card in the same way.  You download a single image file (.IMG extension) and then use Win32 Disk Imager to write that image onto the SD card.  This process is straightforward, even for non-technically people.  After this process is complete, it is important to understand what the contents of the SD card look like.  Let's say you have a 16GB SD card.  After writing an image you will have a small (maybe dozens of MB) FAT partition followed by a 3+ GB Linux partition (Windows will call it "unknown").  In total it will use 4GB of the SD card, leaving the remaining 12GB unused.  This is why pretty much all distros for the Raspberry Pi say the minimum SD card size is 4GB.  However, most distros have an option to expand the Linux partition to fill the rest of the SD card.

2.  Every computer I have worked on has a BIOS which is stored in firmware on the motherboard.  The Raspberry Pi does not follow this model.  The BIOS/firmware is stored as a set of files located on the SD card.  As such it is possible for the average user to upgrade the firmware manually.  To do that first download the updated files in the "boot" folder here.  Then copy these files into the FAT partition on your Raspberry Pi SD card.  It is probably a good idea to backup the original files.  Now I believe this process is safe to do, but I am not a Raspberry Pi developer.  I have not found documentation on the web stating you can do this.  But in my experience this does work.  I have had to do this twice on older distros that did not include updated BIOS/firmware to support the model B+.

3.  Because of how and where the Raspberry Pi's BIOS is located, things that you would normally configure inside the BIOS of a computer are configured inside a text file.  The aforementioned FAT partition contains a file called config.txt.  This file contains things like memory allocations, overclocking, USB power, and enabling/disabling hardware.  This page has lots of info about the config.txt file, what settings do what.

4.  Viewing and changing the BIOS/firmware and config.txt files is easiest from a Windows PC.  You can mount and modify this FAT partition from the Pi while the Pi is booted, but this partition is normally mounted as read-only so you have to take extra steps.  It is far easier to shutdown the Raspberry Pi and stick the SD card into a Windows PC.  The FAT partition will show up as a drive letter and you can view and edit the files.  One word of caution, the file config.txt should be a Unix text file which is slightly different from a Windows text file.  So I would not use Notepad to edit this file.  I would recommend a text editor that is Unix-aware, like the excellent and free Notepad++.

5.  During initial set up it is easier to use a monitor, keyboard, and mouse connected to the Raspberry Pi.  But if you remove this Linux is very easy to work with remotely.  For command line administration use SSH, which many distros have enabled by default.  The best Windows SSH client is Putty.  To control the GUI aspect of Linux you can either use xrdp which works with the default Windows Remote Desktop Protocol, or VNC which there are a number of free Windows VNC clients (disclaimer - I never did get VNC working on the Pi).  Lastly, should you want to transfer files to/from the Pi, you might look into SFTP.  I never did use this on the Pi so I cannot tell you how to enable an SFTP server, but I can recommend either WinSCP or Filezilla as great free SFTP clients.

6.  By default Linux does NOT play well with other computers on your local network.  On the Pi I can access other devices (Windows computers, my NAS box, etc.) by IP address but not by name.  The opposite is true also.  From Windows I can access the Pi by IP address, but not by name.  I thought this was a function of DNS, but by default Linux does not interact with DNS in this way.  The solution is a software package called Samba.  Samba is software protocols and services that help Linux to play nicely with Windows and other devices on the network.  Once you install Samba you should be able to access network resources using name as well as IP address.

7.  On my home network I have a Synology NAS box, and I want to be able to access this box to copy files.  To config Linux to mount a network resource every time it boots, you need to edit the file /etc/fstab  Append the following to the end of that file:

//<server>/<share> /mnt/<folder> cifs username=<user>,password=<pwd> 0 0

Where <server> is the name or IP of your NAS box and <share> share name to access.  Note that Linux uses forward slashes whereas Windows uses backslashes for UNC paths.  Next is <folder> which is a local folder on the Pi where to mount the folder for access.  Lastly <user> and <pwd> are the credentials needed to access the NAS.  After you do this you need to manually create the mount folder.  Change to /mnt and create a new folder with the same name as <folder>.  Lastly reboot and you should be able to access your NAS or other network share.

8.  Here are some command commands you might need to run from the command line:

[sudo] nano <file>
Edit a file in a text-only editor.  If you used pine back in the day, nano is the modern version.  You may need to add sudo if you do not have permissions to access the file.

sudo apt-get update
Checks the Internet for newer versions of software and patch upgrades, but does not actually install anything.  This is the first step in updating your computer (think Windows Update).

sudo apt-get upgrade
This step actually downloads and installs the updates found in the previous step.

sudo apt-get dist-upgrade
Think of this as a smarter more powerful version of the above command.  If a newer program supersedes an older one, this will remove the old and install the new.  So the recent release of Epiphany browser, this command will remove Midori and install Epiphany.

sudo apt-get install <package>
This will install new software on your computer.  You need to know the name of the package to install.  All of this apt-get stuff is controlled by the file /etc/apt/sources.list which contains a list of Internet servers where to pull software and updates from.

startx
If your Raspberry Pi boots to command line by default, the command startx will start the graphical environment.

ls -slagFL | more
This displays files and folders similar to the dir command in Windows.

Raspberry Pi DVR - Raspbmc

Raspbmc is the first of the Home Theater PC (HTPC) specialized distros I am going to look at.  It gets its name from XBMC which is the software used to display meida (videos, TV, music, pictures, etc.).  These specialized distros of Linux run XBMC and only XBMC.  When the Raspberry Pi boots it automatically starts XBMC, and XBMC runs until the Pi is shutdown.

To install Raspbmc you have several options.  They have a small image which is the network installer.  When you boot the Raspberry Pi for the first time it downloads and installs Raspbmc.  This version requires network access via ethernet as wifi will not work.  Another option is the full standalone image which is larger to download, but does not require network access via ethernet.  I tried both methods and they both were straightforward and worked.

Once Raspbmc was installed, I was able to setup wifi access as Raspbmc did include drivers for the Rosewill RNX-N180UBE.

It does come with tvheadend server pre-installed, although it is not enabled by default.  To enable it go into the System Config from inside XBMC and scroll down to find tvheadend in the list.  I did notice the firmware file for my TV tuner was not present so I had to copy it manually.

As for remote access, ssh was enabled by default making it easy to connect remotely.

However, I did run into one major problem with Raspbmc.  In XBMC's settings menu is an option to run a web browser called Aurora.  I never actually wanted to use this web browser, but on several occasions I accidentally clicked on the link to start the browser.  The browser started to load and then the Raspberry Pi crashed.  But the major problem was, every time this happened, it corrupted my SD card image and I had to start from scratch.  This is a major problem that a top-level program will result in a corrupted system.  You could say "well just do not run it."  But I was not trying to run it, all 3 times I accidentally clicked on it.

Given this corruption issue, and given that Raspbmc has fallen behind other distros like OpenElec and Xbian, I decided not to pursue this distro any further.  Raspbmc is being superseded by a new project called OSMC.  If and when this project materializes I would love to give it a try.  But for now I am going to pass on Raspbmc.

Thursday, September 25, 2014

Raspberry Pi DVR - PiBang

Although not on my initial list of Linux distros to look at on the Raspberry Pi, I read some posts online where people raved about PiBang.  So I thought I would give it a try.

PiBang - November 2013
When you go to download PiBang, the first thing you notice is a post stating that PiBang is no longer in active development.  They claim this is not because of a loss of interested, but because PiBang had reached a point where there was little more to do on it.  I guess there is only one way to find out.

Booting PiBang for the first time and immediately run into a problem.  The setup screen comes up, but your mouse and keyboard do not work.  Also, any devices plugged into the USB jacks on the Raspberry Pi are not powered on.  After much research on this problem (and experience from other old distros) I found the problem and a solution.  The new model B+ requires newer firmware files to boot correctly.  Without them the USB jacks will not be powered up, hence the non-working keyboard and mouse.  To solve this problem I manually downloaded and copied the latest Raspberry Pi firmware files onto the SD card and rebooted (I will post an entire follow up post with details on this manual firmware update process).

This time my keyboard and mouse worked.  PiBang includes a first-time boot config screen almost identical to Raspbian.  I changed similar settings such as region and locale as well as select the option to expand the SD card.  When the Raspberry Pi rebooted, PiBang crashed and would not recover no matter how many times I rebooted it.  At this point I decided to give up on PiBang.  Because it is so much older than the model B+ I have, it is not worth my time to try and figure out how to get it to work.  In the future if they release an updated version that is compatible with the B+ I would love to give it a try.  But for now PiBang is just too old to be of use.

Raspberry Pi DVR - Pidora

The second Linux distro I looked at for the Raspberry Pi is Pidora, which is the Raspberry Pi version of Red Hat Fidora.

Pidora - Version 20, July 2014 (kernel 3.12.23)
Installing Pidora is even easier than Raspbian.  The first thing you are greeted to is a nice GUI wizard that walks you through the process of setting up the keyboard, user account, time zone, etc.  Not that this was hard in Raspbian, but Pidora makes this so easy anyone could do it.

Once the initial Pidora setup is complete, you immediately notice how it differs from Raspbian.  Whereas Raspbian is an operating system geared towards education and tinkering, Pidora is a full-fledged operating system.  It has user login accounts, defaults to a graphical desktop, and the default set of software is geared more towards work and productivity than education.

The next thing you notice is that Pidora is slower and less responsive than Raspbian.  This is no doubt because it is a more complete operating system and therefore has more tasks and processes going on.  It is still usable as a computer, but be prepared to wait just a little bit more.

Pidora did include built-in support for the Rosewill RNX-N180UBE.  To configure it I selected Settings | Network Connections | Add New Connection for WiFi.  WiFi was not quite as easy to configure as on Raspbian, but Pidora was fairly straightforward.

Pidora also includes the firmware file for my TV tuner, but I did not run any tests on the hardware such as install tvheadend.  After running Pidora I could see that, while a great operating system, it was not a good fit for my needs.  So I did not perform any further tests towards the end goal of setting up a DVR.

Pidora was definitely an interesting distro, worth my time to look at.  If you are looking to use a Raspberry Pi as a replacement for a desktop or laptop computer then Pidora is definitely worth a look.  Of all the distros on the Raspberry Pi, Pidora is probably the closest to a regular desktop version of Linux .

Wednesday, September 17, 2014

uBlock for Chrome - Give it a try

One great thing about Firefox and Chrome is their extensive libraries of add-ons, plugins, extensions (whatever you want to call them).  I do not install many, but the ones I do install I could not imagine "surfing" without them.  One of my long time favorites is AdBlock Plus.  This plugin does a great job of blocking many of the ads we are bombarded with on a regular basis.

I just found an even better alternative to AdBlock Plus.  It is called uBlock (micro-block).  uBlock does the same thing as AdBlock Plus, in fact it uses the same lists and filters as AdBlock Plus.  But what sets uBlock apart is how efficient it is.  The authors wanted to create an ad blocker that is A) as fast as possible, B) as memory efficient as possible, and C) as clean and simple as possible.  And they succeeded!  uBlock is fast, simple, and unobtrusive.

The only downside with uBlock is it is currently a Chrome only plugin, there is no Firefox plugin.  I really hope they come out with a Firefox version.  But in the meantime, all Chrome users should add this plugin to their system and reap the benefits.

Tuesday, September 16, 2014

Raspberry Pi DVR - Raspbian

The Raspberry Pi has lots of different operating systems to choose from.  For my DVR project, instead of picking one and trying to make it work at all costs, I decided to experiment with each operating system one by one.  That way I can see the strengths and weaknesses of each before deciding which operating system is the best for me.  To start things off I will be looking at Raspbian.

Raspbian is the main operating system for the Raspberry Pi.  It is a version of Debian "Wheezy" Linux made specifically for the Raspberry Pi.  It's a general purpose operating system, so you should be able to do most anything from Raspbian that you could do on a regular computer.

Raspbian Debian "Wheezy" - September 2014 (kernel 3.12)
Installing Raspbian is very easy.  Download the image then use a tool like Win32 Disk Imager burn the image onto your SD card.  The first time you boot a configuration screen will pop up.  I made the following changes on this screen (you can rerun this tool later on to make these changes).

  1. Select "Enable Boot to Desktop" and then "Desktop log in as user pi."  Without this change Raspbian will boot to command line, with this change Raspbian will boot to a nice graphical interface.
  2. Select "Internationalization Options" and then "Change locale."  Place a check by "en_US.UTF-8 UTF-8."
  3. Select "Internationalization Options" and then "Change time zone."  Linux handles time zones differently than Windows.  Instead of selecting your time zone by name or UTC offset, you instead select a region and a city near you.  So for me I select Americas and Los Angeles.
  4. Select "Internationalization Options" and then "Change keyboard layout."  For me I selected "Generic 104 key" and "English US."  This step is important as the default keyboard layout is English UK with things like the pound sterling symbol.
  5. Select "Advanced Options" and then "Overscan."  Set this option to disabled.  Older analog TVs have overscan where the image is smaller than what the TV can display.  If I don't disable overscan then on my computer monitor I have half an inch of black all the way around the outside edge.  Disabling overscan corrects this.

Once Raspbian is loaded, I used the "WiFi Config" link on the desktop to configure my wireless network.  I'm pleased to report that Raspbian includes drivers for the Rosewill RNX-N180UBE so the network worked as soon as I entered my wireless password.

One very common task on any operating system is browsing the Internet.  The Raspberry Pi has at least 4 browser options.  I tried each to see which worked the best; Iceweasel, Midori, Chromium, and Epiphany.
  1. Iceweasel is the Raspberry Pi version of Firefox.  To install it you run the command "sudo apt-get install iceweasel"  Whereas Firefox is my favorite browser on Windows, the Raspberry Pi does not do it justice.  It was the slowest of the bunch making surfing a painful experience.  On the plus side, the pages were rendered perfectly and looked as they should.
  2. Midori was the default Raspbian browser up until one month ago.  It was faster than Iceweasel, but still slow.  I also noticed some pages looked as if they did not render correctly.
  3. Chromium is the Raspberry Pi version of Chrome.  Chromium was fast and also rendered the pages correctly.  To install Chromium run the command "sudo apt-get install chromium"
  4. Epiphany was just released about a month ago.  It is the result of about 10 months of work dedicated to making the fastest most optimized browser for the Raspberry Pi's limited hardware.  And it shows!  Epiphany was the fastest of the bunch, rendered all pages correctly, and has a clean simple UI that was easy to use.
I would recommend Epiphany to anyone using a Raspberry Pi.  If you need a second choice, then go with Chromium.  Regardless of which you chose, all 4 browsers scored a perfect 100 on the acid 3 test.  You might run into problems getting Epiphany installed if you are using an older image.  I initially started testing with the June 2014 Raspbian image which does not include Epiphany.  There are instructions on adding it to your system, but each time the upgrade process hung.  I repeated it 3 times on fresh images, each time it hung.  Eventually I got it installed right about the time they released the September 2014 image which contains Epiphany out of the box.  So unless your image contains data you must keep, I recommend wiping your SD card and starting fresh with a new image.

The next hardware question was does Raspbian see the Hauppauge 950Q TV tuner?  The kernel does see it, but you need to manually install a firmware file (more on that in a later post).  Next you need to install the tvheadend server.  First run the command "sudo curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add -" then edit the file /etc/apt/sources.list.  Append the following to that file, "deb http://apt.tvheadend.org/stable wheezy main"  Lastly, run "apt-get update" and "apt-get install tvheadend"  This will install and start the tvheadend server.  tvheadend did see the TV tuner and started to pick up local TV channels.  I won't go into more details about tvheadend right now.  I'll save that for another post.  After all, whether I use Raspbian or something else like OpenElec, the configuration of tvheadend will be the same, so best to cover it once in a dedicated post.

The final tests I wanted to run on Raspbian is remote access.  Using the Putty on another computer I was able to connect to SSH on the Raspberry Pi.  SSH was enabled by default in Raspbian.  SSH access was fast and snappy, as you'd expect from a command line only connection.

I also tried Windows Remote Desktop Connection.  On the Pi I ran "sudo apt-get install xrdp"  After which I was able to connect remotely from Windows using the built-in Remote Desktop tool.  The connection was relatively responsive.

The final remote option I tried was VNC.  I installed TightVNC server on the Pi, but no matter what I tried I was unable to connect using another computer.  I don't know if the server wasn't properly started, or maybe the port was wrong.  But I never got it working.  Since I had two other ways to remotely connect, I decided not to pursue this any further.


Well there you have it.  My first distro review for the Raspberry Pi.  For the most part it was easy to use, but I recommend a lot of tinkering to get used to the quirks.  For example, it took me a while to figure out how to set the keyboard to US layout instead of UK layout.

Tuesday, September 9, 2014

Windows will not load after ImageX

One thing I do a lot is image a computer and restore that image using Microsoft's ImageX utility.  Imaging a disk is one of the fastest ways to backup a computer.  But about 1 in 4 times that I restore an image the computer will not boot afterwards.  I never knew why it worked most of the time, but had a high rate of failure.  What's more, it made me very hesitant to use this in critical situations.  What if I backup a computer knowing I will need to restore the image, and that image restoration fails?  You'd never put your money in a bank that has a 1 in 4 chances they will lose your money, right?  Fortunately, I recently found out what the problem is, and more importantly, how to fix it.

First let me describe the symptoms.  After performing a restore from a WIM file using ImageX, you reboot your computer.  But instead of Windows loading you get an error screen saying:

Status: 0xc000000e
Info: The boot selection failed because a required device is inaccessible.

The problem here is the Boot Configuration Data (BCD) info.  Windows stores the boot information in a BCD file and for whatever reason the BCD from the image file is not compatible with the new system after restoring the image.

To correct this problem you need to first boot your computer from a WinPE CD or USB drive.  I won't explain that as there are lots of guides on the Internet.  Once WinPE is loaded, if you type "bcdedit.exe" you will see the problem.  Three of the fields are "unknown."


The following 3 commands will restore these unknown values and fix the problem

bcdedit.exe /set {default} device partition=c:
bcdedit.exe /set {default} osdevice partition=c:
bcdedit.exe /set {bootmgr} device partition=c:

After this, simply reboot and Windows should load normally!

Tuesday, September 2, 2014

Funny sayings

This is a random post with some funny things I ran across recently.  First is a saying:
A PC a day keeps the Apple away.
As a longtime Apple-hater, this is just hilarious to me!  And so true!


The second funny thing is funny SSID names for your home wireless router.  One of my neighbors has a funny SSID, which got me curious so I googled to find more.  Here's a list of the funnier ones I found:

  • Don't sleep with my wifi
  • It hurts when IP
  • Pretty fly for a wifi
  • Bill Wi the Science Fi
  • FBI Surveillance Van
  • Get off my LAN
  • All Your Bandwidth Are Belong To Us
I guess some people use them to send subtle (or not so subtle) messages to their neighbors such as:
  • Stop stealing our Internet
  • Keep your kids off my lawn
  • Stop your dogs from barking
These aren't as funny as the first group unless your situation warrants it.