How to expand the storage memory on the Yún

Thanks. When I insert it into my laptop, the access light on the card reader (internal card slot, not a USB reader) blinks about once a second, constantly (normally there is a few seconds of fast fluttering, then it only lights while actually being accessed.) The drive never mounts, and a windows never makes the book-beep sound when it is recognized and mounted. But the partitioning software (Paragon Partition Manager) has no trouble reading and displaying the partition data.

Hello all - I am a newbee to the Yun and I am having difficulties expanding the storage memory. I have followed the tutorial, but keep getting various errors. When I load the YunDiskSpaceExpander.ino and walk through the prompts, sometimes I get the message "The micro SD card is not available." Other times I make it through creation of partitions and loading software to the SD card, but then at reboot with YUN RST button, I get error about unable to mount /dev/sda2.

Currently I am stuck at the "...micro SD card is not available" error.

I am using a 2GB SanDisk MicroSD Card and have tried two different cards.

Any ideas?

I got beyond the "... SD card not available" message and this is what I get when I reboot with YUN RST:

Press the [f] key and hit [enter] to enter failsafe mode

  • regular preinit -
    [ 9.600000] JFFS2 notice: (527) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 11 of xref (0 dead, 0 orphan) found.
    [ 11.380000] sd 0:0:0:0: [sda] 3899392 512-byte logical blocks: (1.99 GB/1.85 GiB)
    [ 11.380000] sd 0:0:0:0: [sda] Write Protect is off
    [ 11.390000] sd 0:0:0:0: [sda] No Caching mode page present
    [ 11.390000] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 11.390000] sd 0:0:0:0: [sda] No Caching mode page present
    [ 11.400000] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 11.400000] sda: sda1 sda2
    [ 11.410000] sd 0:0:0:0: [sda] No Caching mode page present
    [ 11.410000] sd 0:0:0:0: [sda] Assuming drive cache: write through
    [ 11.410000] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [ 31.930000] EXT4-fs (sda2): ext4_check_descriptors: Block bitmap for group 0 not in group (block 4294967295)!
    [ 31.930000] EXT4-fs (sda2): group descriptors corrupted!
    mount: mounting /dev/sda2 on /overlay failed: Invalid argument
    switching to jffs2
  • init -

Any ideas here?

Thanks!

otrcomm:
I am using a 2GB SanDisk MicroSD Card and have tried two different cards.

Have you tried putting those cards in another computer, formatting them, copying 2GB of data to them, and then making sure you can read them back?

It's probably not your problem, but there are a lot of counterfeit cards out there. SanDisk is especially susceptible to the unscrupulous counterfeiters because they are such a widely known name. These counterfeit cards often don't work properly, or actually have less memory than stated. These are often sold as "upgraded" cards meaning that they are really smaller cards that have been fudged to report that they contain more memory than is really there. They start out working OK, so people think that all is well. But as the card fills up, it suddenly starts giving them trouble once it reaches the point where there is no more actual memory.

I'm not saying this is your problem. But since the disk expander sketch puts the Linux boot partition at the end of the card's space, problems would show up quickly if it were an "upgraded" counterfeit.

Put the cards in another computer, reformat them, and give them a good workout. If the cards don't work well in the other computer, they won't have a chance of working on the Yun.

ShapeShifter - amitofo - thanks for the comeback. you hit the nail on the head. the "SanDisk" cards were bogus. I tried a MicroSD card and it worked perfectly.

Hmmm... I don't know how to feel about this. I'm happy you got it working, but I'm sad you got stuck with bad cards.

Well it is ok from our stand point since the SanDisks work fine in our UNOs for data acquisition at various water wells that we have. So, now the Yun can be setup as the data acquisition hub on the internal network and send out sms messages if critical events occur.

:cry:
When I do the expand storage tutorial, opkg update procee failed.

When I run the cmd "opkg update", connection to the server seems failed.

root@Arduinoyunzhang:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Collected errors:


I also can not acess the URL from my Chrome Browser. I am at Beijing, China.
Any surgestions? Thank you.

I think that error is usually due to an Internet connectivity problem. Given that you can't access the URL from Chrome, I think that clinches it. The problem doesn't appear to be with the Yun or opkg, but rather with your Internet connection. Until you can download http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig with your browser, I wouldn't worry too much about trying to do it with the Yun.

I would like some clarification, although the answer may be painfully obvious: What exactly is moved on to the new root partition that you create? Is it only the files that you yourself create, or does it move other important files as well? In other words, in the future, what would I need to do if I lose the SD card or need to use a larger one?

EDIT: jessemonroy650, your probably right. I'll post/research in the future if I need to

SoUpY:
I would like some clarification, although the answer may be painfully obvious: What exactly is moved on to the new root partition that you create? Is it only the files that you yourself create, or does it move other important files as well? In other words, in the future, what would I need to do if I lose the SD card or need to use a larger one?

SoUpY,
Please start a new thread. This is off topic for this thread.

Jesse

I don't know, I don't think it's that far of topic, at least not for a quick answer:

SoUpY:
What exactly is moved on to the new root partition that you create?

The entire Linux file system is moved over.

what would I need to do if I lose the SD card or need to use a larger one?

Repeat the whole process - but first do a quick edit to the fstab of the on-board file system to undo the expansion. (See the "if you encounter any error" section of THIS POST.)

iamadog3333:
:cry:
When I do the expand storage tutorial, opkg update procee failed.

When I run the cmd "opkg update", connection to the server seems failed.

root@Arduinoyunzhang:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Collected errors:


For Chinese guys, if Internet blocked, use the Files: 百度云盘
http://yun.baidu.com/share/link?shareid=840462841&uk=1950281063

Thanks to Angelo9999.

I also can not acess the URL from my Chrome Browser. I am at Beijing, China.
Any surgestions? Thank you.

iamadog3333:
:cry:
When I do the expand storage tutorial, opkg update procee failed.

When I run the cmd "opkg update", connection to the server seems failed.

root@Arduinoyunzhang:~# opkg update
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz.
Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.
Signature check failed.
Remove wrong Signature file.
Collected errors:


I also can not acess the URL from my Chrome Browser. I am at Beijing, China.
Any surgestions? Thank you.

For Chinese guys, if Internet blocked, use the Files: 百度云盘

Thanks to Angelo9999.

And use this method:
nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz local file:////mnt/sda1/openwrtyun
opkg update

Thanks to sonnyyu.
Setup local packages repository - #5 by sonnyyu - Arduino Yún - Arduino Forum

http://forum.arduino.cc/index.php?topic=292286.0

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 :slight_smile: the Arduino's memory cannot be in crease.

Hi,

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