0

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?

1

blkid(8)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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