Introduction
When using an SD Card image to boot the EVK you will possibly run into storage issues since the partition is quite small. It is possible though to resize the partition to use all the available SD Card space.
Procedure
- List current partitions on /dev/mmcblk1
- Note the starting address of partition #2
- Delete partition #2
- Create new partition #2
- Ensure you use the start address from Step #1
- Ensure you say no to removing the partition type.
- Write changes and reboot
- Run resize2fs command.
Step 1
# fdisk -l /dev/mmcblk1
Disk /dev/mmcblk1: 29.89 GiB, 32099008512 bytes, 62693376 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: 0x701aabff
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 16384 186775 170392 83.2M c W95 FAT32 (LBA)
/dev/mmcblk1p2 196608 62693375 62496768 29.8G 83 Linux
Step 2, 3, 4
# fdisk /dev/mmcblk1
Welcome to fdisk (util-linux 2.36.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
Partition number (1,2, default 2): 2
Partition 2 has been deleted.
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-62693375, default 2048): 196608
Last sector, +/-sectors or +/-size{K,M,G,T,P} (196608-62693375, default 62693375):
Created a new partition 2 of type 'Linux' and of size 29.8 GiB.
Partition #2 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: n
Command (m for help): w
The partition table has been altered.
Syncing disks.
# reboot
Step 5
# resize2fs /dev/mmcblk1p2
resize2fs 1.46.1 (9-Feb-2021)
The filesystem is already 7812096 (4k) blocks long. Nothing to do!
Comments
0 comments
Please sign in to leave a comment.