天增的博客
首页
博客
  • 分布式解决方案
  • Java并发工具包
  • redis
  • LeetCode
  • 系统设计
  • JVM体系
Github (opens new window)
Rss (opens new window)
  • zh-CN
  • en-US
首页
博客
  • 分布式解决方案
  • Java并发工具包
  • redis
  • LeetCode
  • 系统设计
  • JVM体系
Github (opens new window)
Rss (opens new window)
  • zh-CN
  • en-US
  • post
2024-07-03

Openwrt镜像包扩容

# Openwrt镜像包扩容

1、首先下载好镜像包,如果镜像包是压缩文件,如gz结尾,那么需要先解压出镜像包,一般是img后缀的文件就是镜像包。解压命令一般如下:

#解压,得到img文件
gzip -kd openwrt-22.03.6-x86-64-generic-ext4-combined-efi.img.gz
  1. 在这个img镜像文件后面增加空数据
dd if=/dev/zero bs=1G count=5 >> openwrt-22.03.6-x86-64-generic-ext4-combined-efi.img
  1. 执行分区命令
# 查看当前img分区 
parted openwrt-22.03.6-x86-64-generic-ext4-combined-efi.img
# 查看当前镜像包的分区情况
print

Disk /mnt/sda1/template/iso/openwrt-22.03.6-x86-64-generic-ext4-combined-efi.img: 5495MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
128 17.4kB 262kB 245kB bios_grub
1 262kB 17.0MB 16.8MB fat16 legacy_boot
2 17.0MB 126MB 109MB ext2

# 使用命令将刚才增加的5GB空数据整合进这个分区
resizepart 2 100%
最近更新
01
以 root 身份启动 transmission-daemon
12-13
02
Debian系统安装qbittorrent-nox
12-09
03
LXC Debain12安装zerotier并实现局域网自动nat转发
07-29
更多文章>
Theme by Vdoing | Copyright © 2015-2024 天增 | 苏ICP备16037388号-1
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式