Go Down

Topic: Expand the storage by SD card/USB flash/USB hard drive for Yun & compatible (Read 4832 times) previous topic - next topic

sonnyyu

Recover bricked expanded Yun

turn off
take micro SD out
turn on

Code: [Select]
reset-to-factory-anyway
reboot


after Yun complete started
turn off
put micro SD back
turn on


Code: [Select]
wget -O simplesd.sh https://www.dropbox.com/s/jl4oytptxrb6q5u/simplesd.sh?dl=0 --no-check-certificate
/bin/ash simplesd.sh









sonnyyu

Revert back to boot from internal flash:

Code: [Select]
wget -O reset.sh https://www.dropbox.com/s/4g1yfpnas25cepn/reset.sh?dl=0 --no-check-certificate

Code: [Select]
/bin/ash reset.sh





sonnyyu

Code: [Select]
nano reset.sh

Code: [Select]
/bin/mkdir -p /mnt/mtdblock3
/bin/mount -t jffs2 /dev/mtdblock3 /mnt/mtdblock3
/usr/bin/head -n 9  /mnt/mtdblock3/etc/config/fstab > /tmp/fstab
/bin/mv /tmp/fstab /mnt/mtdblock3/etc/config/
/sbin/reboot






lamiastella

wget -O simplesd.sh https://www.dropbox.com/s/jl4oytptxrb6q5u/simplesd.sh?dl=0 --no-check-certificate
/bin/ash simplesd.sh

--------------------------
result after running it:
./.gnupg/secring.gpg
./.extroot.md5sum
cfg044d78
root@Arduino:~# Write failed: Broken pipe
Monas-MacBook-Pro:~ mona$ ssh root@192.168.1.148
ssh: connect to host 192.168.1.148 port 22: Host is down

What should I do now?

sonnyyu

wget -O simplesd.sh https://www.dropbox.com/s/jl4oytptxrb6q5u/simplesd.sh?dl=0 --no-check-certificate
/bin/ash simplesd.sh

--------------------------
result after running it:
./.gnupg/secring.gpg
./.extroot.md5sum
cfg044d78
root@Arduino:~# Write failed: Broken pipe
Monas-MacBook-Pro:~ mona$ ssh root@192.168.1.148
ssh: connect to host 192.168.1.148 port 22: Host is down

What should I do now?
192.168.1.148 is wifi's ip address or ethernet address?

after run simplesd.sh the Yun will be back to factory default state, i.e. ethernet port has ip address  from system router DHCP release pool and wifi port has "192.168.240.1". The WIFI  port is at ap for Access Point mode.






sonnyyu

http://www.arduino.cc/en/Tutorial/YunSerialTerminal

Load YunSerialTerminal sketch from IDE file->example->bridge->YunSerialTerminal then
type:

Code: [Select]
ifconfig


to find out ip address.




Luis_Filipe

My Yun Shield not have a SD card.


What is the correct form to expand the space to a USB drive attached to her?


The last Release, please.



Thanks in advance

sonnyyu

My Yun Shield not have a SD card.


What is the correct form to expand the space to a USB drive attached to her?


The last Release, please.



Thanks in advance
Yes

zeeHacker

Thanks sonnyyu...First script worked great for me!..Really helped me so I guess I'm the first one to show my appreciation...

zeeHacker


zallesov

Thax for this script. First I've tried just copying commands from here from the code https://www.arduino.cc/en/Tutorial/ExpandingYunDiskSpace

but this way is much easier.

I used
Quote
wget -O expand.sh https://www.dropbox.com/s/x2zhfqr4ssfetz1/expand.sh?dl=0 --no-check-certificate
and it seems to work. Other scripts may too.
Still I had to
Quote
mkfs.ext4 /dev/$driver
and
Quote
mount  /dev/sda1  /mnt/sda1
after reboot.

Roque Campos

Hi,

I'm using your script as part of an automated installation process and I wonder if there is a way to check in a bash script, if the storage was already expanded, to avoid to execute the process more than one time.

Any help is appreciated.

Thanks


sonnyyu

Hi,
I'm using your script as part of an automated installation process and I wonder if there is a way to check in a bash script, if the storage was already expanded, to avoid to execute the process more than one time.
Any help is appreciated.
Thanks
http://www.ibuyopenwrt.com/index.php/11-yun-compatible/expand-the-storage-at-yun/18-expand-the-storage

Code: [Select]
if fdisk -l |grep /dev/sda > /dev/null; then
   echo "Start"
else
   echo "/dev/sda not found!"
   exit 0
fi








Go Up