This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
cs:usb_stick_format [2019/05/03 14:49] paolo_bolzoni Readable to everyone disk |
cs:usb_stick_format [2019/10/20 12:13] (current) paolo_bolzoni Windows wants a Microsoft reserved partition? |
||
---|---|---|---|
Line 1: | Line 1: | ||
======= Format disk ======= | ======= Format disk ======= | ||
- | Windows and MacOS are very fastidious about the kind of disk they can open and it is //really// annoying when you have to copy a file to a colleague and the system refuse to open the disk. | + | Windows and MacOS are very fastidious about the kind of disks they can open and it is //really// annoying when you have to copy a file to a colleague and the system refuses to open the disk. |
- | [[https://matthew.komputerwiz.net/2015/12/13/formatting-universal-drive.html|Matthew analyzed the situation]]. | + | [[https://matthew.komputerwiz.net/2015/12/13/formatting-universal-drive.html|Matthew analyzed the situation]]. But in my experience, what he wrote does not work as-is. |
- | Here is a recap; to have a disk that can easily be open by Windows, MacOS, and Linux use: | + | Windows creates an extra partition [[https://en.wikipedia.org/wiki/Microsoft_Reserved_Partition|Microsoft Reserved Partition (MSR)]], and it refuses to open few disks without it. |
- | * a GPT partition table with one partition of type ''0700'' (//Microsoft basic data//) | + | So a disk that can easily be open by Windows, MacOS, and Linux needs: |
- | * the exFAT filesystem | + | |
+ | * a GPT partition table | ||
+ | * the first partition to be the MSR: size 16MB, type ''0C01'' (//Microsoft reserved//) | ||
+ | * the second partition that contains the real data, it uses the other space and it has type ''0700'' (//Microsoft basic data//) | ||
+ | * the first partition needs no formatting | ||
+ | * the second partition has to be formatted with the exFAT filesystem (NTFS can be an alternative, but MacOS might not like it) | ||
+ | |||
+ | Before starting clear up the disk using ''wipefs''. Then create the partition table with ''gdisk''. To format use ''mkfs.exfat''. Finally to be sure, clear up the MSR partition. | ||
+ | |||
+ | Example, let us prepare ''/dev/sdZ'': | ||
+ | |||
+ | # wipefs -a /dev/sdZ[1-9]* | ||
+ | # wipefs -a /dev/sdZ | ||
+ | # gdisk /dev/sdZ | ||
+ | . create a partition of size 16MB with code 0C01 | ||
+ | . create a partition with code 0700 | ||
+ | . write and quit | ||
+ | # wipefs --force -a /dev/sdZ1 | ||
+ | # mkfs.exfat -n LABEL /dev/sdZ2 | ||
+ | OR | ||
+ | # mkfs.ntfs -QT -L LABEL /dev/sdZ2 | ||
- | The partition table can be made with ''gdisk'' and one can format with ''mkfs.exfat''. |