<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8">
<title>Erch - ArchWiki</title>
<meta name="generator" content="MediaWiki 1.22.7">
<meta name="robots" content="noindex,follow">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="ArchWiki (en)">
<link rel="EditURI" type="application/rsd+xml" href="https://wiki.archlinux.org/api.php?action=rsd">
<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html">
<link rel="alternate" type="application/atom+xml" title="ArchWiki Atom feed" href="/index.php?title=Special:RecentChanges&amp;feed=atom">
<link rel="stylesheet" href="../ArchWikiOffline.css">
<meta name="ResourceLoaderDynamicStyles" content="">

</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-Erch skin-archlinux action-view">

<div id="globalWrapper" style="width: 100%">
<div id="column-content"><div id="content" class="mw-body-primary" role="main" style="margin: 2em; margin-bottom: 0">
	<a id="top"></a>
	
	<h1 id="firstHeading" class="firstHeading" lang="en"><span dir="auto">Erch</span></h1>
	<div id="bodyContent" class="mw-body">
		<div id="contentSub"></div>
		<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr">
<div style="text-align: center; margin-bottom: 1em; overflow:hidden;">
<table class="notice noprint toc" id="out_of_date" style="background: {{{backgroundcolor}}}; border-color: {{{bordercolor}}}; width: 100%">
<tr>
<td style="background-color: {{{signalcolor}}}; width: 100px"> <a href="../File:Tango-dialog-warning.png" class="image"><img alt="Tango-dialog-warning.png" src="../File:Tango-dialog-warning.png" width="48" height="48"></a>
</td>
<td>  <b>This article or section is out of date.</b> <div style="font-size: 90%">
<b>Reason:</b> <span style="color:red;">please use the first argument of the template to provide a brief explanation.</span> (<a rel="nofollow" class="external text" href="https://wiki.archlinux.org/index.php/Talk:Erch">Discuss</a>)</div>
</td>
<td style="background-color: {{{signalcolor}}}; width: 100px"> <a href="../File:Tango-dialog-warning.png" class="image"><img alt="Tango-dialog-warning.png" src="../File:Tango-dialog-warning.png" width="48" height="48"></a>
</td>
</tr>
</table>
</div>
<div style="text-align: center; margin-bottom: 1em; overflow:hidden;">
<table class="notice noprint toc" id="translateme" style="background: {{{backgroundcolor}}}; border-color: {{{bordercolor}}}; width: 100%">
<tr>
<td style="background-color: {{{signalcolor}}}; width: 100px"> <a href="../File:Tango-document-new.png" class="image"><img alt="Tango-document-new.png" src="../File:Tango-document-new.png" width="48" height="48"></a>
</td>
<td>  <b>This article is a stub.</b> <div style="font-size: 90%">
<b>Notes:</b> <span style="color:red;">please use the first argument of the template to provide more detailed indications.</span> (<a rel="nofollow" class="external text" href="https://wiki.archlinux.org/index.php/Talk:Erch">Discuss</a>)</div>
</td>
<td style="background-color: {{{signalcolor}}}; width: 100px"> <a href="../File:Tango-document-new.png" class="image"><img alt="Tango-document-new.png" src="../File:Tango-document-new.png" width="48" height="48"></a>
</td>
</tr>
</table>
</div>
<h2><span class="mw-headline" id="Erch_is_Embedded_Arch">Erch is Embedded Arch</span></h2>
<p>Being able to build a small image of arch for embedded purposes.
</p>
<h2><span class="mw-headline" id="Build_chroot">Build chroot</span></h2>
<p>Start by building a chroot via the devtools package.
</p>
<pre># mkarchroot -n -C pacman.conf -M makepkg-i686.conf $HOME/erch/rootfs base
</pre>
<p>After this completes then you need to package it up.
</p>
<pre>$ cd rootfs/
$ tar -zcf ../rootfs.tgz .
</pre>
<p>Now we create an ext[2,3,4] image
</p>
<pre>dd if=/dev/zero of=rootfs.ext3 bs=1MB count=0 seek=1024 # seek=1024 = 1GB while seek=2048 = 2GB etc
mkfs.ext3 -F rootfs.ext3
mkdir mnt
sudo mount -o loop rootfs.ext3 mnt
tar -C mnt -zxf rootfs.tgz</pre>
<p>This is the root file system of our arch image.
</p>
<p>To test I used qemu.
</p>
<pre>qemu -hda rootfs.ext3 -kernel rootfs/boot/vmlinuz-linux -initrd root/boot/initramfs-linux.img append "root=/dev/sda"
</pre>
<p>It took a while to boot and ran into some errors about a read only file system.
</p>
<h2><span class="mw-headline" id="What.27s_next">What's next</span></h2>
<p>Getting a minimal group (pacman -S minimal)
</p>
<p>Different categories for minimal:
</p>
<table class="wikitable">
<tr>
<th> minimal- </th>
<th> packages
</th>
</tr>
<tr>
<td> busybox </td>
<td> busybox
</td>
</tr>
<tr>
<td> uclibc </td>
<td> uclibc
</td>
</tr>
</table>
<ul>
<li> Making build scripts to ease the pain of all these commands.  I really like the installer for Arch so maybe something similar to that.
</li>
<li> getting ABS going to rebuild the system to makepkg specs.
</li>
</ul>

</div>
<div id="catlinks" class="catlinks"><div id="mw-normal-catlinks" class="mw-normal-catlinks">
<a href="../Special:Categories.html" title="Special:Categories">Category</a>: <ul><li><a href="../en/Category:Getting_and_installing_Arch.html" title="Category:Getting and installing Arch">Getting and installing Arch</a></li></ul>
</div></div>		<div class="visualClear"></div>
	</div>
</div></div>
<div class="visualClear"></div>
<div id="footer" role="contentinfo">
	<ul id="f-list" style="margin: 0 2em">
		<li>
Retrieved from "<a href="https://wiki.archlinux.org/index.php?title=Erch&amp;oldid=304968">https://wiki.archlinux.org/index.php?title=Erch&amp;oldid=304968</a>"</li>
		<li id="lastmod"> This page was last modified on 16 March 2014, at 09:56.</li>
		<li id="copyright">Content is available under <a class="external" rel="nofollow" href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License 1.3 or later</a> unless otherwise noted.</li>
		<br><li id="privacy"><a href="../en/ArchWiki:General_disclaimer.html" title="ArchWiki:Privacy policy">Privacy policy</a></li>
		<li id="about"><a href="../en/ArchWiki:About.html" title="ArchWiki:About">About ArchWiki</a></li>
		<li id="disclaimer"><a href="../en/ArchWiki:General_disclaimer.html" title="ArchWiki:General disclaimer">Disclaimers</a></li>
	</ul>
</div>
</div>
</body>
</html>
