Revert boot to internal flash:

wget -O reset.sh https://www.dropbox.com/s/4g1yfpnas25cepn/reset.sh?dl=0 --no-check-certificate
/bin/ash reset.sh
nano reset.sh
/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



Plan B:

Shutdown Yun, take out flash then restart Yun.

nano /etc/config/fstab



Remove this block code:

config mount
        option target '/'
        option device '/dev/sda1'
        option fstype 'ext4'
        option enabled '1'
        option enabled_fsck '0'
        option options 'rw,sync,noatime,nodiratime'

restart Yun.

Plan C:

Shutdown Yun, take out flash then restart Yun.

uci delete fstab.@mount[0]
uci commit



restart Yun.

 

 

 

 

Write comment (0 Comments)

For  USB flash size >= 64GB here is revision code.

opkg update
opkg install bash
wget -O newexpand.sh https://www.dropbox.com/s/jnrwhrc0dhjynyp/newexpand.sh?dl=0 --no-check-certificate
/bin/bash newexpand.sh sdb

"newexpand.sh" code: 

if [ -n "$1" ]; then
device=$1
else
device="sda"
fi
driver=$device"1"
opkg update
opkg install e2fsprogs fdisk
if fdisk -l |grep /dev/$device > /dev/null; then
    echo "Start"
else
    echo "/dev/$device not found!"
    exit 0
fi
dd if=/dev/zero of=/dev/$device bs=1M count=10
(echo n; echo p; echo 1;  echo;  echo; echo w)  | fdisk /dev/$device
umount -f  /mnt/$driver
mkfs.ext4 /dev/$driver
mkdir -p /mnt/$driver
mount  /dev/$driver  /mnt/$driver
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/$driver  -xf -
umount /tmp/cproot
uci add fstab mount
uci set fstab.@mount[0].target=/
uci set fstab.@mount[0].device=/dev/$driver
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
reboot

 

 

 

 

Write comment (0 Comments)

Revision script:

opkg update
opkg install bash
wget -O expand.sh https://www.dropbox.com/s/x2zhfqr4ssfetz1/expand.sh?dl=0 --no-check-certificate



for micro SD card:

/bin/bash expand.sh

or 

/bin/bash expand.sh sda



for USB flash:

/bin/bash expand.sh sdb

 for USB hard disk :

/bin/bash expand.sh sdc

 "expand.sh" code:

 

if [ -n "$1" ]; then
device=$1
else
device="sda"
fi
driver=$device"1"
opkg update
opkg install e2fsprogs fdisk
if fdisk -l |grep /dev/$device > /dev/null; then
    echo "Start"
else
    echo "/dev/$device not found!"
    exit 0
fi
dd if=/dev/zero of=/dev/$device bs=4096 count=10
(echo n; echo p; echo 1;  echo;  echo; echo w)  | fdisk /dev/$device
umount -f  /mnt/$driver
mkfs.ext4 /dev/$driver
mkdir -p /mnt/$driver
mount  /dev/$driver  /mnt/$driver
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/$driver  -xf -
umount /tmp/cproot
uci add fstab mount
uci set fstab.@mount[0].target=/
uci set fstab.@mount[0].device=/dev/$driver
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
reboot

 

 

 

 

 

 

Write comment (0 Comments)
  1. Put Micro SD card into slot or plug in  USB flash
  2. Run
wget -O simplesd.sh https://www.dropbox.com/s/jl4oytptxrb6q5u/simplesd.sh?dl=0 --no-check-certificate
/bin/ash simplesd.sh
nano simplesd.sh
opkg update
opkg install e2fsprogs fdisk
if fdisk -l |grep /dev/sda > /dev/null; then
    echo "Start"
else
    echo "/dev/sda not found!"
    exit 0
fi
dd if=/dev/zero of=/dev/sda bs=4096 count=10
(echo n; echo p; echo 1;  echo;  echo; echo w)  | fdisk /dev/sda
umount -f  /mnt/sda1
mkfs.ext4 /dev/sda1
mkdir -p /mnt/sda1
mount  /dev/sda1 /mnt/sda1
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot
uci add fstab mount
uci set fstab.@mount[0].target=/
uci set fstab.@mount[0].device=/dev/sda1
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
reboot

 

 

 

Write comment (0 Comments)