尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

OpenWrt 固件扩容官方指南

OpenWrt 固件扩容官方指南 [OpenWrt Wiki] Expanding root partition and filesystemOpenWrt针对固件扩容有官方指南但目前很多网络教程仍然停留在老版本特此记录。特点1、支持ext4和squashfs固件格式2、自动识别根分区和文件系统。3、利用空闲空间扩展根分区和文件系统。4、通过固件升级保留脚本。5、固件升级后会自动运行。# Install packages # 安装必要软件 apk update apk add parted losetup resize2fs blkid # Download expand-root.sh #下载 expand-root.sh脚本 wget -U -O expand-root.sh https://openwrt.org/_export/code/docs/guide-user/advanced/expand_root?codeblock0 # Source the script (creates /etc/uci-defaults/70-rootpt-resize and /etc/uci-defaults/80-rootpt-resize, and adds them to /etc/sysupgrade.conf so they will be re-run after a sysupgrade) # 添加源脚本 创建/etc/uci-defaults/70-rootpt-resize 和 /etc/uci-defaults/80-rootpt-resize # 并把他们添加至/etc/sysupgrade.conf文件中以确保系统升级后仍然可以运行 . ./expand-root.sh # Resize root partition and filesystem (will resize partiton, reboot resize filesystem, and reboot again) # 调整root分区和文件系统大小 sh /etc/uci-defaults/70-rootpt-resize
返回列表