<?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; Howto</title>
	<atom:link href="http://blog.lesslinux.org/category/howto/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>Building LessLinux &#8211; stage03, the final ISO</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 20:21:48 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=200</guid>
		<description><![CDATA[So now you are ready building the chroot environment &#8211; then it is time to assemble the final ISO. To do this you need an overlay containing some configuration files for the bootloader. I packaged such an overlay for the current LessLinux Search and Rescue: lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2. You&#8217;ll find more recent overlays here: http://download.lesslinux.org/overlays/, but when [...]]]></description>
			<content:encoded><![CDATA[<p>So now you are ready building the chroot environment &#8211; then it is time to assemble the final ISO. To do this you need an overlay containing some configuration files for the bootloader. I packaged such an overlay for the current LessLinux Search and Rescue: <a href="http://download.lesslinux.org/overlays/lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2">lesslinux-search-and-rescue-uluru-20110202-155012-overlays-en.tar.bz2</a>. You&#8217;ll find more recent overlays here: <a href="http://download.lesslinux.org/overlays/">http://download.lesslinux.org/overlays/</a>, but when building care that overlay and buildscripts match. Unpack the overlay in the folder <tt>/mnt/archiv/LessLinux</tt>.<span id="more-200"></span></p>
<h3>Building</h3>
<p>The building again involves builder.rb. This time more parameters are needed:</p>
<pre>    ruby builder.rb -u -n -s 1,2,bootconf \
        -p config/pkglist_neutral_rescue.txt \
        -c config/general_neutral_rescue.xml \
        -b config/branding_neutral_rescue.xml \
        -k config/kernels_rescue_unstable.xml > ../../llbuild/stage03.log 2>&#038;1</pre>
<p>The parameters are as follows: </p>
<ul>
<li>-u: build unstable, must match stage02</li>
<li>-s: skip stages 1 and 2 and skip the generation of boot configuration files</li>
<li>-p: use this package list</li>
<li>-c: use this configuration file (specifies paths like the overlay)</li>
<li>-b: use this branding</li>
<li>-k: use the kernels noted here</li>
</ul>
<p>You might also use <tt>--full</tt> to build an ISO containing all files from the chroot environment &#8211; this is self containing and can be used for building. Or use <tt>--skip-files</tt> to specify a filename containing a list of files to omit. After 30 to 40 minutes you&#8217;ll find the new ISO in <tt>/mnt/archiv/LessLinux/llbuild/stage03</tt>.</p>
<p>My next post will tell how to customize kernels and branding.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage03-the-final-iso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building LessLinux &#8211; stage02</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage02/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage02/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 13:11:21 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=186</guid>
		<description><![CDATA[Besides the switch to SQLite there are other big changes regarding the build of stage02, which is the population of the chroot environment:


LessLinux now supports tracking of dependencies after building packages. This allows to define the order of packages to build.


As a consequence of the dependency tracking it is now also possible to parallelize the [...]]]></description>
			<content:encoded><![CDATA[<p>Besides the switch to SQLite there are other big changes regarding the build of stage02, which is the population of the chroot environment:</p>
<ul>
<li>
<p>LessLinux now supports tracking of dependencies after building packages. This allows to define the order of packages to build.</p>
</li>
<li>
<p>As a consequence of the dependency tracking it is now also possible to parallelize the build. On a three core Athlon this brought down build times from around three days to less than 20 hours. With a faster machine you should even get better results.</p>
</li>
</ul>
<p> <span id="more-186"></span></p>
<h3>Prerequesites</h3>
<p>I assume that you already built stage01 on the same machine. If not, just create the directories as we did in the last article and mount the hard disk or partition containing sources and the stage01 chroot. The unprivileged user is not required this time.</p>
<h3>Building</h3>
<p>I prefer redirecting the console messages to a log file (and &#8220;tailing&#8221; it in another terminal). The build and install of the respective pacakges are separately logged to an package specific log file. I will later show how to analyze and them. So change to the build directory and run:</p>
<pre>        ruby -I. builder.rb -s 1,3 -n -u -l -t 7 > /tmp/stage02.log 2>&#038;1</pre>
<p>This command uses six threads maximum. It really depends on your machine how many is ideal. As a rule of thumb, take twice the number of processor cores plus one. Less than three do not make sense, and above ten too many seeks may appear. Anyway: If you have a pretty fast box with a six core processor and you are maybe building on a SSD: try 15 or 20 threads and tell me how it compares to just ten.</p>
<h3>Trouble</h3>
<p>You will occasionally run into a problem where no modified files were found. In this case the builder exits. To find out which package is affected just grep for &#8220;no modified&#8221; in the log file:</p>
<pre>        grep -A2 -i 'no modified' /tmp/stage02.log</pre>
<p>This is most likely due to some race condition: The build or install script is not yet closed, but the builder already tries to run it. Take a look at the files <tt>/mnt/archiv/LessLinux/llbuild/stage02/build/packagename-version.build.log</tt> and <tt>packagename-version.install.log</tt>. If it reads <i>bad interpreter &#8230; text file busy</i> this is the problem. Sometimes the maximum number of open files is the problem, so you should compare the current number of open files with the maximum number during the threaded build.</p>
<p>To re-build the affected package delete the package and the file <tt>/tmp/LessLinux_Emergency_Exit</tt> and run the builder again:</p>
<pre>        rm -rf /mnt/archiv/LessLinux/llbuild/stage02/build/packagename-version* /tmp/LessLinux_Emergency_Exit
        ruby -I. builder.rb -s 1,3 -n -u -l -t 7 >> /tmp/stage02.log 2>&#038;1</pre>
<p>When restarting the build all packages already built are ignored and the builder picks up where it left.</p>
<p>The next post will show how to assemble a working live system from the freshly created stage02.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building LessLinux &#8211; stage01</title>
		<link>http://blog.lesslinux.org/building-lesslinux-stage01/</link>
		<comments>http://blog.lesslinux.org/building-lesslinux-stage01/#comments</comments>
		<pubDate>Thu, 03 Feb 2011 07:48:38 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>
		<category><![CDATA[Packages and Architecture]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=162</guid>
		<description><![CDATA[Many changes were added since my first description of how to build LessLinux. There are two major changes that are worth noting most:


We switched from MySQL to SQLite3 as database during build


LessLinux is self containing now, this means you can use LessLinux to build LessLinux to build LessLinux&#8230;


The stage01 build of LessLinux very closely resembles [...]]]></description>
			<content:encoded><![CDATA[<p>Many changes were added since my first description of how to build LessLinux. There are two major changes that are worth noting most:</p>
<ul>
<li>
<p>We switched from MySQL to SQLite3 as database during build</p>
</li>
<li>
<p>LessLinux is self containing now, this means you can use LessLinux to build LessLinux to build LessLinux&#8230;</p>
</li>
</ul>
<p>The stage01 build of LessLinux very closely resembles the chapter <a href="http://www.linuxfromscratch.org/lfs/view/development/chapter05/chapter05.html">Chapter 5 &#8211; Constructing a Temporary System</a> from <a href="http://www.linuxfromscratch.org/">Linux from Scratch</a>. You&#8217;ll even notice similar environment variables. There will always be slight differences in package versions &#8211; this is intended. So you might be able to build LessLinux on any machine equipped with the right programs to build Linux from Scratch. But in my opinion do one of the two following things:<span id="more-162"></span></p>
<ul>
<li>
<p>Setup a clean Ubuntu 10.04 LTS and install all necessary packages by running<br /><tt>apt-get install ` wget -O - http://download.lesslinux.org/builder/packagelists/20110202_ubuntu_1004_packages.txt `</tt></p>
</li>
<li>
<p>Download the latest FULL ISO, a build of LessLinux containing compilers, headers and stuff. FULL ISO images are currently around 1.5GB and they allow you to build LessLinux without having to permanently setup a build environment. As of this post being written the current FULL ISO is <a href="http://download.lesslinux.org/testing/lesslinux-search-and-rescue/lesslinux-search-and-rescue-uluru-20110202-155012-FULL-en.iso">lesslinux-search-and-rescue-uluru-20110202-155012-FULL-en.iso</a></p>
</li>
</ul>
<p>I strongly recommend to take a dedicated build box &#8211; with the FULL ISO and an USB hard drive the conversion will be temporary. This can be some fairly recent PC (2GHz, 1GB RAM) and a USB hard drive (30GB upwards &#8211; a 32GB thumb drive might also do the job). In the mid term we will concentrate on the self containing builds, so it&#8217;s best to get used to building with FULL ISO. The FULL ISO might also be a good starting point for anyone diving into Linux from Scratch since the versions of GCC and Glibc are usually close to those in LFS.</p>
<h3>Directories and users</h3>
<p>You have great freedom on directory layout and the unprivileged user that is used for building some packages, but for start you should stick with the defaults in LessLinux. </p>
<ul>
<li>
<p>I use <tt>/mnt/archiv/LessLinux</tt> as base for building. This path is used in the default config, so I suggest to keep it by mounting a dedicated build partition to <tt>/mnt/archiv/LessLinux</tt>:</p>
<p><tt>mkdir -p /mnt/archiv/LessLinux<br />mkfs.ext3 /dev/sdx1<br />mount /dev/sdx1 /mnt/archiv/LessLinux<br />mkdir /mnt/archiv/LessLinux/llbuild<br />mkdir /mnt/archiv/LessLinux/llbuilder<br />mkdir /mnt/archiv/LessLinux/src</tt></li>
<li>
<p>Add an unprivileged user for building. He must have <tt>/bin/bash</tt> as a shell, otherwise the build will fail. The default scripts use <tt>mattias</tt> as unprivileged user:</p>
<p><tt>adduser -s /bin/bash mattias</tt></p>
</li>
</ul>
<h3>Downloading and Building</h3>
<p>You&#8217;ll need some buildscripts from <a href="http://download.lesslinux.org/src/">http://download.lesslinux.org/src/</a>. Take either the most recent ones or some that match a certain version you want to build. As I write this, <a href="http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20110202-155012-buildscripts.tbz">lesslinux-search-and-rescue-uluru-20110202-155012-buildscripts.tbz</a> is recommended.</p>
<ul>
<li>
<p>Go to the directory <tt>/mnt/archiv/LessLinux/llbuilder</tt> where you unpack the tarball:</p>
<p><tt>tar xvjf *-buildscripts.tbz</tt></p>
</li>
<li>
<p>Edit the file <tt>lesslinux-builder/config/general.xml</tt> and change the node <tt>unpriv</tt> to contain the username of the unprivileged user created above</p>
</li>
<li>
<p>Change to the newly created directory <tt>lesslinux-builder</tt>, from there run:</p>
<p><tt>ruby -I. builder.rb -s 2,3 -n -u</tt></p>
</li>
</ul>
<p>This tells the builder to do an unstable (<tt>-u</tt>) build (glibc 2.12 and kernel 2.6.37 instead of glibc 2.11 and kernel 2.6.36). In a view days, I&#8217;ll move it to stable and take 2.6.38-rc and glibc 2.13 as unstable. The <tt>-n</tt> tells to omit tests. When making changes to stage01, you would probably omit this to run tests to discover problems. Finally <tt>-s</tt> makes the builder skipping stages 2 and 3.</p>
<h3>Cleaning up</h3>
<p>The build will now take somewhere between two and eight hours, strongly depending on how fast your machine is. After the build, the freshly created chroot environment and the database file containing will be backed up so that you can start any stage02 build without having to re-build stage01. Thus you should delete the build directory for stage01:</p>
<p><tt>rm -rf /mnt/archiv/LessLinux/llbuild/stage01/build</tt></p>
<h3>And the next step&#8230;</h3>
<p>Tomorrow I&#8217;ll describe how to build stage02 &#8211; which means building all packages in a chroot environment &#8211; and finally assembling an ISO image from it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/building-lesslinux-stage01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting the &#8220;Grandma Mode&#8221;</title>
		<link>http://blog.lesslinux.org/presenting-the-grandma-mode/</link>
		<comments>http://blog.lesslinux.org/presenting-the-grandma-mode/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 15:05:16 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Cheatcodes]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=110</guid>
		<description><![CDATA[Do you also have some relatives that always ask for &#8220;family support&#8221;: When you come to their house, you find a totally f***ed up Windows XP machine with tons of spyware and you&#8217;ll get to hear &#8220;I did not do anything&#8221;. The worst part of it: While you do the work, they keep talking at [...]]]></description>
			<content:encoded><![CDATA[<p>Do you also have some relatives that always ask for &#8220;family support&#8221;: When you come to their house, you find a totally f***ed up Windows XP machine with tons of spyware and you&#8217;ll get to hear &#8220;I did not do anything&#8221;. The worst part of it: While you do the work, they keep talking at you.</p>
<p>Well it can be easier. Just configure your DSL router to forward inbound traffic on port 5500 to your desktop machine and get a nice DynDNS hostname. Then remaster any LessLinux Search and Rescue CD to include one boot entry that does not disable <tt>earlynet</tt> and add the cheatcode</p>
<pre>
        xvnc=|reverse|1280x800|24|my.dyndns.name|
</pre>
<p>In case of emergency tell your grandma to boot the CD with the respective entry. The <tt>earlynet</tt> script requests an IP address on all wired interfaces and instead of starting a local Xserver Xvnc is started and a reverse connection to your host is made where a listening VNC viewer must be running.</p>
<p>There is one drawback: the data is transmitted unencrypted, which might be an issue with sensitive data. You might however use this first VNC connection to build up a SSH tunnel between two hosts.</p>
<p>The background of this feature: I got some customers quite far away from here. With this cheatcode I can help them no matter where they are &#8211; no special configuration of their router required. This feature also will work over WLAN soon. I just introduced some cheatcodes to attach to a wireless network while startup. Those are not tested yet, so please be patient for a few more days.</p>
<p>Should work in all builds higher than 20100701-000000.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/presenting-the-grandma-mode/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Netbooting LessLinux: NFS support</title>
		<link>http://blog.lesslinux.org/netbooting-lesslinux-nfs-support/</link>
		<comments>http://blog.lesslinux.org/netbooting-lesslinux-nfs-support/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 11:13:24 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Cheatcodes]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=104</guid>
		<description><![CDATA[After adding support for netbooting LessLinux by downloading the ISO image via HTTP/FTP I can announce support for NFS boot. For this feature you just need to add

        nfs=192.168.1.1:/dir/containing/iso

In this case, the NFS share is mounted read only (and no locking takes place), then all ISO files down [...]]]></description>
			<content:encoded><![CDATA[<p>After adding support for netbooting LessLinux by downloading the ISO image via HTTP/FTP I can announce support for NFS boot. For this feature you just need to add</p>
<pre>
        nfs=192.168.1.1:/dir/containing/iso
</pre>
<p>In this case, the NFS share is mounted read only (and no locking takes place), then all ISO files down to depth 2 are searched, loop back mounted and scanned for the proper <tt>version.txt</tt>. If the system is found, the settings for <tt>toram=value</tt> take place. In reasonable fast networks you should keep this threshold low, then the start of a program via network is quick, on networks with bad latencies you might set a low threshold to copy the entire system to RAM during startup.</p>
<p>You might download the ISO and the sources here:</p>
<ul>
<li><a href="http://download.lesslinux.org/testing/lesslinux-search-and-rescue/lesslinux-search-and-rescue-uluru-20100726-105414.iso">lesslinux-search-and-rescue-uluru-20100726-105414.iso</a></li>
<li><a href="http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20100726-105414-buildscripts.tar.bz2">lesslinux-search-and-rescue-uluru-20100726-105414-buildscripts.tar.bz2</a></li>
</ul>
<p>To build yourself follow the instructions in those two articles: <a href="http://blog.lesslinux.org/do-it-yourself-build-stage01-stage02/">Build stage 01 and 02</a> and <a href="http://blog.lesslinux.org/do-it-yourself-build-stage03/">Build stage03</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/netbooting-lesslinux-nfs-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Booting LessLinux via network</title>
		<link>http://blog.lesslinux.org/booting-lesslinux-via-network/</link>
		<comments>http://blog.lesslinux.org/booting-lesslinux-via-network/#comments</comments>
		<pubDate>Mon, 31 May 2010 08:33:08 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Cheatcodes]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=86</guid>
		<description><![CDATA[As mentioned previously, support for netbooting LessLinux was recently introduced. In builds from 20100528-000000 it works stable and can be used in production environments. So please test the new function with this build:

lesslinux-search-and-rescue-uluru-20100528-114807.iso

Currently for netbooting a DHCP and PXE server are required, a HTTP daemon should be present, although it is possible to load the [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned previously, support for netbooting LessLinux was recently introduced. In builds from 20100528-000000 it works stable and can be used in production environments. So please test the new function with this build:</p>
<ul>
<li><a href="http://download.lesslinux.org/testing/lesslinux-search-and-rescue/lesslinux-search-and-rescue-uluru-20100528-114807.iso">lesslinux-search-and-rescue-uluru-20100528-114807.iso</a></li>
</ul>
<p>Currently for netbooting a DHCP and PXE server are required, a HTTP daemon should be present, although it is possible to load the ISO directly from download.lesslinux.org. For now the ISO is completely stored in volatile memory &#8212; future versions will probably also allow NFS access. To load an ISO via HTTP just one additional parameter is necessary:<span id="more-86"></span></p>
<pre>     wgetiso=http://host/path/lesslinux.iso</pre>
<p>Of course you can use the download link above for your first tests, but please remember to change it to a local HTTP server as soon as your setup works to keep traffic at an acceptable level. Now you may combine the information from the last post with a PXE server to build a netbooting, remote accessible version of &#8220;LessLinux Search and Rescue&#8221;. Take a look at the <a href="http://syslinux.zytor.com/wiki/index.php/PXELINUX">documentation of PXELINUX</a> and <i>you</i> determine when which system boots via network.</p>
<h3>1. Setup a PXE boot environment</h3>
<p>German speaking readers <a href="http://blog.rootserverexperiment.de/2007/09/17/der-buro-bootserver-pxelinux-im-praxiseinsatz/">might head here</a>, where I describe the setup of a DHCP-PXE-TFTP-boot-chain. Build the setup and test with a simple OS like memtest to confirm that it works flawlessly. </p>
<h3>2. Copy the boot files from the LessLinux CD</h3>
<p>Our example expects the contents of <tt>/boot/isolinux</tt> in <tt>/llsar</tt> within the TFTP root directory, so just use <tt>rsync</tt> or <tt>cp</tt> to copy all files contained in this directory.</p>
<h3>3. Setup the boot loader</h3>
<p>Use <tt>isolinux.cfg</tt> as a template for your entry in <tt>pxelinux.cfg/default</tt>. Make sure that <tt>earlynet</tt> is <i>not</i> contained in the services to skip (upcoming releses will skip this service since it waits for about 15 seconds for DHCP configuration). Then decide which options you want to add. I ended up with three entries. One for a local desktop, two to encrypted and unencrypted VNC access:</p>
<pre>LABEL llsar
MENU LABEL LessLinux Search and Rescue LOCAL
KERNEL /llsar/l2634vn
APPEND initrd=/llsar/devs.img,/llsar/initram.img,/llsar/i2634vn.img ramdisk_size=100000 vga=788
    ultraquiet=1 security=none skipcheck=1 quiet lang=de ejectonumass=1
    skipservices=|installer|xconfgui|firewall|mountdrives| hwid=unknown laxsudo=1
    wgetiso=http://192.168.1.56/ll.iso
TEXT HELP
  Start LessLinux Search and Rescue with local desktop.
ENDTEXT

LABEL llsarvnc
MENU LABEL LessLinux Search and Rescue VNC
KERNEL /llsar/l2634vn
APPEND initrd=/llsar/devs.img,/llsar/initram.img,/llsar/i2634vn.img ramdisk_size=100000 vga=788
    ultraquiet=1 security=none skipcheck=1 quiet lang=de ejectonumass=1
    skipservices=|installer|xconfgui|firewall|mountdrives|runtimeconf| hwid=unknown laxsudo=1
    wgetiso=http://192.168.1.56/ll.iso xvnc=|remote|1280x800|24|
TEXT HELP
  Start LessLinux Search and Rescue with insecure VNC desktop.
ENDTEXT

LABEL llsarvnc
MENU LABEL LessLinux Search and Rescue SSH
KERNEL /llsar/l2634vn
APPEND initrd=/llsar/devs.img,/llsar/initram.img,/llsar/i2634vn.img ramdisk_size=100000 vga=788
    ultraquiet=1 security=none skipcheck=1 quiet lang=de ejectonumass=1
    skipservices=|installer|xconfgui|firewall|mountdrives|runtimeconf| hwid=unknown laxsudo=1
    wgetiso=http://192.168.1.56/ll.iso xvnc=|local|1280x800|24|
    rootpwhash=$1$ILXt/Dc3$DmYp.51WCDNjGuTL90eju/
TEXT HELP
  Start LessLinux Search and Rescue with VNC-over-SSH desktop.
  (SSH password is "test", please change!)
ENDTEXT</pre>
<p>Please note that the indented lines after <tt>APPEND</tt> are part of the append parameter line. I had to break the lines to prevent the formatting from exploding. With this setup you can try the full netboot of &#8220;LessLinux Search and Rescue&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/booting-lesslinux-via-network/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Accessing LessLinux with VNC</title>
		<link>http://blog.lesslinux.org/accessing-lesslinux-with-vnc/</link>
		<comments>http://blog.lesslinux.org/accessing-lesslinux-with-vnc/#comments</comments>
		<pubDate>Thu, 27 May 2010 09:13:53 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Cheatcodes]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Releases]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=76</guid>
		<description><![CDATA[As I mentioned before, &#8220;LessLinux Search and Rescue&#8221; is intended to be a versatile live system for typical service jobs that have to be done in mixed environments. To make work easier, a service system should be net-bootable and accessible with a remote desktop application. In builds starting with timestamps after 20100526-000000 I included support [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned before, &#8220;LessLinux Search and Rescue&#8221; is intended to be a versatile live system for typical service jobs that have to be done in mixed environments. To make work easier, a service system should be net-bootable and accessible with a remote desktop application. In builds starting with timestamps after 20100526-000000 I included support for both functions:</p>
<ul>
<li>Booting the kernel and initramfs with PXE and loading the system ISO with wget by http or ftp</li>
<li>Starting the desktop with Xvnc instead a local X server</li>
</ul>
<p><span id="more-76"></span></p>
<p>Currently both functions just work with a wired network interface. This post covers VNC access, I will write on PXE booting later.</p>
<p>To test VNC access, download the latest build:</p>
<ul>
<li><a href="http://download.lesslinux.org/testing/lesslinux-search-and-rescue/lesslinux-search-and-rescue-uluru-20100527-082411.iso">lesslinux-search-and-rescue-uluru-20100527-082411.iso</a></li>
</ul>
<p>&#8230;or build it yourself according to the last two articles withe those buildscripts and overlays (in this case the extra switch <tt>-u</tt> for unstable is necessary):</p>
<ul>
<li><a href="http://download.lesslinux.org/src/lesslinux-search-and-rescue-uluru-20100527-082411-buildscripts.tar.bz2">lesslinux-search-and-rescue-uluru-20100527-082411-buildscripts.tar.bz2</a></li>
<li><a href="http://download.lesslinux.org/overlays/lesslinux-search-and-rescue-uluru-20100527-082411-overlays-neutral.tar.bz2">lesslinux-search-and-rescue-uluru-20100527-082411-overlays-neutral.tar.bz2</a></li>
</ul>
<h3>Doing it the easy way</h3>
<p>In trusted networks, you may start Xvnc on the external interface, this means VNC access is granted <b>without password</b>. Just press the Tab key in the boot menu and add</p>
<pre>        xvnc=|remote|1280x800|24|</pre>
<p>The first value tells Xvnc to bind to the external interface, the second is the screen resolution to use (any value is accepted here), and the third parameter is the color depth. On congested networks you might reduce the depth to 16. It also makes sense to add <tt>runtimeconf</tt> to the list <tt>skipservices</tt>. When finished booting, you can connect on port 5900.</p>
<h3>Doing it the secure way</h3>
<p>Specifying </p>
<pre>        xvnc=|local|1280x800|24|</pre>
<p>tells Xvnc to bind to 127.0.0.1. So no external connections are allowed. To access, you must tunnel port 5900 over SSH. To make this possible, first remove <tt>ssh</tt> and <tt>roothash</tt> from the list <tt>skipservices</tt>, then add a roothash by specifying:</p>
<pre>        rootpwhash=$1$ILXt/Dc3$DmYp.51WCDNjGuTL90eju/</pre>
<p>This is the MD5 hash for the simple password <i>test</i>. I created this Hash with the command <tt>openssl passwd -1</tt>, Apaches <tt>htpasswd</tt> might also work. Then after the system is fully booted, you can first connect with SSH and use <tt>-L</tt> to forward :</p>
<pre>        ssh -L 5900:localhost:5900 root@192.168.1.23</pre>
<p>Now VNC is available on port 5900 on you local machine, simply connect this way:</p>
<pre>        vncviewer localhost:0</pre>
<p>The current build also is the first one to use kernel 2.6.34 and it introduces libraries from Gnome 2.30. So please test and give me feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/accessing-lesslinux-with-vnc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Do it yourself: Build stage03</title>
		<link>http://blog.lesslinux.org/do-it-yourself-build-stage03/</link>
		<comments>http://blog.lesslinux.org/do-it-yourself-build-stage03/#comments</comments>
		<pubDate>Fri, 07 May 2010 08:46:24 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=70</guid>
		<description><![CDATA[In the third stage the final ISO image is assembled. To assemble the ISO you need an overlay with some fixes and the bootloader configuration. Eventually the bootloader configuration can be automatically generated &#8211; but not for now. Since assembling stage03 is basically calculating dependencies, copying files from the chroot environment, compressing the squashfs containers [...]]]></description>
			<content:encoded><![CDATA[<p>In the third stage the final ISO image is assembled. To assemble the ISO you need an overlay with some fixes and the bootloader configuration. Eventually the bootloader configuration can be automatically generated &#8211; but not for now. Since assembling stage03 is basically calculating dependencies, copying files from the chroot environment, compressing the squashfs containers and finalizing the ISO image, this stage is usually done in 20 to 40 minutes. <span id="more-70"></span></p>
<p>Start with the overlay that has to be unpacked directly in <tt>/mnt/archiv/LessLinux</tt>:</p>
<pre>    cd /mnt/archiv/LessLinux
    wget http://download.lesslinux.org/overlays/lesslinux-search-and-rescue-uluru-20100507-000000-overlays-neutral.tar.bz2
    tar xvjf lesslinux-search-and-rescue-uluru-20100507-000000-overlays-neutral.tar.bz2</pre>
<p>Now change directory to <tt>/mnt/archiv/LessLinux/llbuilder/lesslinux-builder</tt> and run <tt>builder.rb</tt>:</p>
<pre>    cd /mnt/archiv/LessLinux/llbuilder/lesslinux-builder
    ruby builder.rb -n -s 1,2,bootconf \
        -p config/pkglist_neutral_rescue.txt \
        -c config/general_neutral_rescue.xml \
        -b config/branding_neutral_rescue.xml \
        -k config/kernels_rescue.xml</pre>
<p>The parameters are as follows:</p>
<ul>
<li><b>-p</b> use a certain pkg_list, this is a simple text file containing one package per line</li>
<li><b>-c</b> use a certain config file, this contains paths and assumptions on the layout of the final system (for example how kernel modules are loaded)</li>
<li><b>-b</b> use a certain branding, this would be the first file to customize when building your own version of LessLinux</li>
<li><b>-k</b> use a certain kernel configuration, you would modify this file when using different kernels</li>
</ul>
<p>After the build is done, take a look at the stage03 directory, you will find the finished ISO image here:</p>
<pre>    # ls -lah /mnt/archiv/LessLinux/llbuild/stage03
    total 391M
    drwxr-xr-x   7 root root 4.0K 2010-05-07 09:33 .
    drwxr-xr-x   5 root root 4.0K 2010-05-07 08:45 ..
    drwxr-xr-x 300 root root  12K 2010-05-07 09:13 build
    drwxr-xr-x   6 root root 4.0K 2010-04-13 12:50 cdmaster
    drwxr-xr-x   4 root root 4.0K 2010-05-07 09:32 cpio-2633vn
    -rw-r--r--   1 root root  18M 2010-05-07 09:32 cpio-2633vn.gz
    drwxr-xr-x  14 root root 4.0K 2009-10-13 17:25 initramfs
    -rw-r--r--   1 root root 7.6M 2010-05-07 09:32 initramfs.gz
    -rw-r--r--   1 root root 365M 2010-05-07 09:33 lesslinux-search-and-rescue-uluru-20100507-084527.iso
    drwxr-xr-x   9 root root 4.0K 2010-05-07 09:32 squash</pre>
<p>You might now <tt>dd</tt> the ISO to an USB stick to create a bootable device without having to burn:</p>
<pre>    dd if=lesslinux-search-and-rescue-uluru-timestamp.iso of=/dev/sdx</pre>
<p>That&#8217;s it for today, in the next days we will add some more software and change the branding of your own build. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/do-it-yourself-build-stage03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>HOWTO: boot faster, create hardware protocols</title>
		<link>http://blog.lesslinux.org/howto-boot-faster-create-hardware-protocols/</link>
		<comments>http://blog.lesslinux.org/howto-boot-faster-create-hardware-protocols/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 09:55:07 +0000</pubDate>
		<dc:creator>Mattias Schlenker</dc:creator>
				<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://blog.lesslinux.org/?p=43</guid>
		<description><![CDATA[The current development builds of LessLinux use a simple mechanism to create hardware protocols. Just plug in a FAT formatted USB stick (it should be partioned, superfloppy might work but will not be supported forever) that contains an folder hwinfo in the root directory of the stick. You might also specify the boot variable hwid=&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>The current development builds of LessLinux use a simple mechanism to create hardware protocols. Just plug in a FAT formatted USB stick (it should be partioned, superfloppy might work but will not be supported forever) that contains an folder <b>hwinfo</b> in the root directory of the stick. You might also specify the boot variable <b>hwid=&#8230;</b> to a unique identifier (like the PC brand and model).</p>
<p>I would be very happy if you sent me as many hardware protocols as possible. Please note: hardware protocols might contain data that allows to uniquely identify a single machine. In environments where this is a problem you might open the archive in <b>hwinfo</b> and just send me the files you wish.</p>
<p>To edit the boot line, just press Tab:<span id="more-43"></span></p>
<div align="center"><img src="http://images.mattiasschlenker.de/blog.lesslinux.org/20090626_hwproto.png" alt="" /></div>
<p>You might also edit the boot command line to enable faster boot. To skip loading all containers to RAM you might set the value <b>toram=999999999</b>. This defines an insanely high minimum RAM. You might also want to skip the hardware protocol in some cases. Do this by adding <b>hwproto</b> to <b>skipservices</b>.</p>
<div align="center"><img src="http://images.mattiasschlenker.de/blog.lesslinux.org/20090626_fastboot.png" alt="" /></div>
<p>Please send hardware protocols to <a href="mailto:hardware@lesslinux.org">hardware@lesslinux.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.lesslinux.org/howto-boot-faster-create-hardware-protocols/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

