Closed pexcn closed 7 months ago
You can also use the following commands to view the partition status.
blkid
block info
lsblk -o KNAME,MAJ:MIN,START,SIZE,LABEL,PARTLABEL,PARTUUID,PTUUID,SERIAL
This is my current partition table, it has 16GB of extroot and all remaining space of userdata.
# delete last partition
sgdisk --delete=25 /dev/mmcblk0
sgdisk --delete=26 /dev/mmcblk0
# create `extroot` partition (16GB)
sgdisk --new=25:793410:34347841 /dev/mmcblk0
sgdisk --change-name=25:"extroot" /dev/mmcblk0
# create `userdata` partition (remaining space)
sgdisk --new=26:34347842:119783389 /dev/mmcblk0
sgdisk --change-name=26:"userdata" /dev/mmcblk0
# print current partitions
sgdisk --print /dev/mmcblk0
Prerequisites
All operations are based on this partition table, so you need to flash this partition table before executing the following commands.
Fix partition table
You need to use interactive
gdisk
, and then directly press thew
command to write to the partition table to repair it.Repartition
Refer to the following commands to repartition.
The following is the operation logs.
TL;DR
If you want, you can directly flash into my repartitioned partition table, it has 8GB of extroot and all remaining space of userdata. But I have not tested it, please use it with caution.