Skip to content

Instantly share code, notes, and snippets.

@zjhui
Created March 13, 2014 15:45
Show Gist options
  • Save zjhui/9530924 to your computer and use it in GitHub Desktop.
Save zjhui/9530924 to your computer and use it in GitHub Desktop.
在wr720n上利用extroot将openwrt扩容
1、在openwrt上安装block-mount,挂载硬盘时需要它
opkg update
opkg install block-mount
2、挂载硬盘
mount /dev/sda2 /mnt
3、把/目录下的文件迁移到U盘,pivot-root方式,适用于Barrier Breaker(trunk)版本
mkdir -p /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt/ -xf -
umount /tmp/cproot
4、编辑/etc/config/fstab,添加如下配置:
config mount
option target /
option device /dev/sda2
option fstype ext3
option options rw,sync
option enabled 1
option enabled_fsck 0
(如果没有fstab文件,可以用block detect > /etc/config/fstab来生成)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment