Go Down

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


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

I just used your steps to expand an Arduino Dragino Yun Shield, and they worked, but the first time I tried them they didn't. Not exactly sure, but I suspected maybe I had to disable the already mounted overlay device (which in my case was /dev/mtdblock3). So before entering your uci commands, I did:

uci add fstab mount
uci set fstab.@mount[0].device=/dev/mtdblock3
uci set fstab.@mount[0].enabled=0
uci commit

As I said, not really sure this was an issue, but the second time I tried this and it worked.

Otherwise, your solution worked fine, thanks!


The SD card expansion procedure for Arduino Yún Rev 2 does not seem to work (for me, at least).

The SD card becomes available, but the Yún does not run Linux from it nor does it let me install packages on it, so I am left with very little space for software.

Also, it seems that the software does not get very frequent updates. Is there an alternative?

I get this error message in the serial console (see log below):

*** Warning - bad CRC, using default environment

The Yún runs LEDEYun 17.11, r6773+1-8dd3a6e (came pre-installed) and I am using a 16 gig SD card from Kingston.

I have followed the guide here:

The guide states:
"You can use external memory like a microSD card or thumb drive for saving data, or your own scripts, web pages, etc. For the Yún rev. 2 to access and store information on these drives through the 32U4, they need to have a directory named arduino in the root of the volume. If you plan to use a microSD memory card, you can expand the Yun Disk Space following this tutorial."

Said tutorial has a link for the Rev 2 and states that I can install packages and run the system from the SD card.

I followed the tutorial, and used this sketch:

Here is the entire log from the serial console (redacted for privacy):

This sketch will format your micro SD card and use it as additional disk space for your Arduino Yun.
Please ensure you have ONLY your micro SD card plugged in: no pen drives, hard drives or whatever.
Do you wish to proceed (yes/no)? yes

Starting Bridge...

Ready to install utility software. Please ensure your Arduino Yun is connected to internet.
Ready to proceed (yes/no)? yes
Updating software list...
Software list updated. Installing software (this will take a while)...
e2fsprogs dosfstools fdisk rsync kmod-fs-ext4 installed

Proceed with partitioning micro SD card (yes/no)? yes
Enter the size of the data partition in MB: 6000
Partitioning (this will take a while)...
Micro SD card correctly partitioned

Creating 'arduino' folder structure...
Copying files from Arduino Yun flash to micro SD card...
Enabling micro SD as additional swap... enabled

Enabling micro SD as additional disk space... enabled

We are done! Yeah! Rebooting to apply the changes.reboot
root@Arduino:~# [ 4329.066125] wlan0: deauthenticating from [Redacted: mac address] by local choice (Reason: 3=DEAUTH_LEAVING)
[ 4332.215945] Removing MTD device #5 (rootfs_data) with use count 1
[ 4332.238119] reboot: Re⸮

U-Boot 1.1.5-linino-g2d891225 (Nov 22 2017 - 09:06:12)

Linino Board (ar9331) U-boot
DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 218k for U-Boot at: 83fc8000
Reserving 192k for malloc() at: 83f98000
Reserving 44 Bytes for Board Info at: 83f97fd4
Reserving 36 Bytes for Global Data at: 83f97fb0
Reserving 128k for boot params() at: 83f77fb0
Stack Pointer at: 83f77f98
Now running in RAM - U-Boot at: 83fc8000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16777216, sector count = 256
Flash: 16 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   eth0: [Redacted: mac address]
eth1: [Redacted: mac address]
eth0, eth1
autoboot in 4 seconds (stop with 'ard')...
## Booting image at 9f050000 ...
  Image Name:   MIPS LEDEYun Linux-4.9.91
  Created:      2018-04-27   9:20:02 UTC
  Image Type:   MIPS Linux Kernel Image (lzma compressed)
  Data Size:    1471362 Bytes =  1.4 MB
  Load Address: 80060000
  Entry Point:  80060000
  Verifying Checksum at 0x9f050040 ...OK
  Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.9.91 (arduino@openwrt-yun) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6773-8dd3a6e) ) #0 Tue Apr 24 17:17:07 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9330 rev 1

... Redacted because of message size restrictions on the forum.

Go Up