Submitted by gwolf on Sun, 02/02/2014 - 11:44

Somewhere back in August or September, I pre-ordered a CuBox-i — A nicely finished, completely hackable, and reasonably powerful ARM system, nicely packaged and meant to be used to hack on. A sweet deal!

There are four models (you can see the different models' specs here) — I went for the top one, and bought a CuBox-i4Pro. That means, I have a US$130 nice little box, with 4 ARM7 cores, 2GB RAM, WiFi, and... well, all of its basic goodies and features. For some more details, look at the CuBox-i block diagram.

I got it delivered by early January, and (with no real ARM experience on my side) I finally got to a point where I can, I believe, contribute something to its adoption/usage: How to get a basic Debian system installed and running in it.

The ARM world is quite different to the x86 one: Compatibility is much harder, the computing platform does not self-describe properly, and a kernel must first understand how a specific subarchitecture is before being able to boot on it. Somewhere in the CuBox forums (or was it the IRC channel?) I learnt that the upstream Linux kernel does not yet boot on the i.MX6 chip (although support is rumored to be merged for the 3.14 release), so I am using both a kernel and an uBoot bootloader not built for (or by) Debian people. Besides that, the result I will describe is a kosher Debian install. Yes, I know that my orthodox friends and family will say that 99% kosher is taref... But remember I'm never ever that dogmatic. (yeah, right!)

[update]: Read on if you want to learn the process. If you just want to get the image and start playing with your box, you can go ahead and download it from my space.

Note that there is a prebuilt image you can run if you are so inclined: In the CuBox-i forums and wiki, you will find links to a pre-installed Debian image you can use... But I cannot advise to do so. First, it is IMO quite bloated (you need a 4GB card for a very basic Debian install? Seriously?) Second, it has a whole desktop environment (LXDE, if I recall correctly) and a whole set of packages I will probably not use in this little box. Third, there is a preinstalled user, and that's a no-no (user: debian, password: debian). But, most importantly, fourth: It is a nightly build of the Testing (Jessie) suite... Built back in December. So no, as a Debian Developer, it's not something we should recommend our users to run!

So, in the end and after quite a bit of frustration due to my lack of knowledge, here goes the list of steps I followed:

Using the CuBox
On the i2 and i4 models, you can use it either with a USB keyboard and a HDMI monitor, or by a serial consoles (smaller models do not have a serial console). I don't have a HDMI monitor handy (only a projector), so I prefer to use the serial terminal. Important details to avoid frustration: The USB keyboard has to be connected to the lower USB port, or it will be ignored during the boot process. And make sure your serial terminal is configured not to use hardware flow control. Minicom is configured by default to use hardware flow control, so it was not sending any characters to the CuBox. ^A-O gets you to the Minicom configuration, select Serial port setup, and disable it.
Set up the SD card
I created a 2GB partition, but much less can suffice; I'd leave it at least to 1GB to do the base install, although it can be less once the system is set up (more on this later). Partition and format using your usual tools (fdisk+mke2fs, or gparted, or whatever suits your style).
Install the bootloader
I followed up the instructions on this CuBox-i forums thread to get the SPL and uBoot bootloader running. In short, from this Google Drive folder, download the SPL-U-Boot.img.xz file, uncompress it (xz --decompress SPL-U-Boot.img.xz), and write it to the SD card just after the partition map: As root,
# dd if=SPL-U-Boot.img of=/dev/mmcblk0 bs=1024 seek=1 skip=1.
Actually, to be honest: As I wanted something basic to be able to debug from, I downloaded (from the same Google Drive) the busybox.img.gz file. That's a bit easier to install from: xz --decompress busybox.img.xz, and just dump it into the SD from the beginning (as it does already include a partition table):
# dd if=busybox.img of=/dev/mmcblk0
This card is already bootable and minimal, and allows to debug some bits from the CuBox-i itself (as we will see shortly).
After this step, I created a second partition, as I said earlier. So, my mmcblk0p1 partition holds Busybox, and the second will hold Debian. We are still working from the x86 system, so we mount the SD card in /media/mmcblk0p2
Installing the base system
Without debian-installer to do the heavy lifting, I went for debootstrap. As I ran it from my PC, debootstrap's role will be for this first stage only to download and do a very initial pre-unpacking of the files: Bootstrapping a foreign architecture implies, right, using the --foreign switch:
debootstrap --foreign --arch=armhf wheezy /media/mmcblk0p2
You can add some packages you often use by specifying --include=foo,bar,baz
So, take note notes: This board is capable of running the armhf architecture (HF for Hardware Float). It can also run armel, but I understand it is way slower.
First boot (with busybox)
So, once debootstrap finishes, you are good to go to the real hardware! Unmount the SD card, put it in the little guy, plug your favorite console in (I'm using the serial port), and plug the power in! You should immediately see something like:
  1. U-Boot SPL 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28)
  2. Boot Device: SD1
  3. reading u-boot.img
  4. Load image from RAW...
  7. U-Boot 2013.10-rc4-gd05c5c7-dirty (Jan 12 2014 - 02:18:28)
  9. CPU: Freescale i.MX6Q rev1.2 at 792 MHz
  10. Reset cause: POR
  11. Board: MX6-CuBox-i
  12. DRAM: 2 GiB
  13. MMC: FSL_SDHC: 0
  14. In: serial
  15. Out: vga
  16. Err: vga
  17. Net: phydev = 0x0
  18. Phy not found
  19. PHY reset timed out
  20. FEC
  21. (Re)start USB...
  22. USB0: USB EHCI 1.00
  23. scanning bus 0 for devices... 1 USB Device(s) found
  24. scanning usb for storage devices... 0 Storage Device(s) found
  25. scanning usb for ethernet devices... 0 Ethernet Device(s) found
  26. Hit any key to stop autoboot: 3

Let it boot (that means, don't stop autoboot), and you will soon see a familiar #, showing you are root in the busybox environment. Great! Now, mount the Debian partition:
# mount /dev/mmcblk0p2 /mnt
Finishing debootstrap's task
With everything in place, it's time for debootstrap to work. Chroot into the Debian partition:
# chroot /mnt
And ask Debootstrap to finish what it started:
# /debootstrap/debootstrap --second-stage
Be patient, as this step takes quite a bit to be finished.
Some extra touches...
After this is done, your Debian system is almost ready to be booted into. Why almost? Because it still does not have any users, does not know its own name nor knows I want to use it via a serial terminal, and does not know how the filesystems should be mounted and made available. And having a Debian system means having its very extensive software repository collection handy! Five very simple tasks to fix:
  1. Set a password for root:
    1. # passwd
    2. Enter new UNIX password:
    3. Retype new UNIX password:
    4. passwd: password updated successfully
  2. Setting your hostname is trivial:
    1. # echo > /etc/hostname

    So you have now a usable root user, and when you boot with it you can create further users.
  3. Now, to get the serial console working (you might not need it, if you use the CuBox-i via keyboard+monitor) add a line to /etc/inittab specifying the details of the serial console. You can just do this:
    1. # echo 'T0:23:respawn:/sbin/getty -L ttymxc0 115200 vt100' >> /etc/inittab
  4. Create a /etc/fstab specifying how the system will be laid out. Right now, it is quite trivial (and in fact, I used my machine for some time without even thinking about this, just using the parameter provided to the kernel, this setting will just give you an easier and even faster experience):
    1. # cat > /etc/fstab
    2. /dev/mmcblk0p2 / ext3 noatime 0 0
    3. /dev/mmcblk0p1 /boot ext2 ro 0 0
    4. proc /proc proc defaults 0 0
    5. tmpfs /tmp tmpfs defaults 0 0
    6. tmpfs /run tmpfs defaults 0 0
  5. Tell your computer where to get the Debian packages. I suggest you use the meta-mirror, which will resolve to the mirror closest to you, but you can of course choose from the worldwide list of Debian mirrors.
    # echo deb wheezy main > /etc/apt/sources.list
    # echo deb-src wheezy main > /etc/apt/sources.list
Boot into Debian!
So, ready to boot Debian? Ok, first exit the chroot shell, to go back to the Busybox shell, unmount the Debian partition, and set the root partition read-only:
  1. # exit
  2. # umount /mnt
  3. # mount / -o remount,ro

Disconnect and connect power, and now, do interrupt the boot process when you see the Hit any key to stop automount prompt. To see the configuration of uboot, you can type printenv — We will only modify the parameters given to the kernel:
  1. CuBox-i U-Boot > setenv root /dev/mmcblk0p2 rootfstype=ext3 ro rootwait
  2. CuBox-i U-Boot > boot

So, the kernel will load, and a minimal Debian system will be initialized. In my case, I get the following output:
  1. ** File not found /boot/busyEnv.txt **
  2. 4703740 bytes read in 390 ms (11.5 MiB/s)
  3. ## Booting kernel from Legacy Image at 10000000 ...
  4. Image Name: Linux-3.0.35-8
  5. Image Type: ARM Linux Kernel Image (uncompressed)
  6. Data Size: 4703676 Bytes = 4.5 MiB
  7. Load Address: 10008000
  8. Entry Point: 10008000
  9. Verifying Checksum ... OK
  10. Loading Kernel Image ... OK
  12. Starting kernel ...
  14. Unable to get enet.0 clock
  15. pwm-backlight pwm-backlight.0: unable to request PWM for backlight
  16. pwm-backlight pwm-backlight.1: unable to request PWM for backlight
  17. _regulator_get: get() with no identifier
  18. mxc_sdc_fb mxc_sdc_fb.2: NO mxc display driver found!
  19. INIT: version 2.88 booting
  20. [info] Using makefile-style concurrent boot in runlevel S.
  21. [....] Starting the hotplug events dispatcher: udevd. ok
  22. [....] Synthesizing the initial hotplug events...done.
  23. [....] Waiting for /dev to be fully populated...done.
  24. [....] Activating swap...done.
  25. [....] Cleaning up temporary files... /tmp. ok
  26. [....] Activating lvm and md swap...done.
  27. [....] Checking file systems...fsck from util-linux 2.20.1
  28. done.
  29. [....] Mounting local filesystems...done.
  30. [....] Activating swapfile swap...done.
  31. [....] Cleaning up temporary files.... ok
  32. [....] Setting kernel variables ...done.
  33. [....] Configuring network interfaces...done.
  34. [....] Cleaning up temporary files.... ok
  35. [....] Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix. ok
  36. INIT: Entering runlevel: 2
  37. [info] Using makefile-style concurrent boot in runlevel 2.
  38. [....] Starting enhanced syslogd: rsyslogd. ok
  39. [....] Starting periodic command scheduler: cron. ok
  41. Debian GNU/Linux 7 ttymxc0
  43. cubox-i login:

And that's it, the system is live and ready for my commands!

So, how big is this minimal Debian installed system? I cheated a bit on this, as I had already added emacs and screen to the system, so yours will be a small bit smaller. But anyway — Lets clear our cache of downloaded packages, and see the disk usage information:

  1. root@cubox-i:~# apt-get clean
  2. root@cubox-i:~# df -h
  3. Filesystem Size Used Avail Use% Mounted on
  4. rootfs 689M 228M 427M 35% /
  5. /dev/root 689M 228M 427M 35% /
  6. devtmpfs 881M 0 881M 0% /dev
  7. tmpfs 177M 144K 177M 1% /run
  8. tmpfs 5.0M 0 5.0M 0% /run/lock
  9. tmpfs 353M 0 353M 0% /run/shm
  10. tmpfs 881M 0 881M 0% /tmp

So, instead of a 4GB install, we have a 228MB one. Great improvement!

For this first boot, and until you set up a way to automatically (or configure it to be static) determine the network configuration, you can use dhclient eth0 to request an IP address via the wired network port (configuring the wireless network is a bit more involved; I suggest you install the wicd-curses package to help on that regard). With the network working, update the Debian package lists:

# apt-get update
Get:1 wheezy Release.gpg [1672 B]
Get:2 wheezy Release [168 kB]
Get:3 wheezy/main Sources [5956 kB]
Get:4 wheezy/main armhf Packages [5691 kB]              
Get:5 wheezy/main Translation-en [3849 kB]              
Fetched 15.7 MB in 1min 27s (180 kB/s)                                         
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Yay, all of Debian is now at your fingertips! Now, lets get it to do something useful, in a most Debianic way!

[note]: I have tried to keep this as true as possible to the real install. I have modified this text every now and then, looking at ways to make it a little bit better. So, excuse me if you find any inconsistencies in the instructions! :)

[update]: I finally followed through the instructions again and produced a downloadable image, where I did all of this work, and you can just download it and play with your CuBox-i! You can download it from my space. You will find there instructions on how to get it installed.

( categories: )
steve's picture

Thanks much for this write

Thanks much for this write up!

JREwing's picture

Updating kernel in compiled img


I have read your instructions, but I have decided to download your precompiled image.

It contains kernel 3.0.35 and I am trying to switch it to kernel 3.14:

I have recompile uboot and install it (dd).
I have commented out /boot partition /dev/mmcblk0p1 from fstab.
I have compiled kernel and placed it to /boot (not on separate partition) with dts directory.
I have created uEnv.txt (which is not in precompiled img).

But after restart, Iam still getting:
# uname -a
Linux ser-stream-01 3.0.35-8 #1 SMP PREEMPT Sun Jan 26 17:27:04 MST 2014 armv7l GNU/Linux

Can anyone please tell me, where is hardcoded to load image from inactive partition?

# mount
/dev/root on / type ext3 (rw,noatime,user_xattr,barrier=1,nodelalloc,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=122296k,nr_inodes=30574,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=24484k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=48960k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /tmp type tmpfs (rw,relatime)

gwolf's picture

It's not just adding a kernel

You need to have a new version of u-boot installed that can recognize a gzip-compressed image and give it the needed initrd.

I don't have the full instructions to do this, as it was a friend of mine that helped me. The tricky part is that you need specific versions, as the support for the CuBox-i had to be removed later due to some other breakages.

Get and install u-boot 2014.04+dfsg1-3, flash-kernel 3.23. That, and fulfill the needed dependencies. It *should* be enough to get you started!

mclien's picture


First, of course, many thanks for the image.

What I don't get at the moment is to shutdown the device, at least the way I know it from other archs.
Is armhf (or the cubox in particular) not able to do a power off after shutdown?
And I only get the warning message that the shutdown ist started. No shutdown success, no power of (means the screen stays "on" with the last warning message in the console

gwolf's picture

I must insist I am not an expert on the matter, but...

As far as I can tell, no, the CuBox-i does not really shut down. It only stops responding. It is the same behaviour than all ARM boards I have worked with (which are not that many FWIW).

MetreM's picture

Video driver

Hi all, there is some people here who have install video driver? i try to have an xbmc based on wheezy armhf, but that not work at this moment :/

DebNoob's picture

How to expand the rootfs?

I have used the download image successfully to boot OK. I wanted to add a webserver and the used rootfs gets close to 100%. How can I expand this? Gparted has a bug that will not allow me to do this? Manual parted command also fails. I have a 15G SDcard.

DebNoob's picture

How to expand the rootfs

Managed to answer this myself after testing. Once the wheezy image was copied to the 15G microSD card, I used fdisk to delete the 2nd partition, n option to create a new one with the end sectors now using the whole card. option w writes it and after a reboot , resize2fs. df -h showed the disk now correct size. Then booted the card and added web and mail server packages. (Ispconfig3 in fact).

Peter Fox's picture


Hi Gunnar,
first of all thanks for your excellent work !
I have installed your image on my cubox-i2 it boot 1 time every 3-4 power on. I explain better. When I power on my cubox-i the red light in front remain switched off, I have to try 3 or 4 times (pull and put back the power) and then the cubox-i boot.

I thought the problem was the sd, I changed it, but the problem is the same.

Do you have any suggestions ?

Thanks in advance

bananajoe's picture

Hi, I have the exact same

Hi, I have the exact same problem here. But I'm using a Cubox-i4pro. Do you have any solution yet?

Android Rocks's picture

NFC ???

no one will think about the NFC?

William Hay's picture

Image not booting

I just got a Cubox Pro. Copied the image you provided to an sdcard, inserted it into the cubox and powered it on. The cubox appears to be following the boot process outlined at:
but is unable to find a boot.scr file anywhere in the image (nor am I). Interrupting, setting variables and running boot just starts the search for boot.scr off again as that is what the bootcmd variable tells it to do. I can load the kernel with ext2load but any attempt to boot it ends with the words 'Starting kernel ...' and nothing further on either display or serial console.

Am I missing something? IIRC with the GuruPlug I had to upgrade the built in firmware in order to boot debian. Is something similar necessary with the CuBox?

Android Rocks's picture

Same problem here

I have same problem, do you fixit?

gwolf's picture

Re: Image not booting

I cannot provide much help, as I don't know the CuBox-i's innards any better than what I have just described. The link you provide is specific to the older model (the CuBox, not the CuBox-i).

My image works only with the CuBox-i; I know for a fact it runs in my model (CuBox-i4 Pro), and I expect it to run in the whole series. CuBox-i does not have a user-facing firmware (the initial boot loader is taken from the SD card), so I understand it to be an all-or-nothing issue: If you get any output from the box, you will get the kernel to boot. And if you don't, you didn't make the image correctly :) (Solidrun's people say the CuBox-i is unbrickable because there's nothing in it that can lead to a non-functioning device due to user interaction).

Richard's picture


Did anybody try to use ESATA with this image?
I connected the SSD that I used over USB before to ESATA, but I can't see it.
More details are at:
Is there anything I can do, other than waiting for somebody to bublish a new kernel for this debian image?

gwolf's picture


I don't know yet. I bought an ESATA-capable disk, but have not yet got a cable for it (am using it as USB2).

stef's picture

Modules lack ?

Hi all :)

Tremendous Thanks Gunnar :)

Some modules appear to be missing, ie WIFI or UTF8 support for CIFS :

$ sudo mount -t cifs //nas/hard\ drive nas/ -o guest,iocharset=utf8,file_mode=0777,dir_mode=0777

mount error(79): Can not access a needed shared library
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

$ sudo lsmod
Module Size Used by

$ sudo modinfo cifs
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.0.35-8/modules.dep.bin'
ERROR: Module alias cifs not found.

$ aptitude search cifs
i cifs-utils - utilitaires du système de fichier CIFS

I've setup my locale (fr_FR.UTF8) and rebuild the index, but I'll try asap to recompile the kernel with the modules

rjc's picture

Gunnar has already mentioned

Gunnar has already mentioned twice that everything is compiled into the kernel[0] and there are no loadable modules to speak of[1].


stef's picture

Gunnar's blog did not show me

Gunnar's blog did not show me the comments when I've posted, but a "Page not found". Not easy to see comments...

Lastly, I was able to see the comments, and yes rjc, twice mentionned.

Despite everything's in the kernel, UTF8 option does NOT work.

Anonymous's picture

The hard way

This worked for me to set up Ru_utf8 locale

Tried the "hard way"

Rainer's picture

Stock Debian Kernel

Hi Gunnar,

thanks for this very useful blog post. I am just wondering: you are still booting a kernel based on a Linux 3.0 Android BSP or are you booting a stock Debian kernel (maybe with some patches applied)?


Scott's picture

Yet another request for WiFi Knowledge

A great many of us have used your image/procedue to get a stable debian install on our cuboxes. Everything works wonderfully, except wifi (for some of us?). I cant help buy feel I'm missing something trivial. Could you perhaps hold our hands and breifly walk us through the steps you took to get your Wifi online? Many of us are still scratching our heads. I know I would buy you a bottle of bourbon!

gwolf's picture

About setting up your Wifi...

I'm sorry... Really! I don't know what should be done to get your Wifi working. I just set up my machine following precisely the instructions I gave in this post, and the Wifi was working from the first moment!

You might want to try installing wicd and wicd-curses, that's the connection manager I've found to be more compatible with my way of interacting with a computer. But besides that, I have no idea on where to point to :-|

(and I'm sorry for not being entitled to a good free bottle of bourbon :( )

George's picture

Wifi in the pre-built image?


First off, big thanks for putting together the image. I have been trying different images since getting my Cubox earlier this week, and yours is the best so far.

Your comments seem to indicate that you have functional wifi. On the image I downloaded, I can get wired Ethernet functional, but I see no trace of the bcm4329 mentioned in the dmesg log. Can you tell me what I need to do to get the bcm4329 wifi to function?


gwolf's picture

Wifi in CuBox-i

I cannot really comment much on that regard... With the 3.0.x kernel I based my image on, it Just Worked™. The kernel is built completely as a monolith, no modules even exist on the install, so there was no need even to look for the existing/supported hardware.

Of course, among my to-do items to update the image and the kernel. I have had no time to play with it. But yes, I'd love to use a more recent kernel.

Michael's picture

WiFi didnt work for me...

WiFi didnt work for me... Configured interfaces with wlan0, but still saying no device. What am I missing?

Kiler's picture

Bluetooth and Wifi

Hi Gunnar,

Have You ever tried to run built Bluetoot and/or Wifi on Your CuBox-i4pro under Debian ?

gwolf's picture

Bluetooth and Wifi

As for Wifi, yes, I routinely connect via Wifi. It worked without a hitch since the first time I tried — The antenna is a bit weak, but works reliably.

As for Bluetooth, I have not tried it.

alsen's picture

Hy Gunnar, I am an italian

Hy Gunnar,

I am an italian Debian user and I tried on my cubx 4p the image that you prepared and is very good to start what one wants!
I would like to use Cubox as an access point under my TV and install a small web server but when I start hostapd with a minimal configuuration with -d option, I get a log with some row with error and a message: Operation non supported.
On cubox forum someone told me that wifi chipset should support ap mode with a specialized firmware, you can see here the post of pepedog.

Is it possible load this specilized firmware from your Debian base version ?
Thanks !

gwolf's picture

Modules in the 3.0.x kernel in the CuBox-i

The kernel I'm using is built with everything it supports compiled in (i.e. compiled with "YES", not with "MODULE"), so there are no loadable modules to speak of. I don't even know if it supports loading modules!

I have not tried building a kernel higher than the one I got (or different at all). Steve Langasek was able to get a stock 3.13 kernel, IIRC, but it was without support for many bits in the CuBox-i's hardware (such as the graphics stack).

Kiler's picture

Bluetooth and Wifi

It's mean that all needed modules are enabled in kernel in the image which You're sharing ? or I have to do that myself ?
It's not simple to run XBMC uder Debian :(

Richard's picture


Thanks for sharing your image.
I loaded it onto an SD and booted.
But I get no networking. The ethernet cable is plugged in, but I get no connection.
dmesg | tail is of no help:
SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E) memory-full-oom-kill(F) kill-all-

gwolf's picture

Networking is not automatic...

What I did there is just to set up the most basic of environments — To set up networking, you have to configure it. First of all, for non-persistent use, you can just issue «dhclient eth0», and it should ask for a DHCP lease over the Ethernet interface. You can also statically assign an address — i.e. ip addr add dev eth0 followed by ip route add default via (of course, with the relevant network addresses).

Of course, you can later specify this in /etc/network/interfaces, or use a connection manager to sense where it is and set up the network accordingly. Many people prefer Network Manager, but my personal preference leans towards wicd (particularly, wicd-curses).

Patrick Werkman's picture

Image available?

Hi Gunnar,

Is it possible to share the situation as you had before the step "First boot" so that it would be only a matter of unzip the necessary files to the SD-card and then run?
I am new to the linux environment and I read your tutorial several times but I can´t make any sense of it (which is fully my unawareness...)

Thanks for your answer!

gwolf's picture

Image available!

Sorry for the delay in responding — It's finally there! Fetch it from my space.

You have to dump your image into a SD card, not just unzip it. The reason for it is that some bits must be in precise locations of the card — including, of course, the first sector (which is outside any of the partitions). In any Unix system, just use dd as shown in the linked page; in Windows-land, you will have to grab it from the Internet. I found one site with dd for windows; I have not yet tested it, but it seems to have the exact same syntax. Of course, make sure you know the right device name for your SD card (or you risk overwriting other things — Including your own operating system!)

rjc's picture


Thank you for taking the time to do that, Gunnar!

Kudos to you.


Anonymous's picture

Default booting debian

Would you care to elaborate on how you can get debian to boot as default on this box?

gwolf's picture

Saving default uboot settings

Sorry for not coming back to you earlier on this — But I must recognize I completely owe the answer to Tricorn, in the CuBox-i forums. Quoting from his reply there,

Note that if you want to save the environment ("save" or "env save", same thing) you'll have to power-cycle after running in Linux, not sure why, but the reboot makes U-Boot think the card is write-locked.

So, as easy as that: Boot your CuBox-i, and:

  1. Hit any key to stop autoboot: 0
  2. CuBox-i U-Boot > printenv root
  3. root=/dev/mmcblk0p1 rootfstype=ext2 ro rootwait
  4. CuBox-i U-Boot > setenv root /dev/mmcblk0p2 rootfstype=ext3 ro rootwait
  5. CuBox-i U-Boot > save
  6. Saving Environment to MMC...
  7. Writing to MMC(0)... done
  8. CuBox-i U-Boot >

You can then either boot into Debian, or unplug the CuBox-i. Next time, it will boot straight into your favorite OS!

Anonymous's picture


Are the drivers for video and all networking running without issue or did you have to hack those in from someplace? I looked at your tutorial, it's great, just want to know before I go to build my own image.

gwolf's picture

Haven't yet tried it...

I have not yet attempted to use it with video... As I said, my main interface is nowadays the serial terminal. I am quite short on time, but I *hope* I can get a thorougher version done soon!

rjc's picture

Hi Gunnar, I have also

Hi Gunnar,

I have also ordered the same model, which is yet to be shipped (I've ordered mine in December but SolidRun "forgot" to mention that they don't have any in stock!), so your writeup is, pretty much, spot on.

Have you tried, or thought of, using Emdebian Grip instead, or is it simply a matter of changing 'sources.list'?

Since it's binary-compatible with Debian "proper" I was thinking of using it to save even more space.

gwolf's picture

Emdebian Grip? Fell out of my radar!

Of course, it could be an interesting thing to try. No, I didn't think about it, but I'll probably try a hand at it!

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <br> <b> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <img> <h1> <h2> <h3> <tt> <pre> <strike> <table> <tr> <th> <td>
  • Lines and paragraphs break automatically.
  • Use <bib>citekey</bib> or [bib]citekey[/bib] to insert automatically numbered references.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Keep in mind that all comments will also have to be administrator-moderated. Don't waste your time writing a spam that no one will read.
Enter the code without spaces and pay attention to upper/lower case.