<?xml version="1.0"?><rss version="2.0">
<channel>
  <title>Alan&#039;s Ramblings - beadm tag</title>
  <link>http://bleaklow.com:80/tags/beadm/</link>
  <description>My opinions may be incorrect, but they are my own</description>
  <language>en</language>
  <copyright>Alan Burlison</copyright>
  <lastBuildDate>Wed, 23 Nov 2011 16:42:03 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  <image>
    <url>http://bleaklow.com/images/misc/logo.gif</url>
    <title>Alan&#039;s Ramblings</title>
    <link>http://bleaklow.com:80/</link>
  </image>
  <item>
    <title>Upgrading from Nevada to OpenSolaris the easy way</title>
    <link>http://bleaklow.com:80/2009/10/21/upgrading_from_nevada_to_opensolaris_the_easy_way.html</link>
    <description>
          &lt;p&gt;
The OpenSolaris installer is simple and quick to use but it has one significant drawback - it gives you no control of how your disk is laid out.  I needed to upgrade my Toshiba R500 laptop from Nevada to OpenSolaris and I had the disk set up with 3 VTOC slices - 2 ZFS pools, one for the root pool and one for a data pool - home dirs, installed software and so on.  The final slice is a raw swap device. A straightforward install would have overwritten the entire disk, so I wanted to find a way of installing without clobbering everything. &lt;a href=&#034;http://blogs.sun.com/edp/entry/moving_from_nevada_and_live&#034;&gt;Ed Pilatowicz&lt;/a&gt; outlined some time back how you could do a hand-crafted OpenSolaris install to work around this, but I wanted to see if there was an easier way of achieving the same result with a more recent build of OpenSolaris.
&lt;/p&gt;
&lt;p&gt;
My first attempt was to use the OpenSolaris 2009.06 livecd to install OpenSolaris onto a 8Gb USB stick so I could boot off that and have a poke around.  That was fairly straightforward, but when I tried importing the existing root pool from the disk I hit a problem - the Nevada build I was running was onnv_124, but 2009.06 was based on 111b and the ZFS format has been rev&#039;d since then so the pool wouldn&#039;t import.  I then tried to update my USB image to build 125, but the stick wasn&#039;t big enough for the 125 BE and the &#039;&lt;a href=&#034;http://opensolaris.org/sc/src/pkg/gate/src/man/pkg.1.txt&#034;&gt;pkg image-update&lt;/a&gt;&#039; failed.  Drat.
&lt;/p&gt;
&lt;p&gt;
Third try was to pull a build 125 livecd image from the internal repo, boot off that and do a fresh install onto the USB stick.  As before that worked fine so I rebooted off the USB stick.  When I originally installed Nevada I had renamed the root pool from &#039;rpool&#039; to &#039;solaris&#039;, so I typed &#039;&lt;a href=&#034;http://docs.sun.com/app/docs/doc/819-2240/zpool-1m&#034;&gt;zpool import solaris&lt;/a&gt;&#039; and my existing boot pool on the drive appeared - looking good so far.  Next thing to try was &#039;&lt;a href=&#034;http://dlc.sun.com/osol/docs/content/2008.11/snapupgrade/ggfxy.html&#034;&gt;beadm list&lt;/a&gt;&#039;, and not only did my OpenSolaris BE show up, but the Nevada BEs on the drive also appeared.  Ok, so far so good.
&lt;/p&gt;
&lt;p&gt;
Now I needed to try to get an OpenSolaris BE onto the disk root pool.  Worst case I could just blow away the existing root pool on the drive and create an OpenSolaris BE in that, but I wanted to see if I could preserve the existing Nevada BEs if possible.  As Nevada and OpenSolaris are very similar and as I was using Nevada 124 and OpenSolaris 125 I figured there was a reasonable chance that if I could just get an OpenSolaris BE into the existing root pool I&#039;d be able to get it into the grub config so I could boot it, even if that meant some hand-editing of menu.lst.
&lt;/p&gt;
&lt;p&gt;
The easiest way to get an OpenSolaris BE onto the disk was to use &#039;beadm create&#039;.  Normally that creates the new BE on the same volume as the source BE, but there&#039;s a &#039;-p&#039; flag that allows you to specify an alternate pool to do the install into, which in my case was the existing &#039;solaris&#039; pool on my disk - so, &#039;beadm create -p solaris on_125&#039;.  That seemed to work OK, so with everything appropriately crossed I typed &#039;beadm activate on_125&#039; and rebooted.  When Grub appeared, my new OpenSolaris BE was listed along with my existing Nevada ones, and both the OpenSolaris and Nevada BEs work just fine.  Huzzah!
&lt;/p&gt;
&lt;p&gt;
So, to summarise, here are the steps:
&lt;ul&gt;
&lt;li&gt;Make sure you are running a recent Nevada release&lt;/li&gt;
&lt;li&gt;&lt;a href=&#034;http://dlc.sun.com/torrents/info/&#034;&gt;Obtain&lt;/a&gt; an OpenSolaris LiveCD image that is close to or the same as your Nevada release&lt;/li&gt;
&lt;li&gt;Install OpenSolaris onto a spare disk - a 8Gb or larger USB memory stick or a USB disk will do fine&lt;/li&gt;
&lt;li&gt;Boot into the OpenSolaris image&lt;/li&gt;
&lt;li&gt;Import your existing root zpool - see below why this many not be as easy for you as it was for me&lt;/li&gt;
&lt;li&gt;Create a new OpenSolaris BE on the imported pool with &#039;beadm&#039; using the &#039;-p&#039; flag to specify the imported pool&lt;/li&gt;
&lt;li&gt;Activate the new BE&lt;/li&gt;
&lt;li&gt;Reboot, and you should see your existing Nevada BEs along with the OpenSolaris one which will be booted by default&lt;/a&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
Some caveats - this is clearly unsupported, don&#039;t be surprised if it doesn&#039;t work with a different mix of OpenSolaris and Nevada builds and don&#039;t blame me if it fries your machine.  Also, this isn&#039;t a true upgrade in that you end up with a new OpenSolaris install and you&#039;ll have to manually migrate the necessary config from your Nevada BE into the OpenSolaris one - but at least you&#039;ll still have your Nevada BE :-) The final thing is I definitely got lucky - When I originally installed I&#039;d renamed my Nevada root pool from &#039;rpool&#039; to &#039;solaris&#039;.  That meant I could import it without it conflicting with the name of the root pool on the USB stick.  If I hadn&#039;t done so I&#039;d have to have imported it using the pool identifier and a new name.  That would almost certainly have invalidated the contents of the menu.lst on that drive, so unless beadm fixed it up for me I&#039;d have had to do some surgery to fix it up.  If you try this yourself and figure out what&#039;s needed, please drop me a comment to let me know what you did :-)
&lt;/p&gt;</description>
      <category>Solaris</category>
    <category>Tech</category>
    <category>Work</category>
    <comments>http://bleaklow.com:80/2009/10/21/upgrading_from_nevada_to_opensolaris_the_easy_way.html#comments</comments>
    <guid isPermaLink="true">http://bleaklow.com:80/2009/10/21/upgrading_from_nevada_to_opensolaris_the_easy_way.html</guid>
    <pubDate>Wed, 21 Oct 2009 11:26:00 GMT</pubDate>
  </item>
  </channel>
</rss>

