{"id":369,"date":"2017-11-19T00:04:48","date_gmt":"2017-11-19T05:04:48","guid":{"rendered":"http:\/\/www.flatline.net\/journal\/?p=369"},"modified":"2017-11-19T00:04:48","modified_gmt":"2017-11-19T05:04:48","slug":"blocking-the-mount-of-a-uf2-bootloader-in-osx-and-maybe-linux","status":"publish","type":"post","link":"http:\/\/www.flatline.net\/journal\/?p=369","title":{"rendered":"Blocking the mount of a UF2 Bootloader in OSX (and maybe Linux)"},"content":{"rendered":"<p>I&#8217;m really liking Adafruits &#8220;<a href=\"https:\/\/www.adafruit.com\/product\/3505\">Metro Express<\/a>&#8221; version of the Arduino Zero.<\/p>\n<p>Except for one thing.<\/p>\n<p>The UF2 boot loader.\u00a0 Every time I compile and load a sketch I get a whine notification from OSX about how I&#8217;ve unmounted a volume without the proper Steve Jobs NeXT dance.<\/p>\n<p>The fix is actually pretty simple &#8212; tell fstab to stop mounting the filesystem in the first place.\u00a0 Apple has <a href=\"https:\/\/apple.stackexchange.com\/questions\/36021\/how-does-mac-os-x-decide-which-volumes-to-mount-one-of-my-disks-doesnt-mount-a\">one solution<\/a> but it needs a few tweaks for the UF2 boot system.<\/p>\n<pre>I'll use Adafruit's METRO as an example.  \r\n\r\nFirst, use diskutil to find the UUID of the METRO:\r\n\r\n$ diskutil info \/Volumes\/METROBOOT\/\r\n Device Identifier: disk3\r\n Device Node: \/dev\/disk3\r\n Whole: Yes\r\n Part of Whole: disk3\r\n Device \/ Media Name: Metro M0 Media\r\n\r\nVolume Name: METROBOOT\r\n\r\nMounted: Yes\r\n Mount Point: \/Volumes\/METROBOOT\r\n\r\nFile System Personality: MS-DOS FAT16\r\n Type (Bundle): msdos\r\n Name (User Visible): MS-DOS (FAT16)\r\n\r\nContent (IOContent): None\r\n OS Can Be Installed: No\r\n Media Type: Generic\r\n Protocol: USB\r\n SMART Status: Not Supported\r\n Volume UUID: CA043DAF-C1C3-33CC-A5C4-A4B0D2BFDE85\r\n\r\nTotal Size: 4.1 MB (4096000 Bytes) (exactly 8000 512-Byte-Units)\r\n Volume Free Space: 3.5 MB (3530240 Bytes) (exactly 6895 512-Byte-Units)\r\n Device Block Size: 512 Bytes\r\n Allocation Block Size: 512 Bytes\r\n\r\nRead-Only Media: No\r\n Read-Only Volume: No\r\n\r\nDevice Location: External\r\n Removable Media: Yes\r\n Media Removal: Software-Activated\r\n\r\nVirtual: No\r\n OS 9 Drivers: No\r\n Low Level Format: Not supported<\/pre>\n<p>Now, use vifs to change the fstab file:<\/p>\n<p>$ sudo vifs<\/p>\n<p>and add this line to the end of the file using the &#8220;Volume UUID&#8221; field to replace [Volume UUID]<\/p>\n<p>UUID=[Volume UUID] none msdos ro,noauto<\/p>\n<p>save and quit, then run<\/p>\n<p>$ sudo automount -vc<\/p>\n<p>to update your mac with the new fstab file.<\/p>\n<p>This should stop the device from automounting under OSX and make the METRO work like a &#8220;normal&#8221; Arduino.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m really liking Adafruits &#8220;Metro Express&#8221; version of the Arduino Zero. Except for one thing. The UF2 boot loader.\u00a0 Every time I compile and load a sketch I get a whine notification from OSX about how I&#8217;ve unmounted a volume without the proper Steve Jobs NeXT dance. The fix is actually pretty simple &#8212; tell [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,11],"tags":[],"class_list":["post-369","post","type-post","status-publish","format-standard","hentry","category-arduino","category-hacking"],"_links":{"self":[{"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/posts\/369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369"}],"version-history":[{"count":1,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions"}],"predecessor-version":[{"id":370,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=\/wp\/v2\/posts\/369\/revisions\/370"}],"wp:attachment":[{"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.flatline.net\/journal\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}