在大佬店里搞了个树莓派1代做了个无线AP
作为网关跑各种科学工具,性价比没得说
刷完之后16GB的TF只有不到1GB的可用空间
想要充分利用剩余的空间
则需要重新分区并挂载
以下为扩容步骤:
- 进入 openwrt后台,系统>管理权里面开启ssh访问
-
shell连上去
-
查看你的存储设备
fdisk -l
- 新建分区
fdisk /dev/mmcblk0
输入p命令查看当前的分区情况,可以看到分区开始和结束区域。接下来将最大的那一块划分出一个区。
Command (m for help): p
Disk /dev/mmcblk0: 14.7 GiB, 15720251392 bytes, 30703616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 8192 110591 102400 50M c W95 FAT32 (LBA)
/dev/mmcblk0p2 114688 2162687 2048000 1000M 83 Linux
输入n命令新建分区,First sector输入2162688,其他操作直接回车默认。
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (3,4, default 3):
First sector (2048-30703615, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-8191, default 8191): ^C
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p): e
Partition number (3,4, default 3):
First sector (2048-30703615, default 2048): 2162688
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2162688-30703615, default 30703615):
Created a new partition 3 of type 'Extended' and of size 13.6 GiB.
再次输入p命令可以看到已划分好
Command (m for help): p
Disk /dev/mmcblk0: 14.7 GiB, 15720251392 bytes, 30703616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 8192 110591 102400 50M c W95 FAT32 (LBA)
/dev/mmcblk0p2 114688 2162687 2048000 1000M 83 Linux
/dev/mmcblk0p3 2162688 30703615 28540928 13.6G 5 Extended
输入w命令保存分区表
- 格式化刚才新建的分区
mkfs.ext4 /dev/mmcblk0p3
- 挂载分区
- 完工,已经可以使用了
发表评论
抢沙发~