More often then not, there is a limited amount of storage space available on embedded devices. While the available flash memory will usually accomodate a bare OpenWrt installation, more room for applications and data can tremendously expand a device's potential. Luckily, many of these devices have these expansion capabilities built-in, for example in the form of USB ports, SATA ports, PCIexpress slots, or even storage in a network location. However, many of the applications you want to install are developed with the idea that they should be installed in the root file system (rootfs).
By employing OpenWrt's extroot, you can expand the storage capacity of your root file system using the additional space of an added storage device. At a certain point in the boot process the external storage space is mounted as the root file system or in an overlay configuration over the original file system. To understand the technical details of OpenWrt extroot, please read extroot.theory. This article explains how to get it to work (wiki.openwrt.org)
Format FD to ext2 using mini tool partition wizard home edition, 100mb linux swap, adding some addtional virtual RAM.
(http://tplinkmr3020.blogspot.com/)
now plug in your flashdrive to device
install requirement packet
opkg install block-mount
opkg install kmod-usb-storage
opkg install kmod-fs-ext4
now edit the fstab configuration, by typing it on command line
vi /etc/config/fstab
config global automount
option from_fstab 1
option anon_mount 1
config global autoswap
option from_fstab 1
option anon_swap 0
config mount
option target /home
option device /dev/sda1
option fstype ext4
option options rw,sync
option enabled 0
option enabled_fsck 0
config swap
option device /dev/sda2 -> this is our 100mb swap that we already created
option enabled 1 -> enabled it
config mount
option device /dev/sda3 -> this is our ext2 formated usb that we already created
option target /mnt/usb -> i mount it on /mnt/usb
option enabled_fsck 0
option options rw,sync -> mount with read and write + sync
option enabled 1 -> enabled it
option is_rootfs 1 -> to make extroots
(from http://tplinkmr3020.blogspot.com/)
Save the configuration by pressing esc and type :wq
Remove the Flash Drive from device
Restart MR3020 by typing reboot
Plug in the Flash Drive to Device
Copy the system to Flash Drive by typing
tar -C /overlay -cvf - . | tar -C /mnt/usb/ -xf -
restart device again
type df
done
thanks to http://tplinkmr3020.blogspot.com/
Assalamualaikum Wr. Wb.
No comments:
Post a Comment