<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>eldergods.org &#187; OpenSolaris</title>
	<atom:link href="http://www.eldergods.org/wp/category/unix/opensolaris/feed" rel="self" type="application/rss+xml" />
	<link>http://www.eldergods.org/wp</link>
	<description>We can't stop here.  This is bat country.</description>
	<lastBuildDate>Tue, 20 Jul 2010 00:55:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Solaris recovery</title>
		<link>http://www.eldergods.org/wp/2008/03/solaris-recovery</link>
		<comments>http://www.eldergods.org/wp/2008/03/solaris-recovery#comments</comments>
		<pubDate>Sun, 23 Mar 2008 23:15:38 +0000</pubDate>
		<dc:creator>mcclung</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.eldergods.org/?p=26</guid>
		<description><![CDATA[Recently, a friend contacted me about recovery of a Solaris box he had made a bit of a mistake on. The problem was, he had moved everything from / into a subdirectory of /, let&#8217;s call it /cores for our purposes here. Commands wouldn&#8217;t work. He had a running /sbin/sh shell but that was it&#8230;. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, a friend contacted me about recovery of a Solaris box he had made a bit of a mistake on.    The problem was, he had moved everything from / into a subdirectory of /, let&#8217;s call it /cores for our purposes here.   Commands wouldn&#8217;t work.    He had a running /sbin/sh shell but that was it&#8230;. so shell built-ins were all he could do e.g. &#8220;echo *&#8221;.    We fixed it pretty quick, with only minor residual problems, but I thought I&#8217;d put down the method here in case it helps someone sometime.</p>
<p>The first problem is that libraries are no longer found along their proper paths&#8230;. libc.so is the first problem.   That&#8217;s easily fixed, however.</p>
<pre>
# export LD_LIBRARY_PATH=/cores/usr/lib:/cores/lib
</pre>
<p>That&#8217;s the simple part, I&#8217;m sure most people know the LD_LIBRARY_PATH tricks to force searching for libraries in other directories.   The part that I don&#8217;t think people get is&#8230; once you&#8217;ve done that &#8220;ld.so.1&#8243; (the runtime linker) is still in the wrong place.   ld.so.1 is responsible for using the LD_* variables in the first place, among the many other wonderful things it does.   So running commands from, for example, /cores/usr/bin is still impossible, at least in the standard way.</p>
<p>The second and final trick you need to fix this is to use ld.so.1 to &#8220;run&#8221; the executable.   So, this fails:</p>
<pre>
# /cores/usr/bin/mv /cores/* /
mv: Cannot find /usr/lib/ld.so.1
Killed
</pre>
<p>But this allows you to run a command like you&#8217;d expect:</p>
<pre>
/cores/usr/lib/ld.so.1 /cores/usr/bin/mv /cores/* /
</pre>
<p>Turns out, you can use &#8220;ld.so.1&#8243; as an &#8220;interpreter&#8221; of sorts for executables on some flavors of Unix.    At least Solaris and Linux, but I would not be surprised if this works elsewhere, I simply haven&#8217;t tested it.  On Linux, for example, you would use something like:</p>
<pre>
/lib/ld-linux.so.2 /bin/ls
</pre>
<p>To run &#8220;ls&#8221; in this fashion.</p>
<p>The lesson, boys and girls, is to know your runtime linker, it may save you one day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eldergods.org/wp/2008/03/solaris-recovery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The results are in&#8230;</title>
		<link>http://www.eldergods.org/wp/2006/05/the-results-are-in</link>
		<comments>http://www.eldergods.org/wp/2006/05/the-results-are-in#comments</comments>
		<pubDate>Mon, 29 May 2006 19:02:29 +0000</pubDate>
		<dc:creator>mcclung</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.eldergods.org/?p=6</guid>
		<description><![CDATA[With a full make clobber that it has to do on the source tree before it can start to compile, the OpenSolaris nightly build takes a long time: (5) mcclung@dogstar: time nightly ./opensolaris.sh 40724.25u 7185.90s 15:02:27.12 88.4% This is 5.11 svn_38. It&#8217;s faster in an untouched OpenSolaris tree, I think, I will have to test [...]]]></description>
			<content:encoded><![CDATA[<p>With a full make clobber that it has to do on the source tree before it can start to compile, the OpenSolaris nightly build takes a long time:</p>
<pre>
(5) mcclung@dogstar: time nightly ./opensolaris.sh
40724.25u 7185.90s 15:02:27.12 88.4%
</pre>
<p>This is 5.11 svn_38.  It&#8217;s faster in an untouched OpenSolaris tree, I think, I will have to test that as well.  Even with all the other stuff I compiled for /usr/local during the first build, it only took 11-12 hours.</p>
<p>I&#8217;m assuming we&#8217;re still somewhat limited by the 650MHz CPU.   I don&#8217;t think it&#8217;s using that much RAM, and I don&#8217;t see that we&#8217;re swapping (machine has 1GB of RAM.)   The real limit is probably disk I/O, but I&#8217;ll have to verify that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eldergods.org/wp/2006/05/the-results-are-in/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome to OpenSolaris</title>
		<link>http://www.eldergods.org/wp/2006/05/welcome-to-opensolaris</link>
		<comments>http://www.eldergods.org/wp/2006/05/welcome-to-opensolaris#comments</comments>
		<pubDate>Sat, 27 May 2006 21:39:23 +0000</pubDate>
		<dc:creator>mcclung</dc:creator>
				<category><![CDATA[OpenSolaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.eldergods.org/?p=5</guid>
		<description><![CDATA[Recently, I bought a Sunblade 150 off of Ebay to experiment with OpenSolaris. I considered getting another PC specifically for this project, but eventually my nostalgia for Sun SPARC gear won out and I got it&#8230; it wasn&#8217;t even that expensive. I did end up replacing the RAM and adding a second IDE drive to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I bought a Sunblade 150 off of <a href="http://www.ebay.com/">Ebay</a> to experiment with <a href="http://www.opensolaris.org/">OpenSolaris</a>.  I considered getting another PC specifically for this project, but eventually my nostalgia for Sun SPARC gear won out and I got it&#8230; it wasn&#8217;t even that expensive.  I did end up replacing the RAM and adding a second IDE drive to it, which all seems to be working fine.   I had earlier tried to get OpenSolaris working on a Sun Ultra 10 <a href="http://www.polliard.com">someone</a> has on semi-permenent loan to me.  With only 128MB of RAM it didn&#8217;t seem to want to boot SunOS 5.10 or 5.11 svn_16 (although it runs <a href="http://www.gentoo.org/">Gentoo</a> just fine, if slowly).  Between that and having a couple of 9GB drives in it, that wasn&#8217;t an ideal platform.
</p>
<p>I&#8217;m hoping, as time goes on, to become more familiar with the internals of OpenSolaris.  I had some exposure in a couple of classes, mostly the SunOS 5.5.1 device drivers class I took way back in 1996.   If nothing else, this will give me more practice on Solaris features that became available in SunOS 5.10, such as <a href="http://www.sun.com/bigadmin/content/dtrace/">Dtrace</a></p>
<p>My first project is to time the compile of the complete system using the nightly command.  I timed it before, but it wasn&#8217;t a fair test because I was compiling several things at the same time, as sort of a stress test of the system after I replaced all the memory.   I&#8217;ll post the results here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eldergods.org/wp/2006/05/welcome-to-opensolaris/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
