OpenWrtExtRoot

OpenWrt: not enough disk

ImageBuilder

wget https://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64.tar.bz2
apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc wget
tar -xvjf OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64.tar.bz2

/home/jody/Openwrt/OpenWrt-ImageBuilder-15.05.1-ar71xx-generic.Linux-x86_64/target/linux/ar71xx/generic/profiles/tp-link.mk


define Profile/TLMR10U
        NAME:=TP-LINK TL-MR10U
        PACKAGES:= block-mount blkid kmod-usb-storage-extras kmod-usb-core kmod-usb2 kmod-fs-ext4 kmod-usb-storage fstools kmod-usb-serial-ftdi kmod-usb-serial-pl2303 kmod-usb-serial-ch341 kmod-usb-serial kmod-usb-serial-cp210x kmod-usb-acm usb-modeswitch kmod-mii kmod-usb-net kmod-usb-wdm kmod-usb-net-qmi-wwan uqmi
endef
make image PROFILE=TLMR10U

Configure package url for barrier breaker

src/gz barrier_breaker http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay

This one for Chaos Calmer

root@OpenWrt:/# cat /mnt/sda1/etc/opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base
src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/luci
src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/management
src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/packages
src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/routing
src/gz chaos_calmer_telephony http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/telephony

Use an external USB key

see: http://wiki.openwrt.org/doc/howto/extroot

you need a key with an ext4 partition, vfat will not work.

You can create your partition on your desktop, but It seems better to format it on your OpenWrt router

tools required:

opkg install e2fsprogs

or:

#opkg install e2fsprogs  kmod-usb-storage block-mount kmod-fs-ext4 kmod-scsi-generic

opkg install fstools  kmod-usb-storage block-mount kmod-fs-ext4 kmod-scsi-core
cat /proc/partitions
mkfs.ext4 /dev/sda1
mkdir /mnt/sda1 && touch  /mnt/sda1/USB_DISK_NOT_PRESENT && chown root:root -R  /mnt/sda1 &&  chmod 555 -R /mnt/sda1 && chmod 444  /mnt/sda1/USB_DISK_NOT_PRESENT

mount sda1 to /mnt/sda1

mount /dev/sda1 /mnt/sda1

then copy files:

mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf -
umount /tmp/cproot

Note, other required packages:

opkg install kmod-usb-storage block-mount kmod-fs-ext4 block-hotplug