I'm trying to write a udev rule to not mount USB devices plugged into my system if they're bootable, but I don't know how to specify in udev if a device is bootable in a rule. Is that possible? If so, what needs to go into my rule?
To be clear, by bootable, I mean the device has an OS that I can boot into at start up.
sfdisk -d /dev/sdX 2>/dev/null | grep -q bootable
returns a non zero code then the disk contains a bootable partition so mount none.