fdisk MBR GPT – 002 Disk Management – Part II – Creating partitions with fdisk

fdisk MBR GPT


fdisk -l   to display a list of devices

fdisk -l


/dev/sdb  no partition

/dev/sda  has 2 partitions

/dev/sdc no partition


fdisk /dev/sdb


let’s create a new MBR partition label

(we creaet 3 new p[artitions)

n – add a new partition

create primary partition

p primary

1  partition number

default  hit enter

insert +1G  – for 1 GB in size

Partition 1 of type Linux and of size 1GiB is set

t  change a partitions system id

l  list a partition

Partition 83 is Linux

for swap is 82 Linux swap

Hex code (type L to list all codes):   82



hit enter – the default is 2

hit enter –  accept the default

+20G  in size


and now the 3th partition




hit enter – mto create with all remaining space on the disk


Create 3 partition

sdb1  is first primary

other 2 are linux


The partition table has been alliterated!


Let’s create a GPT partition on /dev/sdc

fdisk /dev/sdc

p  <– check if exist any partition assigned ?

g  to create  GTP

n <–new partition


hit enter default – use the first available sector


create gpt partition

w – write

The partition table has been altered!


fdisk -l | less

partition created


and the last one big  partition

last partition created