如何调整根文件系统分区Debian Jessie BeagleBone Black

时间:2016-02-22 18:38:59

标签: linux beagleboneblack debian-based

我使用16GB MicroSD卡在BeagleBone Black Version C上开始了新的Debian安装。我通过win32DiskImager使用的映像只为根文件系统和其他所有内容创建了一个启动linux分区,大小为3.3gb。 MicroSD卡的其余部分未使用。我想调整此分区的大小以利用未使用的剩余空间。

我读过的所有调整大小的教程都与一个有两个分区的系统有关,但同样,我的安装只有一个。为什么我不知道。我根本没有删除任何分区,这就是为什么我没有注意到,直到我决定检查我离开的房间。

是否可以调整mmcblk0p1的大小以使用整个microSD,还是应该像传统安装一样将其分解?

这是我的lsblk

root@beaglebone:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1boot0 179:16   0    1M  1 disk
mmcblk1boot1 179:24   0    1M  1 disk
mmcblk0      179:0    0 14.7G  0 disk
`-mmcblk0p1  179:1    0  3.3G  0 part /
mmcblk1      179:8    0  3.7G  0 disk
|-mmcblk1p1  179:9    0   96M  0 part
`-mmcblk1p2  179:10   0  3.6G  0 part

这是我的fdisk -l <​​/ p>

root@beaglebone:~# fdisk -l

Disk /dev/mmcblk0: 14.7 GiB, 15811477504 bytes, 30881792 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: 0xa2911fde

Device         Boot Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *     2048 6963199 6961152  3.3G 83 Linux

Disk /dev/mmcblk1: 3.7 GiB, 3925868544 bytes, 7667712 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: 0x00000000

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk1p1 *      2048  198655  196608   96M  e W95 FAT16 (LBA)
/dev/mmcblk1p2      198656 7667711 7469056  3.6G 83 Linux

Disk /dev/mmcblk1boot1: 1 MiB, 1048576 bytes, 2048 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
Disk /dev/mmcblk1boot0: 1 MiB, 1048576 bytes, 2048 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

1 个答案:

答案 0 :(得分:1)

nsilent22的建议就行了。当我删除分区然后使用fdisk创建一个新分区时,我不需要担心丢失数据。谢谢nsilent22 !!