# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to
write them.
Be careful before using the write command.
This disk is currently in use - repartitioning is probably
a bad idea.
It's recommended to umount all file systems, and swapoff
all swap
partitions on this disk.
Command (m for help): p
Disk /dev/mmcblk0: 14.84 GiB, 15931539456 bytes, 31116288
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: 0x769cf592
Device
Boot Start
End Sectors Size Id Type
/dev/mmcblk0p1
*
1 262144 262144 128M c
W95 FAT32 (LBA)
/dev/mmcblk0p2
262145 14942208 14680064 7G 83 Linux
/dev/mmcblk0p3 14942209
15466496 524288 256M 0 Empty
Command (m for help): d
Partition number (1-3, default 3): 3
Partition 3 has been deleted.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended,
2 free)
e extended (container for logical
partitions)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (14942209-31116287, default 14944256):
Last sector, +/-sectors or +/-size{K,M,G,T,P}
(14944256-31116287, default 31116287): +7G
Created a new partition 3 of type 'Linux' and of size 7
GiB.
Command (m for help): w
The partition table has been altered.
Failed to remove partition 3 from system: Device or
resource busy
Failed to add partition 3 to system: Device or resource
busy
The kernel still uses the old partitions. The new table
will be used at the next reboot.
Syncing disks.
# mkswap /dev/mmcblk0p3
Setting up swapspace version 1, size = 7 GiB (7516188672
bytes)
no label, UUID=724c38f1-83d9-4cfb-813c-35908952d58b
# swapon /dev/mmcblk0p3
|