Board logo

標題: 【OpenWRT】—— TL-WR1043ND USB port for expansion of root file system [打印本頁]

作者: 角色    時間: 2013-11-23 19:59     標題: 【OpenWRT】—— TL-WR1043ND USB port for expansion of root file system

本帖最後由 角色 於 2013-11-23 20:30 編輯

因为系统的ROM Flash只有8M,如果要安装很多packages,那么8M Flash就不够了。我们可以通过USB 2.0的port,然后安装flash drive后,通过适当的settings,那么就可以安装很多packages了。

[attach]2971[/attach]

Root file system只有4.78M剩余。
作者: 角色    時間: 2013-11-23 20:29

本帖最後由 角色 於 2013-11-23 20:56 編輯

1. Install the following packages
  1. opkg update
  2. opkg install kmod-usb-storage block-mount block-hotplug kmod-fs-ext4 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
複製代碼
Ignore the error messages
  1. Collected errors:
  2. * opkg_install_cmd: Cannot install package block-hotplug.
複製代碼
2. Install additional package to give mkfs.ext4 from the package e2fsprogs
  1. opkg e2fsprogs
複製代碼
3. Insert the USB flash drive at the rear of the router

4. Reboot the system

5. Using SSH to enter the system and format the flash drive using the following command
  1. root@OpenWrt:/dev# mkfs.ext4 /dev/sda1
  2. mke2fs 1.42.4 (12-June-2012)
  3. Filesystem label=
  4. OS type: Linux
  5. Block size=4096 (log=2)
  6. Fragment size=4096 (log=2)
  7. Stride=0 blocks, Stripe width=0 blocks
  8. 486720 inodes, 1944576 blocks
  9. 97228 blocks (5.00%) reserved for the super user
  10. First data block=0
  11. Maximum filesystem blocks=1992294400
  12. 60 block groups
  13. 32768 blocks per group, 32768 fragments per group
  14. 8112 inodes per group
  15. Superblock backups stored on blocks:
  16.         32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

  17. Allocating group tables: done
  18. Writing inode tables: done
  19. Creating journal (32768 blocks): done
  20. Writing superblocks and filesystem accounting information: done

  21. root@OpenWrt:/dev#
複製代碼
6. Using a browser to enter the GUI of the router. Go to [System]->[Mount Points]
[attach]2972[/attach]

7. Edit the device and select the option "Use as filesystem". Afterward, click the command "Save"
[attach]2973[/attach]

8. Check the mount points again to see whether the following figure you have. Enable this mount point and followed by "Save & Apply" command.
[attach]2974[/attach]

9. Reboot the system and flash drive becomes the root filesystem. The size of remaining file system for package installation is increased from 4.78M to 7.16G
[attach]2975[/attach]

10. In system using SSH, the system message of mounting device is
  1. root@OpenWrt:~# df
  2. Filesystem           1K-blocks      Used Available Use% Mounted on
  3. rootfs                 7753428    245596   7118920   3% /
  4. /dev/root                 2048      2048         0 100% /rom
  5. tmpfs                    30852       580     30272   2% /tmp
  6. tmpfs                      512         0       512   0% /dev
  7. /dev/sda1              7753428    245596   7118920   3% /overlay
  8. overlayfs:/overlay     7753428    245596   7118920   3% /
  9. root@OpenWrt:~#
複製代碼

作者: Skypeus    時間: 2013-11-23 20:47

赞一个。




歡迎光臨 電訊茶室 (http://telecom-cafe.com/forum/) Powered by Discuz! 7.2