Go Down

Topic: How to expand the storage memory on the Yún (Read 33667 times) previous topic - next topic


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? http://www.arduino.cc/en/Tutorial/ExpandingYunDiskSpace

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 http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
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?


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/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: Operation not permitted

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude: line 6: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: Permission denied

/Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude: line 6: exec: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude_bin: 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!


Hey Guys, I had some of the same issues using a 16GB Samsung EVO, the program keeps freezing on the Partition and Format part of the code, Even when it seems like the YUN is compatible with this SD card, the command to format and/or partition clocks even when using SSH.
After lots of trial and error, I finally got it working, this is what I did:

I Basically all commands on the SSH (putty) console.
I will skip the ones that Federico's wrote for error checking and when directly to

opkg update
opkg install e2fsprogs mkdosfs fdisk rsync

after this comes the Partition and Format, what i did was partition the SD card on my Laptop, since I made the horrible mistake to upgrade to Windows 10 and dont want to use my work MAC for this, I used EASYUS  Partition Master, you can also use Partition Magic or a MAC or Linux computer, and basically created 2 partitions, one FAT32 and the other one EXT3 (couldnt find EXT4).

After I formatted the SD card, I put it back on the Arduino YUN and kept on going with the following steps.

mkdir -p /mnt/sda1
mount /dev/sda1 /mnt/sda1
mkdir -p /mnt/sda1/arduino/www
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
rsync -a --exclude=/mnt/ --exclude=/www/sd /overlay/ /mnt/sda2/
umount /dev/sda1
umount /dev/sda2
uci add fstab mount
uci set fstab.@mount[0].target=/overlay
uci set fstab.@mount[0].device=/dev/sda2
uci set fstab.@mount[0].fstype=ext4
uci set fstab.@mount[0].enabled=1
uci set fstab.@mount[0].enabled_fsck=0
uci set fstab.@mount[0].options=rw,sync,noatime,nodiratime
uci commit

after that, I rebooted and now i have the following with df -h / /mnt/sda1

root@yunrafa:~# df -h / /mnt/sda1
Filesystem                Size      Used Available Use% Mounted on
rootfs                    8.8G      7.9M      8.4G   0% /
/dev/sda1                 5.9G     20.0K      5.9G   0% /mnt/sda1

I hope that helps, not sure I i did it correctly.




I'm not able to install a new SD-Card (16 GB).

I get an error saying something like "err. swap disk" (can't remember the exact words).
Before starting the sketch I saw in the webinterface "LuCi" that there is a new SD-Card, called "mnt/sd1" 14.? GB (why not 16 GB ?).

During the installingprocess I choosed 11000 MB for the first and 3000 MB for the second partition.

After the errormessage above, I tried to restart the installprocess but I get an error say "no sd disk" (can't remember the exact words).

Has anyone an idea what I do wrong ?
Is my SD-Card broken now ?

Kind regards


Feb 03, 2016, 12:35 pm Last Edit: Feb 06, 2016, 07:03 pm by _Alain_
I found also this solution which sounds mutch simpler to me.

It does just a few easy steps:

  • Formating the SD Card with FAT (not FAT32) with a partition-software on a desktopcomputer (Important on Windows: Use Formatter to format the SD Card. Do NOT use MiniTool because with MiniTool the Arduino Yun will not find your SD Card and always get offline when you plug in the Card !)
  • Downloading the latest Build of OpenWRT an copy the *.BIN-File to the SD Card.
  • Plugin the SD Card to the Arduino Yun.
  • Reboot Arduinos OpenWRT and go to arduino.local, click RESET. This will update OpenWRT and I guess in the future this will also automatically (?) save any userfiles to the SD Card instead to the internal memory ?

What do you think ? Is this a way to go too ?

Kind regards


Feb 03, 2016, 10:07 pm Last Edit: Feb 04, 2016, 11:53 am by _Alain_
...and now my Arduino Yun is not reachable anymore in the network.
I did reset to factory settings (holding down the WIFI-Reset-Button for 30 secondes) and did also reboot my router but nothing helps.

How can I bring him back to life ?

Edit 04.02.16
Replacing the "YunOverlayOnSD.ino" by the "blink.ino"-Sketch on the Arduino did bring back his heartbeat.


This will update OpenWRT and I guess in the future this will also automatically (?) save any userfiles to the SD Card instead to the internal memory ?
I've not tried doing that, but I would be VERY surprised if that was the case.

There's updating the system software, and there's expanding the disk space (setting up a pivot root on the SD card.) Two very different operations.  I believe what you are describing is simply updating the system software.



Start a new thread, as this is now unrelated to your original issue.
On those directions by Twillio, I use twillio and I did not do something that convoluted.
FWIW: there are several directions available. Please start a new thread.



I do not want to use an SD card at all, since there was a physical problem with my SD card slot. Is it possible to use a USB thumb drive to mount 'overlay'? I suppose it is a matter of altering the sketch to change the relevant paths?


Go Up