[root@controller src]# fdisk crtefi15g-20190112.img
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img1 * 2048 329727 163840 83 Linux
crtefi15g-20190112.img2 329728 29689855 14680064 8e Linux LVM
crtefi15g-20190112.img3 29689856 29700095 5120 ef EFI (FAT-12/16/32)
Command (m for help): d
Partition number (1-3, default 3): 1
Partition 1 is deleted
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img2 329728 29689855 14680064 8e Linux LVM
crtefi15g-20190112.img3 29689856 29700095 5120 ef EFI (FAT-12/16/32)
Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p): p
Partition number (1,4, default 1):
First sector (2048-30719999, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-329727, default 329727): +2M
Partition 1 of type Linux and of size 2 MiB is set
Command (m for help): t
Partition number (1-3, default 3): 1
Hex code (type L to list all codes): ef
Changed type of partition 'Linux' to 'EFI (FAT-12/16/32)'
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img1 2048 6143 2048 ef EFI (FAT-12/16/32)
crtefi15g-20190112.img2 329728 29689855 14680064 8e Linux LVM
crtefi15g-20190112.img3 29689856 29700095 5120 ef EFI (FAT-12/16/32)
Command (m for help): d Partition number (1-3, default 3): Partition 3 is deleted
Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p):
Using default response p
Partition number (3,4, default 3):
First sector (6144-30719999, default 6144):
Using default value 6144
Last sector, +sectors or +size{K,M,G} (6144-329727, default 329727):
Using default value 329727
Partition 3 of type Linux and of size 158 MiB is set
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img1 2048 6143 2048 ef EFI (FAT-12/16/32)
crtefi15g-20190112.img2 329728 29689855 14680064 8e Linux LVM
crtefi15g-20190112.img3 6144 329727 161792 83 Linux
Partition table entries are not in disk order Command (m for help): x
Expert command (m for help): f Done.
Expert command (m for help): r
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img1 2048 6143 2048 ef EFI (FAT-12/16/32)
crtefi15g-20190112.img2 6144 329727 161792 83 Linux
crtefi15g-20190112.img3 329728 29689855 14680064 8e Linux LVM
Command (m for help): a
Partition number (1-3, default 3): 2
Command (m for help): p
Disk crtefi15g-20190112.img: 15.7 GB, 15728640000 bytes, 30720000 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: 0x55654248
Device Boot Start End Blocks Id System
crtefi15g-20190112.img1 2048 6143 2048 ef EFI (FAT-12/16/32)
crtefi15g-20190112.img2 * 6144 329727 161792 83 Linux
crtefi15g-20190112.img3 329728 29689855 14680064 8e Linux LVM
Command (m for help): w The partition table has been altered! Syncing disks.