打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
openwrt 挂载overlay到U盘 成功
1. Compile the latest trunk with
block-mount
kmod-fs-ext4
kmod-usb-ohci
kmod-usb-storage

To find where these are in the menuconfig type / and you can searchfor them.

2. Upgrade the system: sysupgrade -v/path/to/file/openwrt.router-sysupgrade.bin

3. Run block info and find out what /dev/sdx is your usb
Then run:
mkfs.ext4 /dev/sda1 (you will need to install e2fsprogs forthis)
mount /dev/sda1 /mnt
mkdir /tmp/cproot
mount --bind / /tmp/cproot
tar -C /tmp/cproot -cvf - . | tar -C /mnt -xvf -
sync ; umount /mnt
umount /tmp/cproot

4. After this run:
block detect > /etc/config/fstab
nano /etc/config/fstab (install nano if you dont have it or use vi/etc/config/fstab)
and modify the target line and option enabled line so that it lookslike this:
config 'global'
option anon_swap      '0'
option anon_mount     '0'
option auto_swap      '1'
option auto_mount     '1'
option delay_root     '0'
option check_fs       '0'

config 'mount'
option  target  '/'
option uuid   '7d3abfaf-493a-46bb-9730-1d793ecb9783'
option  enabled '1'

config 'swap'
option uuid   '76d36596-5710-4b77-a3a7-02a66d469750'
option  enabled '1'

5. Reboot

6. Here's proof that it works

_______                    ________       __
     |.-----.-----.-----.|  |.----.|  |_
   || -__|    || ||  _||   _|
|_______||  __|_____|__|__||________||__|  |____|
|__| W I R E L E S S   F R E E DO M
-----------------------------------------------------

-----------------------------------------------------
* 1/2 ozGalliano        Pour all ingredients into
* 4 oz coldCoffee       an irish coffee mug filled
* 1 1/2 oz DarkRum      with crushed ice. Stir.
* 2 tsp. Creme de Cacao
-----------------------------------------------------

root@OpenWrt:/# df -h
Filesystem               Size     Used Available Use% Mounted on
rootfs                   7.1G   144.3M     6.6G   2% /
/dev/root                4.8M     4.8M        0 100% /rom
tmpfs                   30.2M    88.0K    30.1M   0% /tmp
/dev/sda1                7.1G   144.3M     6.6G   2% /overlay
overlayfs:/overlay       7.1G   144.3M     6.6G   2% /
tmpfs                  512.0K          512.0K   0% /dev

---------------------------------------------------------------

blkid  和 block 命令 这两个要有.

示例输出:

# blkid
/dev/mtdblock2: TYPE="squashfs"
/dev/sda1: UUID="27030164-f77c-40c0-b495-995c708eaf20"TYPE="ext4"
/dev/sda2: UUID="23831c8f-9fba-4c59-9fa9-b8c5195f61b0"TYPE="ext4"
/dev/sda3: TYPE="swap"
@HeAvEn-Router:/root# block detect
config 'global'
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '0'
option check_fs '0'

config 'mount'

option target '/mnt/sda1'
option uuid '27030164-f77c-40c0-b495-995c708eaf20'
option enabled '0'
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
[Openwrt 项目开发笔记]:USB挂载& U盘启动(三)
OpenWRT配置及应用
LINUX 查看分区UUID的两种方法 .
openwrt 自动挂载U盘、移动硬盘
openwrt挂载USB存储设备(openwrt官方wikin内容,有更新点"文章来源")
USB存储 [OpenWrt Wiki]
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服