Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've inherited some code that examines all available unmounted partitions and tries to determine the correct way to mount them. It checks the partition type ID using sfdisk, then issues the command mount -t ext2 if it's a Linux partition, or the command mount -t ntfs -o case_sensitive=true -o umask=0222 if it's an NTFS partition.

Now I'm trying to update this code to work on machines might be partitioned using GPT, where sfdisk doesn't work. I've concluded that I can still use the original logic if the target disk is partitioned using MBR, but I'm at a loss as to how to handle the GPT case, since Linux and Windows apparently both use the same partition type GUID for their data partitions. How can I know whether I need to include the case_sensitive and umask options? Or are they even still necessary at all?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

blkid(8)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.