As the comment by frostschutz said, you are trying to create a partition in a partition. Your disk is
/dev/sda, your partition is
On your partition, you created a filesystem with
sudo mkfs -t ext4 /dev/sda2
So, examining your output of
sudo fdisk /dev/sda2:
Device /dev/sda2 already contains a ext4 signature.
The signature will be removed with a write command.
That is correct. Your
sudo mkfs -t ext4 /dev/sda2 put it there.
Device does not contain a recognized partiton table.
Create a new DOS disklabel with disk identifier 0x3a701490.
That is also correct: the partition
/dev/sda2 does not contain a partition table. The disk
/dev/sda contains a partition table; the partition
/dev/sda2 contains an ext4 file system.
So, to your question:
why does fdisk show that the disk has a previous ext4 signature even though i removed all signatures on the disk with wipefs
Because you put it there with
sudo mkfs -t ext4 /dev/sda2.
Also why does it say that a partiton table is not recognised, it clearly says on the **Disklabel section that the partition table is a dos one
It says, that there is no partition table recognised, and that it is now creating a partition table for it. After fdisk has created the partition table, you type
p and, because
fdisk has just created this table for you, you see the freshly created table appearing.