{"id":25,"date":"2008-10-26T21:05:01","date_gmt":"2008-10-26T21:05:01","guid":{"rendered":"http:\/\/clayb.net\/blog\/?p=25"},"modified":"2012-05-04T19:38:30","modified_gmt":"2012-05-04T19:38:30","slug":"creating-opensolaris-usb-sticks-is-easy","status":"publish","type":"post","link":"https:\/\/clayb.net\/blog\/creating-opensolaris-usb-sticks-is-easy\/","title":{"rendered":"Creating OpenSolaris USB Sticks Is Easy!"},"content":{"rendered":"<p>Putting OpenSolaris on a USB stick is part of the distribution<br \/>\nconstructor project. It&#8217;s very simple, however, right now, one must be running on a Solaris host; though there are some interesting ways to get around this, just we need someone to spend some time to do it. Well, on a Solaris host, to begin with:<br \/>\n<!--more--><\/p>\n<ol>\n<li>Get the distribution constructor:<\/li>\n<dd>\n<p>To get the OpenSolaris <a href=\"http:\/\/www.opensolaris.org\/os\/project\/caiman\/\">Caiman Project<\/a> (which includes the <a href=\"http:\/\/www.opensolaris.org\/os\/project\/caiman\/Constructor\/\">Distribution Constructor<\/a>) use Mercurial (see <a href=\"http:\/\/opensolaris.org\/os\/community\/arc\/caselog\/2006\/417\/materials\/hg-1-txt\/\">hg(1)<\/a>).<\/p>\n<\/dd>\n<dd>\n<p><strike>This would put the project&#8217;s &#8220;gate&#8221; into a folder called <tt>slim_source<\/tt>:<br \/><tt>hg clone ssh:\/\/anon@hg.opensolaris.org\/hg\/caiman\/slim_source slim_source<\/tt><\/strike><\/p>\n<\/dd>\n<dd>\n<p>One can now use the SUNWdistro-const IPS package on OpenSolaris, if running build 99 or newer, to get the Distribution Constructor! To install SUNWdistro-const use the Package Manager GUI or issue the following command (as root, or using <tt>pfexec(1)<\/tt>) <tt>pkg install SUNWdistro-const<\/tt>.<\/p>\n<\/dd>\n<li>Next, get an OpenSolaris ISO image:<\/li>\n<dd>\n<p>To get the latest development build of OpenSolaris, see the main page of <a href=\"http:\/\/genunix.org\/\">http:\/\/genunix.ORG<\/a> for ISOs, however, the latest full release of OpenSolaris can be found by going to <a href=\"http:\/\/OpenSolaris.COM\/get\">http:\/\/OpenSolaris.COM\/get<\/a><\/p>\n<\/dd>\n<li>Now, create the USB image:<\/li>\n<dd>\n<p>Here, one use of the Distribution Constructor is to take an ISO image and change the grub menu entries for a USB device (opposed to a CD\/DVD) and change some permissions for running on a read-write media instead of a read-only one.<\/p>\n<\/dd>\n<dd>\n<p>To generate a USB image from an ISO run: <tt><strike>slim_source\/usr\/src\/cmd\/install-tools\/<\/strike>\/usr\/bin\/usbgen &lt;iso&gt; &lt;new usb file&gt; \/tmp<\/tt>.<\/p>\n<\/dd>\n<li>Copy it to a USB stick (or hard disk):<\/li>\n<dd>\n<p>Lastly, the Distribution Constructor can copy the image to a USB disk (memory stick or hard disk). (This is what currently requires Solaris.) Here, the stick has fdisk(1) run on it and the Grub menu written. A nifty idea which was putback by <a href=\"http:\/\/blogs.sun.com\/bill\/\">Bill Moore<\/a> uses dd(1) to copy blocks and since USB sticks tend to be relatively unreliable, uses md5sum(1) to checksum what was written matches what should have been.<\/p>\n<\/dd>\n<dd>\n<p>To copy the image, run <tt><strike>slim_source\/usr\/src\/cmd\/install-tools\/<\/strike>\/usr\/bin\/usbcopy &lt;new usb file&gt;<\/tt>.<\/p>\n<\/dd>\n","protected":false},"excerpt":{"rendered":"<p>A question I get asked often is, &#8220;How do I create OpenSolaris USB sticks?&#8221; Well, it&#8217;s super simple, here&#8217;s how&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts\/25"}],"collection":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":0,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"wp:attachment":[{"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clayb.net\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}