This works because UDF (perhaps intentionally) doesn't utilize the first block. The solution, as suggested by Pieter, is to place a fake partition table (via MBR) in the first block of the drive, which lists a single entire-disk partition.
#Hard disk format for mac and linux full#
macOS seems to only mount UDF file systems that utilize the full disk (not just a partition)Īt first glance, these constraints appear to be in partial conflict.
#Hard disk format for mac and linux windows#
(This is strange because Windows does not apply the same limitation to flash drives.) Windows does not support hard disks without a partition table.Different operating systems (like Windows XP) only attempt mounting UDF file systems with a hard-coded block size.Windows seems to only mount UDF devices if the file system block size matches the device's logical block size.Some OS versions only offer read-only support. Different operating systems support different versions of the UDF specification.Here are some of the complicating factors, which format-udf aims to abstract away: Why?įormat-udf was created to address some OS-specific quirks that prevent a naively-formatted UDF device from working across various operating systems. (See #24 for caveats.) Because of this limitation, the recommendation is to format the entire device. Beware that using this method will render the newly formatted UDF partition unusable on macOS (but still usable on Linux and Windows). Writes a fake MBR for added compatibility on Windows (optionally disabled)įor the advanced user, format-udf is also capable of formatting a single existing partition, without modifying the partition table.Option to force non-interactive mode (useful for scripting).Ability to override detected device block size.Optionally wipes device before formatting.Runs on any OS having a Bash environment.Resulting file system can be read/written across multiple operating system families (Windows, macOS, and Linux).UDF revision 2.01 used for maximal compatibility (see note on Linux support below).Formats a block device (hard drive or Flash drive) in Universal Disk Format (UDF).This script should be capable of running in macOS or in Linux. The output is a drive that can be used for reading/writing across multiple operating system families: Windows, macOS, and Linux. Bash script to format a block device (hard drive or Flash drive) in UDF.