Cubieboard / Cubietruck Debian SD image

My goal is to build and maintain headless stable base to deploy various services (web, mail, samba, …). The images are compiled from scratch and sometimes patched if necessary. Images are suitable for any microSD card larger than 1G and can be installed to NAND or SATA. First boot takes longer time (around 2m) than usual (25s). It regenerates SSH keys, sets your MAC address, resizes partition to fit your SD card and downloads the package lists (apt-get update). It will reboot one time automatically on first boot to take effect for changes.

  • Debian Wheezy 7.5 based & Debian testing (Jessie) testing
  • Kernel 3.4.104 with broad hardware support, headers and some firmware included
  • Ethernet adapter with DHCP and SSH server ready on default port (22) with regenerated keys @ first boot
  • Wireless adapter with DHCP ready but disabled (/etc/network/interfaces, WPA2: normal connect or AP mode)
  • Enabled audio devices: analog, HDMI, spdif and I2S
  • Advanced IR driver with RAW RX and TX (you need an IR diode)
  • Bluetooth ready (working with on-board device)
  • Clustering / stacking
  • USB redirector – for sharing USB over TCP/IP (disabled by default /etc/init.d/rc.usbsrvd)
  • root file-system auto resize
  • Graphics desktop environment upgrade ready
  • NAND and SATA install script included (/root)
  • Disabled LED blinking, logo, boot messages (/etc/init.d/, kernel.config, kernel parameters in uEnv.txt)
  • Total memory is 2000Mb (disabled all memory reservations for GPU)
  • Login script shows Cubietruck / Cubieboard 2 auto MOTD with current CPU temp, hard drive temp, ambient temp from Temper if exits & actual free memory
  • MAC address from chip ID, manual optional
  • root password=1234 and expires at first login
  • sunxi-tools included: fex2bin, bin2fex, nand-part
  • Performance tweaks:
    • /tmp & /log = RAM, ramlog app saves logs to disk daily and on shut-down
    • IO scheduler NOOP for SD, CFQ for sda (mechanical hard drive). (change in /etc/sysfs.conf)
    • journal data writeback enabled. (/etc/fstab)
    • commit=600 to flush data to the disk every 10 minutes (/etc/fstab)
    • optimized CPU frequency scaling 480-1010Mhz with interactive governor (/etc/init.d/cpufrequtils)
    • eth0 interrupts are using dedicated core
    • Allwinner Security System cryptographic accelerator
  • Known bugs or limitations
    • On board Bluetooth firmware loading sometime fail. Reboot helps.
    • NAND install script sometime fails. Dirty but working workaround – installing Lubuntu to NAND with Phoenix tools and run the nand-install again.
    • Gigabit ethernet transfer rate is around 50% of its theoretical max rate (hardware or firmware issue)
    • Shutdown, reboot and battery troubles regarding poor AXP chip driver (firmware issue, probably solved in development kernel). Partially fixed.
    • Due to bad PCB placement, there is some crosstalk between Wifi and VGA in certain videomodes.
Cubieboard2 / Cubietruck Debian 2.7 Wheezy Kernel 3.4.104 Kernel 3.17.0 RC1 (experimental) Sources

  • Unzipped images can be written with supplied imagewriter.exe on Windows XP/2003/Win7 or with DD command in Linux/Mac (dd bs=1M if=filename.raw of=sd card device). Kernel package should be uncompressed with tar xvfp cubietruck_kernel_3.4.xxx_mod_head_fw.tar under root user to / Change boot parameter if your old kernel has different name.
  • Warning for kernel (3.17.x). Kernel is experimental! There is no video driver – no console, no wifi, no bluetooth, … boot manager is experimental too. Use on your own risk.

v2.7 / 1.10.2014
v2.6 / 22.8.2014
v2.5 / 2.8.2014
v2.4 / 11.7.2014
v2.3 / 2.7.2014
v2.2 / 26.6.2014
v2.1 / 13.6.2014
v2.0 / 2.6.2014
v1.9 / 27.4.2014
v1.8 / 27.3.2014
v1.7 / 26.2.2014
v1.6 / 9.2.2014
v1.52 / 7.2.2014
v1.5 / 22.1.2014
v1.4 / 12.1.2014
v1.3 / 3.1.2014
v1.23 / 1.1.2014
v1.2 / 26.12.2013
v1.0 / 24.12.2013

Cross compile environment

If you want to compile your own image or kernel for Cubieboards you will need to set-up development environment. Since there are troubles regarding the proper compiler I suggest you to use proven configuration. This image / kernel was successfully compiled on Ubuntu 12.04 LTS x64 – you are going to need server image and 15-20G of space. Install only basic system and get build script from Github.

  1. Download Ubuntu 12.04 LTS x64
  2. Create Virtual machine with 15-20G
  3. Install minimal system and execute the following code
sudo apt-get -y install git
cd ~
git clone
chmod +x ./Cubietruck-Debian/
cd ./Cubietruck-Debian

Edit configuration at the beginning of the script and run it afterwards. The compilation takes 30-60 minutes (on average desktop PC) and you might be asked for some input. Your will find compiled images in the directory defined in variable DEST/output. In case of success you will find zip compressed images for VGA/HDMI and kernel with modules and headers.

Optional customization

keyboard: dpkg-reconfigure keyboard-configuration
system language: dpkg-reconfigure locales
time zone: dpkg-reconfigure tzdata
screen resolution: edit /boot/uEnv.txt and change it/reboot.


If you want to try a semi simple desktop environment:

apt-get -y install xorg
apt-get -y install lightdm
apt-get -y install xfce4 xfce4-goodies tango-icon-theme gnome-icon-theme

Check this site for others.


You can post questions below or in the project topic on the Cubieforums.

510 thoughts on “Cubieboard / Cubietruck Debian SD image

  1. Dear Igor,

    thank you for the excellent image.
    Would you please provide the compiled kernel 3.4.104 too ?
    (I can access only an older version of it)


  2. Hi Igor,
    great image!
    However, there is one step missing in the script to move the image to nand
    in the fstab an entry to mount /dev/nand1 on /boot has to be added, e.g.
    /dev/nand1 /boot vfat defaults 0 0
    it took me some days to find this issue :-)


  3. Hi,

    I’ve just downloaded and flashed the latest wheezy VGA image and it boots without a problem.
    But myUSB Keyboard does not work (Cherry G230, works well on my laptop).
    Any Idea why this happens? I power the CT with an 2.1A USB power supply over the OTG port, is that maybe the problem? (can’t remember where my power jack adapter is)

    1. Hello. Most likely your keyboard is not working because of not sufficient power supply. 2.1A might be enough for the board but not with plugged devices. Try using your keyboard via self powered USB hub.

  4. Igor, do you know how to get LIRC running? When I try to load “sunxi-ir” kernel module i get this:
    “ERROR : could not insert ‘sunxi_ir': Device or resource busy”

    1. What do you get from: dmesg | grep sunxi-ir
      [49866.102756] input: sunxi-ir as /devices/virtual/input/input1
      This is my kernel output and it looks it’s build in. There are two IR drivers around … i have to check.

      1. Unfortunately I get nothing (empty line). I’m using your newest distro with kernel version 3.4.103. Maybe something is broken on my cubietruck?..

          1. Today I tested Cubian (most up-to-date version: Cubian-base-r5-a20-ct.img) and ir sensor is working fine with it (`modprobe sunxi_ir` gives nothing (expected) instead of previously mentioned error and `cat /proc/bus/input/devices` yields info about `sunxi_ir` device, etc…).
            Also I installed fresh copy of your image and tested loading this module one more time. But problem still exist :(

          2. Thank you for feedback. IR is working fine on my system – which is not latest and modified. I have to test with fresh install. I will check and correct ASAP and include this in new build. It’s broken in last build so I need to find out why.

  5. Hello! I installed you’re image today on my CT (had LUBUNTU) running and until now thumbs up! This is a really great image, I gree with Nathan!
    Have you tried on of the two big USB connectors Nathan? Mine worked there…
    Is there a firewall running on this image and when which one is it, so I can configure it, to open some ports…


    1. Thanks :) Image tend to be minimal so the only used/open port is 22 where is service SSH. No firewall or anything else on the network level.

    1. Jessie has changed start-up manager (by Debian folks) and therefore my scripts stops working. There is a manual way: 1. (echo d; echo n; echo p; echo 1; echo ; echo; echo w;) | fdisk /dev/mmcblk0 2. reboot 3. resize2fs /dev/mmcblk0p1

  6. Igor I run the image from nand perfectly now but i have two main problem.
    1- I can’t mount sd card to use it
    2-I’ve installed usb mounter to automate mounting my usbs but doesn’t work properly because when I plug one or more usb appearing a lot of folder named usb0,1,2,3,etc and it doesn’t display the usb name. How can I configure it?
    Many thanks

  7. I can’t seem to get samba speeds, or any protocol speeds for that matter over 10mb/s. CT’s boot is installed on nand, moved rootfs onto sata hard drive (write speed is around 35mb/s on CT, would usually be around 70mb/s connected to anything else) CT is also plugged directly into the router via Ethernet, client’s connected to WiFi through an, Asus RT-AC68U router (same one the CT is plugged into) so I don’t suspect the router to be the issue, wireshark shows nothing too crazy wrong with it. I even tried creating a ramdisk mount which had a write speed of 120mb/s just to make sure it wasn’t bottle necking on the hard drive, and I’ve messed with the tcp configuration to get the most maxed stable transfer rate that I could get it. So I’m thinking it’s a driver issue or a hardware issue, but yet I hear people getting much faster transfers on their CT’s with this image. What am I doing wrong?!

    1. From your writing I can understand that your network card is not getting connected at full speed. dmesg | grep “Link is Up” if the number is 100 than we found the problem – cables / router / faulty chip!. Ethernet speed must go up to 50-60mb/s or at least 20-30mb/s on low end routers when connected as gigabit.

  8. Hi Igor,
    i really appritiate you work on this image,
    when i installed it i had only a 2gb microSD card availabel and now i have got a larger ( 16GB)
    how do i migrate my current setup between the two without loosing the system ( copy + expand).
    Thnx in advance

  9. This is an excellent image, works nicely for my owncloud server. Thanks!

    I do not need any video output since I run my cubietruck via ssh only.

    How can I disable the video output (hdmi & vga) to save power?

  10. Igor, thanks for the work, but i have one question. Which is the password for ssh connection? I’ve tried cubie, root and 1234 with no luck. I use cubieboard remotely into my home so I need to enter via ssh to install and setup everything.

    1. Hey. Are you sure you haven’t change it? The default is root / 1234 and it prompt’s you to change at first login. You should manually login first time, not with some automated script. Maybe this is the case?

          1. Another question. I’ve installed x11vnc but I can’t launch it properly via ssh. I receive XOpenDisplay failed (:0). Is there a way to remote connect via vnc?

  11. Hi Igor,
    while building image from your github I got problem at the end with
    “killall ntpd” in
    After this instruction my Ubuntu system is going off.
    Please help. Thanks

  12. Hi Igor,

    I suggest you add your image to as there are no images listed, and I find your Debian image is highly reliable and painless to get going. I am still on 2.2 and have had no dramas with it (except I can’t seem to get my BT keyboard to connect to it but I think that is a problem with my cheap no name keyboard)

Dodaj odgovor

Vaš e-naslov ne bo objavljen. * označuje zahtevana polja