Cubian from the beginning…

This is one of those posts that’s purely here for my own reference documenting what I need to do in the event that I need to start all this over from scratch.

This isn’t necessarily the exact order in which I’ve done things this time, as it’s taking me longer to resolve some issues over others, and I’ve reordered things into the process I plan to use in the event that I do need to start over.

You’ll also notice that I create backups fairly regularly during my first go through this process – especially immediately before and immediately after doing something major (like installing X).

It’s just to be safe, and save me some time by giving me restore points for when I inevitably screw something up.

I used r7 for the A10 (I’m using the original CubieBoard).  Their download page is here, but I’ll also include direct links.

Download Cubian R7 for A10.

Follow the instructions at the link below to get it onto a MicroSD card, substituting SUSE Studio Image Writer for Win32 Disk Imager (you can use this to also make your own regular backups, and restorations of the card).

I’m using Windows7.  Depending on your OS, you may have to do things a little differently.

https://github.com/cubieplayer/cubian/wiki/Install-Cubian

Skipped most of this.  I did put the SSH port back to 22 (from the default of 36000).  I wouldn’t normally bother changing it, but it’s on a private LAN, so intrusion from the outside world isn’t really a major issue.

I did not enable a root password login.  Private LAN, only me ever going to login, and I can “sudo su” without having to re-enter a password.

  • Connect To A Network

As mentioned in my previous post, add the following to /etc/network/interfaces/ and reboot.

  • auto wlan0
  • iface wlan0 inet dhcp
  • wireless-essid MY_NETWORK_SSID
  • wireless-key MY_NETWORK_KEY

I didn’t bother configuring the date & time as it does it automatically upon boot.

  • Update Firmware to Latest Version

apt-get install cubian-update
sudo cubian-update

  • Backup the System

At this point, I issued a “halt” command, pulled out the MicroSD, popped into a card reader on a Windows machine, and used Win32 Disk Imager to back the whole thing up to an img file.

The information in the above link restores the missing 150-200MB of RAM, should it happen to you (it did to me).

root@Cubian:/boot# cat /proc/meminfo
MemTotal: 828084 kB

The link says to [do a bunch of stuff I’ve since deleted as it’s not working for me].

Rebooting simply resulted in a lot of text being spewed out to my TV, with kernel panics and auto reboots, and finally a Cubie that just sits there doing nothing (I can’t even SSH in).

Good job I backed up, huh?  Time to restore from an img file, and worry about this later.

Edit: Ok, no need to worry about this, I’m just an idiot.  That “missing” memory is being used for the GPU, and unless I don’t want to actually use a display, I shouldn’t try to max out 1GB RAM for system usage.

Simple enough, just 4 lines, and really we only need the last two.  This installed about 450MB of stuff, and took about 10-15 minutes to download and install.

  • apt-get update
  • cubian-update
  • apt-get install xserver-xorg-core xinit xserver-xorg-video-sunximali sunxi-disp-test lxde
  • usermod -a -G video cubie

Upon rebooting, it jumps straight into X with a login manager.  No need to install LXDM separately.

There was no real need to run cubian-update again, as I’d just done it a couple of minutes earlier, but, just to be safe.

  • Time for another backup

Again, issue a “halt” command, pop the card into a Windows PC, and Win32 Disk Imager to make a new img file.

  • Next up?

Install XBMC and see how it runs.

If it works well, get it running on boot.  If it doesn’t, restore form the last backup and just relegate the CubieBoard to lowly web server, and get another Pi to run Raspbmc on the other TV.

After seeing how it gets along with XBMC, install Apache, PHP & MariaDB, and get ftp working.