Tuesday, 24 December 2019

How to remove the msftdata flag on a GPT partition

You've bought this large disk for use on Linux and it's been preformatted for Windows. Usually there is a msftres partition (which you can leave alone, in case you need it later, as it takes up only a tiny fraction of the disk capacity) and a msftdata partition. You can format the filesystem as ext4 or whatever Linux filesystem you like and it will mount properly, but a list of the partitions still shows it as Microsoft. This annoys you.

The relevant documentation for parted shows that msftdata is a flag. Unfortunately you can't just set the flag off. The document states:
This flag can only be removed within parted by replacing it with a competing flag, such as boot or msftres.
So the solution is (assuming the partition is number 2):
set 2 boot on
set 2 boot off

No comments:

Post a Comment