Plug in USB flash driver or USB Hard Driver, The size up to 4TB.
Install software:
opkg update opkg install bash opkg install wget
wget -O draginosd.sh https://www.dropbox.com/s/9uzsuzsum3i4nan/draginosd.sh?dl=0 --no-check-certificate
/bin/bash draginosd.sh
root@dragino:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 62404056 1094332 58183964 2% / /dev/root 8960 8960 0 100% /rom tmpfs 30560 108 30452 0% /tmp tmpfs 512 0 512 0% /dev /dev/sda1 62404056 1094332 58183964 2% /
nano draginosd.sh
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 delete fstab.@mount[0]
uci delete fstab.@mount[0]
uci delete fstab.@mount[0]
uci delete fstab.@swap[0]
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
Comments powered by CComment