How to expand the storage memory on the Yún

Hi. I have tried your tutorial and it works. It partitioned my SD card, but, how come when I compile my sketch the size of it still the same? Does the SD really expand the memory?

It expands the amount of space available on the Linux system drive so that you can install more files into the Linux system. The "memory" it is referencing is the on-board flash memory that is used by Linux as a boot drive.

It has nothing to do with the amount of RAM in the Linux processor, nor does it have anything to do with the amount of RAM, PROGMEM, or EEPROM in the Arduino processor. There is nothing that can be done to increase the amount of these other types of memory.

Carefully re-read the first paragraph of the first post in this thread, it explains the limited scope of this upgrade. It's a very hand thing to do, but it does not affect sketch programming in any way.

I got gcc to work three weeks ago, on three different Arduinos, but now I can't get the SD cards to work correctly. Very annoying.

Once you get the SD cards initialized, and change the /overlay file system as needed (which is done by the memory expansion sketch), then you get to install the gcc environment using opkg.

The main things (from memory): gcc is named (I think) yun-gcc, so you need to do this: opkg install yun-gcc That will not work, so it will then tell you to do a wget, followed by local image install. You also need libc. This should be loaded auto-magically. Finally, you need to install bintools, if you actually want to run the program. Oh, yeah, make would be good to have, too.

dave_98063: I got gcc to work three weeks ago, on three different Arduinos, but now I can't get the SD cards to work correctly. Very annoying. ::::SNIP::::

@dave_98063, this is appears to be off topic. Please start a new thread. It appears you have a gcc install problem. Or something directly related to the actual install.

TIA Jesse

Agreed. New thread will be called something like "Problems with SD card memory expansion"

Will this help me with "the sketch is too big" error message?

Update: I guess I did not read carefully the thread. ShapeShifter explained it all. This hack is for the other side of the "bridge" where Linux lives. So sad :) the Arduino's memory cannot be in crease.


How can we know which packages to delete? And do we have to re-install them after?

Thank for helping.

roadfun: My first Yun conversion went smoothly. But my second one failed (error detailed below). I surmised this was a issues with free space on / (of course that's why I was happy to see this extension scheme). I recalled I was at about 90% before running the conversion script. I removed a couple of packages to get to 83% full on / and re-ran the sketch. It ran correctly.

Bottom line is you may want to ensure you have about 80% free space on / before running this conversion.

Software list updated. Installing software (this will take a while)... err. installing e2fsprogs mkdosfs fdisk

This page has some info on 'opkg'. If you do aopkg list it will show everything that's installed. Look for any optional packages you installed and remove however many you need in order to free up space using opkg remove package_name. Just be careful not to remove the key system packages.

Thank for your reply.

Is it a way to have the default packages list of the board?

Thank you.

To find out default installed packages list at board:

opkg list-installed

Caution "reset-to-factory-anyway" will bring board back to factory default , anything you did will be reset.


I have expanded my Yun with a 8GB microSD card and installed node.js and node-serialport.js, and everything was OK.

The next step was to edit the /etc/inittab, and before doing it I wanted to check whether unplugging the microSD card, I could access SSH via serial port COM with the root file system that is in the flash memory.

Once I was checked that it was Ok. I wanted to plug the microSD card again to work with my Yun expanded, so I unplugged my Yun, plug the microSD card and plug the Yun again and when I enter via SSH and typed:

root@ofcyun:/# df -h / /mnt/sda1 Filesystem Size Used Available Use% Mounted on rootfs 6.9M 1.3M 5.7M 19% / df: /mnt/sda1: can't find mount point root@ofcyun:/#

So it doesn't recognize the microSD card, I don't get errors , and I didn't edit the /etc/config/fstab.

Once I have plugged the microSD card I reboot both the Linux and Arduino parts.

So, Are there something that i have missed?


aabm01: Hello

Please don't cross-post and ask the same question multiple times. It doesn't get your question answered any faster, and it only dilutes the responses by spreading any answers over multiple threads. It just wastes time and effort. I already responded in in your original thread.

Sorry you are right.

When I saw your answer to the other question I took the opportunity to ask the this question and forget delete or redirect this one.

Hi all,

did someones Yun ever show the "Not enough disk space"-Error, while using the diskExpander-Sketch?

I need some help hereby.....

Any idea why I am getting this instead of the windows shown in this tutorial?

Here's what I get:

I am planning to install Node using opkg but I ran out of space so I came across this tutorial but it is not working either. root@Arduino:~# opkg update Downloading Updated list of available packages in /var/opkg-lists/attitude_adjustment. Downloading Signature check passed. root@Arduino:~# opkg install node Installing node (v0.10.33-1) to root... Collected errors: * verify_pkg_installable: Only have 2040kb available on filesystem /overlay, pkg node needs 3016 * opkg_install_cmd: Cannot install package node. root@Arduino:~# df -h Filesystem Size Used Available Use% Mounted on rootfs 6.9M 4.9M 2.0M 71% / /dev/root 7.5M 7.5M 0 100% /rom tmpfs 29.8M 480.0K 29.4M 2% /tmp tmpfs 512.0K 0 512.0K 0% /dev /dev/mtdblock3 6.9M 4.9M 2.0M 71% /overlay overlayfs:/overlay 6.9M 4.9M 2.0M 71% / /dev/sda1 7.3G 46.8M 7.2G 1% /mnt/sda1

Any step-by-step commands that help me increase the step would be really great. My MicroSD card is 8G.

I get this error in my SerialMonitor after I upload the sketch. Any idea what is going wrong?

lamiastella: I get this error in my SerialMonitor after I upload the sketch. Any idea what is going wrong?

I replied in your other thread. (Please don't post the same question in multiple threads, it wastes time and effort.)

Use the USB connection in the Serial Monitor, not a network connection.

I'm having trouble expand the memory to the SD card. I use the IDE version 1.6.5 with Mac OS 10.10.5 (Yosemite). When I try to upload the sketch YunDiskSpaceExpander.ino the following message appears:

O sketch usa 18.526 bytes (64%) de espaço de armazenamento para programas. O máximo são 28.672 bytes. Variáveis globais usam 670 bytes (26%) de memória dinâmica, deixando 1.890 bytes para variáveis locais. O máximo são 2.560 bytes. chmod: Unable to change file mode on /Applications/ Operation not permitted /Applications/ line 6: /Applications/ Permission denied /Applications/ line 6: exec: /Applications/ cannot execute: Undefined error: 0

Can someone help me?

That sounds like a general problem uploading the sketch, and not specific to the disk expander sketch. Are you able to load any other sketches? Maybe try the standard Blink example?

The issue sounds like the problem is on your Mac, and not on the Yun. Perhaps the Arduino software is not installed properly, or you have an account permissions problem? I'm not familiar with the Mac version, so I can't give you any specific help.

Assuming you can't load any sketches, looking through the Installation & Troubleshooting forum might give you some ideas, if not, that is probably a better place to post this problem.

Thank you for your help! You're right. The problem is with any sketch I try upload via USB. Perhaps the problem is with the java version.

I'll keep trying to find a solution.

If anyone can help, I'm still waiting!