{"id":320,"date":"2022-07-03T18:40:49","date_gmt":"2022-07-03T18:40:49","guid":{"rendered":"https:\/\/mileggedrobots.eecs.umich.edu\/?page_id=320"},"modified":"2022-07-06T18:03:01","modified_gmt":"2022-07-06T18:03:01","slug":"prep-the-flash-drive-using-macos-10-14-and-later","status":"publish","type":"page","link":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/software-install-config-xubuntu-pyckbot-mcc\/prep-the-flash-drive-using-macos-10-14-and-later\/","title":{"rendered":"Creating a bootable Xubuntu flash drive using macOS (10.14 and later)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"MacInstall\">Prepping the Flash Drive and Installing Xubuntu<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It currently is not possible to make a <strong>bootable persistent Xubuntu USB flash drive<\/strong> (i.e., one you can boot up from and save your work to) exclusively using macOS.  So we&#8217;re going to break this into two procedures: First we&#8217;ll create a bootable read-only Xubuntu USB flash drive (which is fast and easy in macOS), and then we&#8217;ll use that flash drive to run Xubuntu and create a second fully fledged readable\/writable &#8220;persistent&#8221; bootable USB flash drive (which is why you need two USB flash drives).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PROCEDURE #1: Making a &#8220;non-persistent&#8221; bootable USB drive on a Mac<\/h3>\n\n\n\n<ol class=\"wp-block-list\" id=\"block-733e9b0a-152a-452b-bbae-7a4b5e769c14\"><li>Boot up your Mac and open the web browser of your choice<\/li><li>Goto&nbsp;<a href=\"http:\/\/xubuntu.org\/\">xubuntu.org<\/a>&nbsp;and&nbsp;download the <strong><em>20.04 LTS<\/em> (\u201clong term support\u201d) release<\/strong>. (This version of Xubuntu is current and stable, and considered &#8220;enterprise grade&#8221;; it is scheduled to continue to enjoy full support and updates until 2025, and critical security updates until 2030.) You\u2019ll want the file that ends in \u201c<strong>.iso<\/strong>\u201c; it\u2019ll be 1 or 2 GB. Save it to your Desktop so that it\u2019s easy to find later.<\/li><li>Next format one of your USB flash drives. Plug one into your Mac, then launch the macOS <strong>Disk Utility<\/strong>. Select the \u201cPhysical Disk\u201d (<em>not <\/em>\u201cPhysical Volume\u201d) corresponding to your USB flash drive, and chose &#8220;<strong>ERASE<\/strong>&#8221; from the ribbon at the top of the Disk Utility window. A new window will pop up. Name the drive &#8220;<strong>USB B<\/strong>&#8220;, chose \u201cMS-DOS (FAT)\u201d and \u201cGUID Partition Map,\u201d then click <strong>ERASE<\/strong>. When the operation is complete, eject the drive, put a note on it so you remember it is &#8220;<strong>USB B<\/strong>,&#8221; and set it aside.<\/li><li>Now take your other USB flash drive, plug it into your Mac, and run the <strong>Disk Utility<\/strong> again. The process is basically the same: Select the \u201cPhysical Disk\u201d (<em>not <\/em>\u201cPhysical Volume\u201d) corresponding to this USB flash drive, and chose &#8220;<strong>ERASE<\/strong>&#8221; from the ribbon at the top of the Disk Utility window. A window will pop up. Name the drive &#8220;<strong>USB A<\/strong>&#8221; (note the name on the flash drive!), chose \u201cMS-DOS (FAT)\u201d and \u201cGUID Partition Map,\u201d then click <strong>ERASE<\/strong>. Leave this drive plugged in.<\/li><li>Goto <a href=\"https:\/\/www.balena.io\/etcher\/\">https:\/\/www.balena.io\/etcher\/<\/a> and download \u201cEtcher.\u201d This is the software we&#8217;ll use to make the USB flash drive bootable; there are many similar programs. Most should work just as well.<\/li><li>Now we will the &#8220;USB A&#8221; flash drive into a bootable copy of Xubuntu.  First run&nbsp;<strong>Etcher<\/strong>. Once it launches, do the folloing:<ol><li>Click the \u201c<strong>Flash from file<\/strong>\u201d button on the left side of the Etcher window. <\/li><li>A file menu will open. Locate your Xubuntu download (it will have a name like&nbsp;<em>\u201c<strong>xubuntu-20.04.1-desktop-amd64.iso<\/strong>\u201d<\/em>). Click &#8220;<strong>Open<\/strong>.&#8221;<\/li><li>Now click on &#8220;<strong>Select Target<\/strong>&#8221; in Etcher and make sure your flash drive is selected.<\/li><\/ol><ol><li>Click \u201c<strong>Flash!<\/strong>\u201d, enter your password, and wait. <ol><li><strong><em>IMPORTANT:<\/em><\/strong> when the process is complete, there will be a pop up saying \u201cThe disk you inserted was not readable by this computer.\u201d Just click \u201c<strong>Eject<\/strong>\u201d and everything will be fine. If you click  \u201c<strong>Initialize\u2026<\/strong>\u201d you&#8217;ll have to do the process over again.<\/li><\/ol><\/li><\/ol><\/li><li>Henceforth we will call this flash drive &#8220;<strong><em>USB A<\/em><\/strong>&#8220;.  <em><strong>IMPORTANT<\/strong>:<\/em> <strong>USB A<\/strong> will boot into a functional version of Xubuntu Linux\u2014which is great! But you <strong><em>will not<\/em> <\/strong>be able to save your work on it (i.e., it does not &#8220;have persistence&#8221;)\u2014which is annoying!  So, we&#8217;re going to boot into Xubuntu using USB A, which will give us access to the tools we need to create the bootable &#8220;persistent&#8221; Xubuntu USB flash drive we need. <\/li><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">PROCEDURE #2: Making a bootable persistent Xubuntu USB drive on a Mac<\/h3>\n\n\n\n<ol class=\"wp-block-list\" id=\"block-733e9b0a-152a-452b-bbae-7a4b5e769c14\"><li>Start by boot up your new Xubuntu flash drive:<ol><li>Shutdown your Mac.<\/li><li>Plug in <strong>USB A <\/strong>(if it isn&#8217;t still plugged in).<\/li><li>Now turn on Mac by holding down the <kbd>Power button<\/kbd> and <kbd>Option<\/kbd> key at the same time.<\/li><li>Release the <kbd>Option<\/kbd> key when the <strong>Startup Manager<\/strong> screen appears.<\/li><li>Select your USB flash drive from the list (<strong>NOTE<\/strong>: If your USB flash drive isn&#8217;t listed, try booting as normal,  updating your macOS software, and then starting all over again with <strong>Procedure #1<\/strong>.)<\/li><li>Once Xubuntu loads it may display a big &#8220;Install&#8221; dialogue box. Don&#8217;t worry, it isn&#8217;t really &#8220;installing&#8221; anything on the computer. Click \u201c<strong>Try Xubuntu<\/strong>\u201d (the dialogue box might refer to your USB flash drive as a \u201cCD\u201d\u2014just accept that; volunteers did all this!)  If you do not get this dialogue, then it will just boot directly into Xubuntu, which is fine.<\/li><li>Reconnect to the Internet (if you&#8217;re using wifi, the Xubuntu system will not know which network to use or any of your passwords) .<\/li><li>This part will seem ridiculous, but we need to re-download your Xubuntu .iso (I know; I&#8217;m sorry. This is a Mac thing.) So, goto\u00a0<a href=\"http:\/\/xubuntu.org\/\">xubuntu.org<\/a>\u00a0(again) and download the <strong><em>20.04 LTS<\/em> (\u201clong term support\u201d) release<\/strong> (again). You\u2019ll want the file that ends in \u201c<strong>.iso<\/strong>\u201c (again); it\u2019ll (still) be 1 or 2 GB. Save it to your Desktop so that it\u2019s easy to find later.<\/li><li>Now it&#8217;s time to install the software that will allow us to create a persistent flash drive.  Start by opening the <strong>Terminal Emulator<\/strong> (click on the mouse icon in the upper left corner and look under &#8220;Favorites&#8221;). Enter the following commands at the command line prompt (hit <kbd><strong>Enter<\/strong><\/kbd> after each, and wait for the command to run; it will return you to a prompt when it&#8217;s ready for a new command):<ol><li><code>sudo add-apt-repository universe<\/code> (will probably tell you \u2018universe\u2019 distribution component already enabled for all sources; that&#8217;s good!)<\/li><li><kbd>sudo add-apt-repository ppa:mkusb\/unstable<\/kbd><\/li><li><kbd>sudo apt update<\/kbd><\/li><li><kbd>sudo apt install mkusb<\/kbd><\/li><li><kbd>sudo apt install usb-pack-efi\u00a0\u00a0<\/kbd><\/li><\/ol><\/li><li>Now click on the little mouse icon in the upper left and start typing \u201c<kbd>mkusb<\/kbd>\u201d in the Search box. A green icon with a stylized USB-pitchfork will pop up. It will be labelled \u201c<strong>mkusb<\/strong>\u201d\u00a0 Click it to launch the software.<\/li><li>The program will ask \u201c<code>Run mkusb versin dus?<\/code>\u201d click <strong>YES<\/strong><\/li><li>The program will warn you that the target device will be overwritten. That\u2019s the point, so click <strong>OK<\/strong>.<\/li><li>Chose \u201c<kbd><strong>i<\/strong><\/kbd>\u201d (for \u201c<strong><em>install (make a boot device)<\/em><\/strong>\u201d) and click <strong>OK<\/strong><\/li><li>Chose \u201c<strong><kbd>p<\/kbd><\/strong>\u201d (for &#8220;<strong><em>\u2018persistent live\u2019\u2014only Debian and Ubuntu<\/em><\/strong>&#8220;) and click <strong>OK<\/strong><\/li><li>Select your <strong><em>.iso <\/em><\/strong><\/li><li>Plug in <strong>USB B<\/strong>.<\/li><li>Select USB B in <strong>mkusb<\/strong> and click <strong>OK<\/strong>.<\/li><li>A new window will open labeled \u201c<em><strong>persistent live drive settings<\/strong><\/em>\u201d. Click <strong>Use defaults<\/strong>.<\/li><li>Another new window will open labeled  \u201c<em><strong>select space for persistence (percent)<\/strong><\/em>\u201d. click <strong>Use default<\/strong>.<\/li><li>One more new window will open labeled  \u201c<em><strong>select version of usb-pack<\/strong><\/em>\u201d. click <strong>Use default<\/strong>.<\/li><li>Next you&#8217;ll get the \u201c<em><strong>final checkpoint, go ahead?<\/strong><\/em>\u201d dialogue. Select the \u201c<strong>Go<\/strong>\u201d radio button and click <strong>Go<\/strong>.<\/li><li>Wait. A bunch of stuff will happen in the various open terminal windows. That&#8217;s good.<\/li><li>When all of the operations are complete you can click the <strong>OK<\/strong> button. Shutdown the computer (click on the mouse icon in the upper left corner and then click the shutdown power button in the lower right corner of that menu.)<\/li><li><em>Phew!<\/em> Done! Now let&#8217;s test it out. To boot up your persistent Xubuntu flash drive:<ol><li>Unplug <strong>USB A<\/strong> and plug in <strong>USB B<\/strong>.<\/li><li>Turn on Mac by holding down the <kbd>Power button<\/kbd> and <kbd>Option<\/kbd> key at the same time.<\/li><\/ol><ol><li>Release the <kbd>Option<\/kbd> key When the <strong>Startup Manager<\/strong> screen appears.<\/li><li>Select your USB flash drive from the list.<\/li><li>The next menu is the &#8220;Grub&#8221; menu; it&#8217;s simple and text-based. Highlight the top option (it ends in &#8220;<strong>persistent live<\/strong>&#8221; and is probably already highlighted). Hit <kbd>Enter<\/kbd>. Xubuntu loads as before (likely skipping the big &#8220;Install\/Try Xubuntu&#8221; dialogue box).<\/li><li>Poke around for a bit and familiarize yourself with Xubuntu.  Change the desktop background (there are several ways to do so; one is to right click anywhere on the desktop. Or you can click on that little mouse icon in the upper left and look for <strong>Settings<\/strong>). Once you&#8217;ve picked a new background for your desktop, shutdown the computer entirely, and then boot back into your Xubuntu flash drive again.  If all is working well, then you should still see the new background image you picked. <\/li><\/ol><\/li><li>Since you no longer need <strong>USB A<\/strong> for anything, feel free to format it (as per Procedure #1 Step #3 above\u2014to avoid confusion give it a new name, like &#8220;first clone&#8221;), and then use Etcher to <a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/software-install-config-xubuntu-pyckbot-mcc\/cloning-your-robot-brain-on-a-stick\/\">clone<\/a> USB B onto this fresh flash drive.<\/li><\/ol><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">All done! You&#8217;re ready for the next step. Go back to the &#8220;<a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/software-install-config-xubuntu-pyckbot-mcc\/#install-pyckbot\">Install PyCKBot<\/a>&#8221; section of <strong><a href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/software-install-config-xubuntu-pyckbot-mcc\/\">Software<\/a><\/strong> and carry on.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prepping the Flash Drive and Installing Xubuntu It currently is not possible to make a bootable persistent Xubuntu USB flash drive (i.e., one you can boot up from and save your work to) exclusively using macOS. So we&#8217;re going to break this into two procedures: First we&#8217;ll create a bootable read-only Xubuntu USB flash drive (which is fast and easy in macOS), and then we&#8217;ll use that flash drive to run Xubuntu and create a second fully fledged readable\/writable &#8220;persistent&#8221;&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/create-your-website-with-blocks\/software-install-config-xubuntu-pyckbot-mcc\/prep-the-flash-drive-using-macos-10-14-and-later\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":35,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-320","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":7,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/320\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/320\/revisions\/359"}],"up":[{"embeddable":true,"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/pages\/35"}],"wp:attachment":[{"href":"https:\/\/mileggedrobots.eecs.umich.edu\/index.php\/wp-json\/wp\/v2\/media?parent=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}