<?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>lesslinux.org Development Blog &#187; Uncategorized</title>
	<atom:link href="http://blog.lesslinux.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.lesslinux.org</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 04 Feb 2011 20:22:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Do it yourself: Build stage01 and stage02</title>
		<link>http://blog.lesslinux.org/do-it-yourself-build-stage01-stage02/</link>
		<comments>http://blog.lesslinux.org/do-it-yourself-build-stage01-stage02/#comments</comments>
		<pubDate>Wed, 05 May 2010 10:58:35 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=56</guid>
		<description><![CDATA[I recently assembled the build script to compile a completely free and open version of the Rescue System that started life as &#8220;Computerbild Notfall-CD 2.0&#8243;. The free version is dubbed &#8220;LessLinux Search and Rescue&#8221; and can be easily modified to build your own derivates. In the next three days I will guide you through the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently assembled the build script to compile a completely free and open version of the Rescue System that started life as &#8220;Computerbild Notfall-CD 2.0&#8243;. The free version is dubbed &#8220;LessLinux Search and Rescue&#8221; and can be easily modified to build your own derivates. In the next three days I will guide you through the whole build process (kind of real time). </p>
<p>Currently the only supported build environment is VMware, this means you must have either VMware Workstation, VMware Player (Win, Linux) or VMware Fusion (Mac OS X) installed. Player is sufficient, since the build environments are considered as some kind of &#8220;disposable environment&#8221;. Note that the VMware image expands to up to 80GB, to prevent fragmentation and reach best performance you might want to put it on a separate partition. <span id="more-56"></span></p>
<p>You might download the VMware image from: <a href="http://download.lesslinux.org/builder/vmware-images/">http://download.lesslinux.org/builder/vmware-images/</a>. This howto uses the file <tt>LessLinux_Builder_20100504_Ubuntu_910.zip</tt>. Unpack it and run it by calling <tt>ubuntu.vmx</tt>.  As soon as the virtualized Ubuntu is fully started up, you can log in as <tt>root</tt> with an empty password. Set the password with the command <tt>passwd</tt> (note that at this point an english keyboard is active &#8211; for german readers this means &#8220;z&#8221; and &#8220;y&#8221; are swapped!). Log out and log in again using <tt>ssh</tt>.</p>
<h3>Building stage01</h3>
<p>The build of stage01 closely ressembles <a href="http://www.linuxfromscratch.org/lfs/view/stable/chapter05/chapter05.html">this chapter of the Linux From Scratch handbook</a>. We basically build a set of tools under <tt>/tools</tt> that are later used to build the system itself in the second stage. Since just glibc, the toolchain and some of the basic Linux utilities are build, this step takes usually one and a half to four hours.</p>
<p>When logged in, change your directory to <tt>/mnt/archiv/LessLinux</tt>, there create three new subdirectories:</p>
<pre>    cd /mnt/archiv/LessLinux
    mkdir llbuild llbuilder src</pre>
<p>Change to <tt>llbuilder</tt> and download and unpack the source/script tarball of the release you intend to build:</p>
<pre>    cd /mnt/archiv/LessLinux/llbuilder
    wget http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20100507-000000-buildscripts.tar.bz2
    tar xvjf lesslinux-search-and-rescue-uluru-20100507-000000-buildscripts.tar.bz2</pre>
<p>This results in a new directory <tt>lesslinux-builder</tt>, change to this directory and start building of the first stage:</p>
<pre>    cd /mnt/archiv/LessLinux/llbuilder/lesslinux-builder
    ruby builder.rb -n -s 2,3</pre>
<p>This command tells the script <tt>builder.rb</tt> to run no tests and to skip the second stage (build of software within the chroot) as well as the third stage (assembly of the live system). When finished a backup of the resulting chroot environment as well as of the database at this point will be made &#8212; we will refer to those later.</p>
<h3>Building stage02</h3>
<p>In stage02 all the software defined in the XML build definitions in <tt>/mnt/archiv/LessLinux/llbuilder/lesslinux-builder/scripts/stage02</tt> will be built. Since two kernels, Firefox, Thunderbird and lots of &#8220;expensive&#8221; C++-stuff are built you should calculate between one and four days for this build:</p>
<pre>    cd /mnt/archiv/LessLinux/llbuilder/lesslinux-builder
    ruby builder.rb -n -s 1,3</pre>
<p>It is also possible to specify breakpoints. This means to interrupt the build procedure after a certain package is being built. This feature is usually intended to build package by package after large changes to the package versions or build parameters. For example to stop right after <tt>xz</tt> (before building the kernels):</p>
<pre>    ruby builder.rb -n -s 1,3 -d xz</pre>
<p>You might want to take a look at the XML files located in <tt>scripts/stage02</tt> to determine where to take breaks.</p>
<p>That&#8217;s it. As soon as you (and my stage02) build is complete, I will tell you how to assemble an actual working live system in stage03!</p>
<h3>Notes</h3>
<ul>
<li>If a FTP download hangs, you might interrupt it by pressing <tt>Ctrl+C</tt>, then the download should try again via HTTP</li>
<li>If the build cannot start due to missing files you might either remove the stage02 build definition that uses the missing file or you manually download the file</li>
<li>VMware will suspend if you work on a nearly full file system, to prevent a dropped SSH connection from interrupting a build, use <tt>screen</tt></li>
<li>If you started with <tt>lesslinux-search-and-rescue-uluru-20100413-192604-buildscripts.tar.bz2</tt> the build fails at <tt>gnutls</tt>, in this case unpack <a href="http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20100507-000000-buildscripts.tar.bz2">lesslinux-search-and-rescue-uluru-20100507-000000-buildscripts.tar.bz2</a> in <tt>/mnt/archiv/LessLinux/llbuilder</tt> (this will replace <tt>scripts/stage02/5282_gnutls.xml</tt> and <tt>scripts/pkg_content/gnutls-2.8.6.xml</tt>), then run again <tt>builder.rb</tt>, the build will now continue and finish.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/do-it-yourself-build-stage01-stage02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

