• 首页
  • 邻居
  • 关于
  • 归档
  • 搜索
  • 夜间模式
    ©2020-2026  我的学习笔记 Theme by OneBlog

    我的学习笔记博客

    搜索
    标签
    # 随笔 # Java # 教程 # openwrt # Mysql # SQL # 爬虫 # post # Js调优 # MAVEN
  • 首页>
  • 随笔>
  • 正文
  • openwrt扩容导出根目录到u盘

    2023年07月05日 1.9 k 阅读 0 评论 1604 字

    usb.sh:

    mkdir -p /tmp/introot && 
    mkdir -p /tmp/extroot && 
    mount --bind / /tmp/introot && 
    mount /dev/sda1 /tmp/extroot && 
    tar -C /tmp/introot -cvf - . | tar -C /tmp/extroot -xf - && 
    umount /tmp/introot && 
    umount /tmp/extroot && 
    echo "success"
    nohup sh usb.sh > log_out.txt 2>&1 & 

    查看执行日志:

    tail -f log_out.txt

    /etc/fstab 只读无法修改的解决办法

    重新挂载为读写文件系统

     mount -o remount,rw / 

    修改/etc/config/fstab文件

    删除默认的mount信息

    
    config global
        option anon_swap '0'
        option anon_mount '1'
        option auto_swap '1'
        option auto_mount '1'
        option delay_root '5'
        option check_fs '0'
    
    config mount
        option target '/rom'
        option uuid '1f045de8-469f-4786-9614-85ebdf19b519'
        option enabled '0'
    
    config mount
        option target '/mnt/mmcblk2p3'
        option uuid '7df14b19-6e49-4532-bda7-8901e5388e36'
        option enabled '1'
    
    config mount
        option target '/mnt/mmcblk2p4'
        option uuid 'c48f430a-443e-4992-9424-e575f1e1f159'
        option enabled '1'
    
    config mount
        option target '/'
        option uuid 'e5e198c0-53ee-407a-b2a2-a0fc98d68715'
        option enabled '1'
    
    config mount
        option enabled '1'
        option uuid 'e5e198c0-53ee-407a-b2a2-a0fc98d68715'
        option target '/opt'
    
    config mount
        option enabled '1'
        option uuid 'e5e198c0-53ee-407a-b2a2-a0fc98d68715'
        option target '/overlay'
    
    

    设置显示从哪里启动的:

    echo Booted from internal rom >> /etc/banner

    docker根目录设置

    本文著作权归作者 [ admin ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。
    取消回复

    发表留言
    回复

    首页邻居关于归档
    Copyright©2020-2026  All Rights Reserved.  Load:0.016 s
    京ICP备18019712号
    Theme by OneBlog V3.6.5
    夜间模式

    开源不易,请尊重作者版权,保留基本的版权信息。