删除分区1(主分区)
p查看分区,d删除分区,输入1(删除分区1),p(查看分区)发现原本在第一的位置上的 /dev/sdb1 已经没了
Command (m for help): p
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x4ce7226c
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4196351 2097152 83 Linux
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 1048576 83 Linux
/dev/sdb6 12589056 14686207 1048576 83 Linux
Command (m for help): d
Partition number (1-6, default 6): 1
Partition 1 is deleted
Command (m for help): p
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x4ce7226c
Device Boot Start End Blocks Id System
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 1048576 83 Linux
/dev/sdb6 12589056 14686207 1048576 83 Linux
Command (m for help):
删除分区5(逻辑分区)
p查看分区,d删除分区,输入5(删除分区5),p(查看分区)对比上面的 Start End 可以发现,上图上的 /dev/sdb5 已经没了,但是原本的 /dev/sdb6 变成了 /dev/sdb5了
Command (m for help): p
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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 label type: dos
Disk identifier: 0x4ce7226c
Device Boot Start End Blocks Id System
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 10