Difference between revisions of "User:Silasb/Erch"

From ArchWiki
Jump to: navigation, search
(Add i18n template)
Line 1: Line 1:
[[Category:Getting and installing Arch (English)]]
== Erch is Embedded Arch ==
== Erch is Embedded Arch ==

Revision as of 00:50, 25 March 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Erch is Embedded Arch

Being able to build a small image of arch for embedded purposes.

Build chroot

Start by building a chroot via the devtools package.

sudo mkarchroot -n -C pacman.conf -M makepkg-i686.conf $HOME/erch/rootfs base

After this completes then you need to package it up.

cd rootfs/
sudo tar -zcf ../rootfs.tgz .

Now we create an ext[2,3,4] image

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

This is the root file system of our arch image.

To test I used qemu.

qemu -hda rootfs.ext3 -kernel rootfs/boot/vmlinuz26 -initrd root/boot/kernel26.img append "root=/dev/sda"

It took a while to boot and ran into some errors about a read only file system.

What's next

Getting a minimal group (pacman -S minimal)

Different categories for minimal:

minimal- packages
busybox busybox
uclibc uclibc
  • Making build scripts to ease the pain of all these commands. I really like the installer for Arch so maybe something similar to that.
  • getting ABS going to rebuild the system to makepkg specs.