linux 扩展根目录分区

[root]~# fdisk /dev/mmcblk0

The number of cylinders for this disk is set to 60672.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p
Disk /dev/mmcblk0: 1896 MB, 1988100096 bytes, 3883008 sectors
60672 cylinders, 4 heads, 16 sectors/track
Units: sectors of 1 * 512 = 512 bytes

Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/mmcblk0p1 0,32,33 16,113,33 2048 264191 262144 128M 83 Linux
/dev/mmcblk0p2 16,113,34 49,20,35 264192 788479 524288 256M 83 Linux

Command (m for help): d
Partition number (1-4): 2

Command (m for help): n
Partition type
p primary partition (1-4)
e extended
p
Partition number (1-4): 2
First sector (16-3883007, default 16): 264192
Last sector or +size{,K,M,G,T} (264192-3883007, default 3883007):
Using default value 3883007

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Resource busy

[root]~# reboot

一定重启

[root]~# resize2fs /dev/mmcblk0p2
resize2fs 1.46.2 (28-Feb-2021)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 1
The filesystem on /dev/mmcblk0p2 is now 452352 (4k) blocks long.

[root]~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 1.6G 39.8M 1.5G 3% /
devtmpfs 14.4M 0 14.4M 0% /dev
tmpfs 14.5M 0 14.5M 0% /dev/shm
tmpfs 14.5M 44.0K 14.4M 0% /tmp
tmpfs 14.5M 20.0K 14.5M 0% /run

 

posted @   *^VV^*  阅读(23)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示