<?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>Running Systems&#187; flar</title>
	<atom:link href="http://run.tournament.org.il/tag/flar/feed/" rel="self" type="application/rss+xml" />
	<link>http://run.tournament.org.il</link>
	<description>(and me chasing them)</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:50:14 +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>How to create self-contained Solaris 10 x86 Jumpstart kit</title>
		<link>http://run.tournament.org.il/how-to-create-self-contained-solaris-10-x86-jumpstart-kit/</link>
		<comments>http://run.tournament.org.il/how-to-create-self-contained-solaris-10-x86-jumpstart-kit/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 11:43:00 +0000</pubDate>
		<dc:creator>ez-aton</dc:creator>
				<category><![CDATA[Scripting/Programing]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[flar]]></category>
		<category><![CDATA[flash image]]></category>
		<category><![CDATA[solaris 10]]></category>
		<category><![CDATA[solaris installation]]></category>

		<guid isPermaLink="false">http://www.tournament.org.il/run/?p=523</guid>
		<description><![CDATA[I was required to create a self-contained, single DVD to automate the installation of Solaris 10 on x86_64. I could not find any up-to-date straight forward guide which can explain how to do it, so I do it here. This is not an explanation for dummies, so you must know (to some degree, of course) [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I was required to create a self-contained, single DVD to automate the installation of Solaris 10 on x86_64. I could not find any up-to-date straight forward guide which can explain how to do it, so I do it here. This is not an explanation for dummies, so you must know (to some degree, of course) what you&#8217;re doing.</p>
<p>I will describe the procedure in whole, and will explain in greater details below, if I see fit. A section which will be explained later will be marked with <strong>(*)</strong> at the end of the line.</p>
<ul>
<li>Install Solaris 10 x86 on a machine. Many actions will happen on this little server&#8230;</li>
<li>Setup your Solaris installation according to your likings. Make sure you have your beloved users, your passwords, your configurations. Don&#8217;t mind much about networking configurations (IP, Netmask, etc) &#8211; as they will be unconfigured for the image.</li>
<li>Create a <strong>Flash Image</strong> (flar) of the system <strong>(*)</strong></li>
<li>Copy the contents of the installation DVD to a directory inside your system. Let&#8217;s call it /tmp/dvd</li>
<li>Remove /tmp/dvd/Solaris_10/Product directory. You will not need it.</li>
<li>Extract the contents of /tmp/dvd/x86.miniroot to /tmp/miniroot <strong>(*)</strong></li>
<li>Perform several actions with the extracted miniroot <strong>(*)</strong></li>
<li>Re-archive the contents of the x86.miniroot and place them instead of /tmp/dvd/boot/x86.miniroot</li>
<li>Place the flar file inside /tmp/dvd/flash</li>
<li>Edit your jumpstart files inside /tmp/dvd/.install_config <strong>(*)</strong></li>
<li>Edit /tmp/dvd/boot/grub/menu.lst boot loader to add an entry for your installation <strong>(*)</strong></li>
<li>Create an ISO from the DVD directory <strong>(*)</strong></li>
<li>Burn the DVD and try to use it</li>
</ul>
<p>And now for the drill-down</p>
<p style="text-align: center"><strong>Creating a flash image</strong></p>
<p>Use the command flarcreate to create your own flash image:</p>
<blockquote><p>flarcreate -n sol10_automation -c -x /tmp /tmp/sol10_auto.flar</p></blockquote>
<p>This should do the work. Remember &#8211; /tmp will not be persistent across reboots! Make sure your files are not there before you reboot the system!</p>
<p style="text-align: center"><strong>Extracting/Archiving the x86.miniroot</strong></p>
<p>To do so, you need to run the command /boot/solaris/bin/root_archive</p>
<p>Extracting the image can be done like this:</p>
<blockquote><p>/boot/solaris/boot/root_archive <strong>unpack</strong> /tmp/dvd/boot/x86.miniroot /tmp/miniroot</p></blockquote>
<p>Archiving the image can be done like this:</p>
<blockquote><p>/boot/solaris/boot/root_archive <strong>pack</strong> /tmp/dvd/boot/x86.miniroot /tmp/miniroot</p></blockquote>
<p style="text-align: center"><strong>Actions to perform on the extracted miniroot</strong></p>
<p>Three actions are to be performed on the extracted miniroot. In our example, it resides on /mnt/miniroot.</p>
<p>First, you need to remove the default sysidcfg (which is a symbolic link)</p>
<blockquote><p>rm /mnt/miniroot/etc/sysidcfg</p></blockquote>
<p>Now, you have to place your custom sysidcfg in there, instead.</p>
<p>This is an example of my own sysidcfg file:</p>
<blockquote><p>name_service=NONE<br />
network_interface=nge0 {primary hostname=sol10<br />
ip_address=10.10.10.10<br />
netmask=255.0.0.0<br />
default_route=NONE<br />
protocol_ipv6=no }<br />
nfs4_domain=dynamic<br />
service_profile=open<br />
root_password=12wR2rF34t<br />
security_policy=NONE<br />
system_locale=en_US.UTF-8<br />
timezone=GMT<br />
timeserver=localhost<br />
keyboard=US-English<br />
terminal=xterm</p></blockquote>
<p>The root password is encrypted. Take it from your own /etc/shadow file. For more information about sysidcfg file, check out Sun site.</p>
<p>Following that, you need to edit a specific file in the miniroot. Edit <em>/tmp/miniroot/usr/sbin/install.d/profind</em> and search for the <em>cdrom()</em> function. Search the line</p>
<blockquote><p>if [ -f /tmp/.preinstall ]; then</p></blockquote>
<p>and hash (remark) it. Don&#8217;t forget to remark the closing &#8220;fi&#8221; below.</p>
<p style="text-align: center"><strong>Jumpstart contents</strong></p>
<p>This <strong>has</strong> to be inside /tmp/dvd/.install_config . Edit the file <em>/tmp/dvd/.install_config/rules<strong> </strong></em>and make sure it has only one line (in our example. If you know what you&#8217;re doing with Jumpstart, go ahead!)</p>
<blockquote><p>any -   x86-begin any_machine  x86-end</p></blockquote>
<p>This line will match any hardware, run <em>x86-begin</em> script (from that same directory) on it prior to running the installation itself, and run <em>x86-end</em> script on it after the installation phase. It allows up further customisation during installs (verify what type of RAID, check memory, whatever). The installation profile itself is the file any_machine.</p>
<p>You will need to run &#8220;check&#8221; on the file to build the <em>rules.ok</em> file</p>
<blockquote><p>cd /tmp/dvd/.install_conf</p>
<p>/tmp/dvd/Solaris_10/Misc/jumpstart_sample/check</p></blockquote>
<p>Lets look at my <em>any_machine</em> file:</p>
<blockquote><p>install_type    flash_install<br />
archive_location local_file /cdrom/flash/sol10_auto.flar<br />
partitioning    explicit<br />
filesys         any 8196 swap<br />
filesys         any 10240 /<br />
filesys         any free /storage</p></blockquote>
<p>Notice that the installation type is &#8220;flash_install&#8221; and that the location of the file is local, inside /cdrom (where the bootable dvd will be mounted) inside a directory called <em>flash</em>. Partitioning is defined here, explicitly.</p>
<p>For more information about Jumpstart, search in Sun site. They have plenty of information.</p>
<p style="text-align: center"><strong>Edit Grub</strong></p>
<p>Add the following entry to your <em>/tmp/dvd/boot/grub/menu.lst</em> file</p>
<blockquote><p>title Solaris10 Jumpstart<br />
kernel /boot/multiboot kernel/unix &#8211; install -B \<br />
install_media=cdrom<br />
module /boot/x86.miniroot</p></blockquote>
<p>Make sure it is the default option for grub.</p>
<p style="text-align: center"><strong>Creating DVD ISO from the directory</strong></p>
<p>We&#8217;re almost done. To create a DVD iso file from the directory, perform the following actions:</p>
<blockquote><p>cd /tmp/dvd</p>
<p>mkisofs -b boot/grub/stage2_eltorito -c .catalog -no-emul-boot -boot-load-size 4 -boot-info-table -relaxed-filenames -l -ldots -r -N -d -D -V SOL_10_1008_X86 -o /tmp/sodvd.iso .</p></blockquote>
<p>Don&#8217;t ignore the &#8220;.&#8221; at the end!</p>
<p>(This specific line was tested on Linux, but there is no reason for it not to work on any modern Solaris system)</p>
<p style="text-align: center"><strong>Appendix</strong></p>
<p>You would like to keep your /tmp/dvd directory somewhere else, or you will lose it on your next reboot.</p>
<p>This sums it up. Let me know if the procedure is broken somehow.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://run.tournament.org.il/how-to-create-self-contained-solaris-10-x86-jumpstart-kit/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
