{"id":398,"date":"2018-01-25T17:17:34","date_gmt":"2018-01-25T14:17:34","guid":{"rendered":"http:\/\/ustinych.net\/wordpress\/?p=398"},"modified":"2018-01-25T17:18:44","modified_gmt":"2018-01-25T14:18:44","slug":"create-bootable-usb-stick-from-iso-in-mac-os-x","status":"publish","type":"post","link":"https:\/\/ustinych.net\/wordpress\/?p=398","title":{"rendered":"Create bootable USB stick from ISO in Mac OS X"},"content":{"rendered":"<p>Convert the ISO to UDRW format<\/p>\n<p>Mac OS X provides all the tools needed to convert the ISO image to UDRW. The following command will convert the ISO image to the UDRW format.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nhdiutil convert -format UDRW -o destination_file.img source_file.iso\r\n<\/pre>\n<p>You will notice that the destination_file.img from the command will create the file destination_file.img.dmg really. This is because the hdiutil program automatically adds the dmg file extension. This is not a problem as the file extension won\u2019t affect the format of the image.<\/p>\n<p>Prepare the USB stick<\/p>\n<p>Check your USB stick and make a backup if there is any important data on it, as the next steps are going to delete everything on it.<\/p>\n<p>To prepare the USb stick we are going to delete all the partitions on the stick and create an empty partition. To do this we need to know the device name of the USB stick. Open a terminal and execute the following command:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ diskutil list\r\n<\/pre>\n<p>You will see a list of disks and partitions. The goal is to identify the USB stick in this output. Depending on your system configuration your output might look different from this one. This appears to show 3 physical discs but it does not. The \/dev\/disk1 is a virtual disk created because of the partition encryption (FileVault 2) I enabled in Mac OS X.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/dev\/disk0\r\n#:                       TYPE NAME                    SIZE       IDENTIFIER\r\n0:      GUID_partition_scheme                        *500.1 GB   disk0\r\n1:                        EFI                         209.7 MB   disk0s1\r\n2:          Apple_CoreStorage                         399.5 GB   disk0s2\r\n3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3\r\n5:                 Apple_Boot Boot OS X               134.2 MB   disk0s5\r\n\/dev\/disk1\r\n#:                       TYPE NAME                    SIZE       IDENTIFIER\r\n0:                  Apple_HFS MacOSX                 *399.2 GB   disk1\r\n\/dev\/disk2\r\n#:                       TYPE NAME                    SIZE       IDENTIFIER\r\n0:      GUID_partition_scheme                        *2.0 GB     disk2\r\n1:       Microsoft Basic Data UNTITLED 1              2.0 GB     disk2s1\r\n<\/pre>\n<p>As shown in the output above, the connected USB stick is a small 2.0 GB drive with a FAT partition on it. We are now going to remove this partition in the next step. For the following steps we will need the name of the disk which in this case is \u201c\/dev\/disk2\u201d.<\/p>\n<p>With the following command the data on the disk (your USB stick) will be deleted!<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ diskutil partitionDisk \/dev\/disk2 1 &quot;Free Space&quot; &quot;unused&quot; &quot;100%&quot;\r\n<\/pre>\n<p>With this command the USB stick was re-partitioned to have 1 partition without formatting and 100% of the size of the stick. If you check it again with \u201cdiskutil list\u201d you will see the changes already, also the USB stick will no longer be shown in the Finder.<\/p>\n<p>Copy the image to the USB stick<\/p>\n<p>Now we can copy the disk image we created to the USB stick. This is done via the dd(1) command. This command will copy the image to the disk (substitute the appropriate disk name for your USB stick here, as with the re-partitioning command):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ dd if=destination_file.img.dmg of=\/dev\/disk2 bs=1m\r\n<\/pre>\n<p>The dd command does not show any output before it has finished the copy process, so be patient and wait for it to complete.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$ diskutil eject \/dev\/disk2\r\n<\/pre>\n<p>To eject the USB stick, use the above command. After this is done, the bootable USB stick is ready to be used.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert the ISO to UDRW format Mac OS X provides all the tools needed to convert the ISO image to UDRW. The following command will convert the ISO image to the UDRW format. hdiutil convert -format UDRW -o destination_file.img source_file.iso You will notice that the destination_file.img from the command will create the file destination_file.img.dmg really.\u2026 <span class=\"read-more\"><a href=\"https:\/\/ustinych.net\/wordpress\/?p=398\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":401,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-398","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mac-os-x"],"_links":{"self":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=398"}],"version-history":[{"count":4,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions"}],"predecessor-version":[{"id":403,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions\/403"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/401"}],"wp:attachment":[{"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ustinych.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}