/dev/vda: unrecognized partition table type

February 24, 2015 5.3k views


Today i had to create a swap because i had problems with a php package manager - composer - when updating the dependencies because it didn’t have enough free memory. I’ve created it on /var/swap.1 with the following commands:

/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1

After this the composer updated the dependencies successfully as expected. After that i runned fdisk to check the partitions and now i’m getting invalid partition table:

Disk /dev/vda: 41610 cylinders, 16 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/vda: unrecognized partition table type
No partitions found

Is this something i should worry about? It’s a VPS with 512MB running debian 7.

Thanks in advance

1 Answer

It’s not saying the partition table is invalid, it’s saying there’s no signature on sector 0 and that the type is unrecognized. This is because, as stated in sfdisk’s manpage:

“sfdisk doesn’t understand the GUID Partition Table (GPT) format and it is not designed for large partitions. In these cases use the more advanced GNU parted(8).”

And if you use parted, as indicated by the manual:

root@iron:~# parted /dev/vda
GNU Parted 2.3
Using /dev/vda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  21.5GB  21.5GB  ext4         primary

(parted) q
Have another answer? Share your knowledge.