Difference between revisions of "User:Silasb/Erch"

From ArchWiki
Jump to: navigation, search
(Created page with "Erch is Embedded Arch more proof of concept ATM. build an chroot via the devtools sudo mkarchroot -n -C pacman.conf -M makepkg-i686.conf $HOME/erch/rootfs base After this com...")
 
Line 5: Line 5:
 
build an chroot via the devtools
 
build an chroot via the devtools
  
 +
<pre>
 
sudo mkarchroot -n -C pacman.conf -M makepkg-i686.conf $HOME/erch/rootfs base
 
sudo mkarchroot -n -C pacman.conf -M makepkg-i686.conf $HOME/erch/rootfs base
 +
</pre>
  
 
After this completes then you need to package it up.
 
After this completes then you need to package it up.
  
 +
<pre>
 
cd rootfs/
 
cd rootfs/
 
sudo tar -zcf ../rootfs.tgz .
 
sudo tar -zcf ../rootfs.tgz .
 +
</pre>
  
 
Now we create an ext[2,3,4] image
 
Now we create an ext[2,3,4] image
  
 +
<pre>
 
dd if=/dev/zero of=rootfs.ext3 bs=1MB count=0 seek=1024 # seek=1024 = 1GB while seek=2048 = 2GB etc
 
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
 
mkfs.ext3 -F rootfs.ext3
 
 
mkdir mnt
 
mkdir mnt
 
 
sudo mount -o loop rootfs.ext3 mnt
 
sudo mount -o loop rootfs.ext3 mnt
 
 
tar -C mnt -zxf rootfs.ext3
 
tar -C mnt -zxf rootfs.ext3
 +
</pre>
  
 
This is the root file system of our arch image.
 
This is the root file system of our arch image.
Line 28: Line 30:
 
To test I used qemu.
 
To test I used qemu.
  
 +
<pre>
 
qemu -hda rootfs.ext3 -kernel rootfs/boot/vmlinuz26 -initrd root/boot/kernel26.img append "root=/dev/sda"
 
qemu -hda rootfs.ext3 -kernel rootfs/boot/vmlinuz26 -initrd root/boot/kernel26.img append "root=/dev/sda"
 +
</pre>
  
 
It took a while to boot and ran into some errors about a read only file system.
 
It took a while to boot and ran into some errors about a read only file system.

Revision as of 18:07, 10 October 2010

Erch is Embedded Arch

more proof of concept ATM.

build an chroot via the devtools

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.ext3

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.