Setup local packages repository

In case no internet or deploying a large number of Yun. The local packages repository will help..

Mount Micro SD card with Yun, 230MB available space will be needed.

mkdir -p /mnt/sda1/packages
cd /mnt/sda1/packages

wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages
wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig
wget http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz

cat Packages | grep "Filename: " >downloadfile.txt
sed -i 's/Filename: /http:\/\/downloads.arduino.cc\/openwrtyun\/1\/packages\//g' downloadfile.txt
wget -i downloadfile.txt

after ~20 mins , 3030 files will be downloaded to Micro SD card.

Change feed to local:

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

take cab to airport, get on board and happy programming Yun.

Very nice!

At debian using aria2 to download with multiple simultaneous connections

apt-get install -y aria2

Download with 16 simultaneous connections:

time aria2c -x 16 -i  downloadfile.txt
Status Legend:
(OK):download completed.

real    2m33.657s
user    0m3.644s
sys     0m5.772s

Much quicker than 20mins.

tar -cvzf openwrtyun.tar.gz openwrtyun

Upload openwrtyun.tar.gz into https://www.dropbox.com

At Yun:

Download openwrtyun.tar.gz:

wget -O openwrtyun.tar.gz https://www.dropbox.com/s/ilfb7hainhq9r0o/openwrtyun.tar.gz?dl=0 --no-check-certificate
root@Arduino:/mnt/sda1# md5sum openwrtyun.tar.gz
f4351fcf4ebeda3eec702fa98812cf96  openwrtyun.tar.gz

Make sure md5 hash is f4351fcf4ebeda3eec702fa98812cf96

tar -xvzf openwrtyun.tar.gz
nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz local file:////mnt/sda1/openwrtyun
opkg update

For person in China:

http://pan.baidu.com/s/1jGIcLIu

download openwrtyun.tar.gz into PC

Then use winscp ( Select SCP protocol) to upload to Yun:

http://winscp.net/eng/download.php

root@Arduino:/mnt/sda1# md5sum openwrtyun.tar.gz
f4351fcf4ebeda3eec702fa98812cf96  openwrtyun.tar.gz

Make sure md5 hash is f4351fcf4ebeda3eec702fa98812cf96

Dear sonnyyu, I am using goagent. I thought I could across the "wall" that blocks the internet. Actually, Too young too simple. I can not use the cmd "opkg updat" online.

Your offline method worked for me.

Thanks a lot!

sonnyyu: For person in China:

http://pan.baidu.com/s/1pJ3Fz9T

download openwrtyun.tar.gz into PC

Then use winscp ( Select SCP protocol) to upload to Yun:

http://winscp.net/eng/download.php

It seems tha both Packages.gz and Packages.sig needed. But there is not enough files in your Baidu Yun. Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz. Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.

iamadog3333: It seems tha both Packages.gz and Packages.sig needed. But there is not enough files in your Baidu Yun. Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.gz. Downloading http://downloads.arduino.cc/openwrtyun/1/packages/Packages.sig.

Thank you for point it out. I re-upload the file to baidu and also list md5 hash. Please try it again.

Hi sonnyyu, Your baidu yun link broken. May be you should post out a new link.

The link is updated.

@sonnyyu
I have downloaded the baidu file, but when I scp to Yun, I get an error as I don’t have much space.
Should I copy the image to the microSD card? I don’t understand the process, could you clarify?
Thanks

Expand the Yún disk space:

Arduino way(overlay):

Linux way(root):

Multiple partitions(root):

I copied to another microSD and it is ok now.

I changed the text file

nano /etc/opkg.conf

src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages

src/gz local file:////mnt/sda1/openwrtyun opkg update

But I get:

root@Arduino:/mnt/sda1# opkg update Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.

Use overlay or root expansion will make your life much easy.

Using the YunDiscSpaceExpander sketch, I get this:

Ready to install utility software. Please ensure your Arduino Yun is connected to internet. Ready to proceed (yes/no)? yes Updating software list... err. with opkg, check internet connection

(btw, board is online, I checked)

Again, no opkg packages are coming whatsoever. I have no clue how to update. I have tried for two days all solutions I could find!!!

Linux way(root).

I get this when I try to fdisk on the Yun:

root@Arduino:~# fdisk /dev/sda
-ash: fdisk: not found
root@Arduino:~#

Why? :’(

For person in China:

http://pan.baidu.com/s/1jGIcLIu

download openwrtyun.tar.gz into PC

uncompress openwrtyun.tar.gz use winscp copy "e2fsprogs_1.42.4-1_ar71xx.ipk" and "fdisk_2.21.2-1_ar71xx.ipk" into Yun.

opkg install fdisk_2.21.2-1_ar71xx.ipk
opkg install  e2fsprogs_1.42.4-1_ar71xx.ipk

Plan B:

Setup local web server for packages repository (Centos,Redhat,Fedora) :

cd /var/www/html
mkdir -p openwrtyun/1/packages
cd openwrtyun/1/packages
wget -O openwrtyun.tar.gz https://www.dropbox.com/s/ilfb7hainhq9r0o/openwrtyun.tar.gz?dl=0
tar -xvzf openwrtyun.tar.gz
cd openwrtyun 
mv * ../
cd ..
ls

open browser

http://192.168.0.64/openwrtyun/1/packages

At Yun

nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz attitude_adjustment http://192.168.0.64/openwrtyun/1/packages
opkg update

Setup local web server for packages repository (Debian, Ubuntu):

cd /var/www
mkdir -p openwrtyun/1/packages
cd openwrtyun/1/packages
wget -O openwrtyun.tar.gz https://www.dropbox.com/s/ilfb7hainhq9r0o/openwrtyun.tar.gz?dl=0 --no-check-certificate
tar -xvzf openwrtyun.tar.gz
cd openwrtyun 
mv * ../
cd ..
ls
sudo chown  www-data:www-data -R /var/www
sudo etc/init.d/apache2  restart

open browser

http://192.168.0.81/openwrtyun/1/packages

at Yun

nano /etc/opkg.conf
#src/gz attitude_adjustment http://downloads.arduino.cc/openwrtyun/1/packages
src/gz attitude_adjustment http://192.168.0.81/openwrtyun/1/packages
opkg update

Ok I found the problem.

Although the baidu file downloaded and extracted fine, for some reason it didn't include all files inside. I re-downloaded and re-extracted, and I was able to use it after I did an update of the Yun (YunSysupgradeImage_v1.5.3).

Now everything works fine.

Thank you @sonnyyu for all the help and for your effort on this.