- emdebian
- multistrap
- debian
- busybox
Installing Emdebian using multistrap
Just a quick guide into installing Emdebian using multistrap. This currently based on Debian Squeeze. Wheezy is not supported yet.
sudo apt-get install multistrap
Create a config file emdebian.conf
[General]
arch=i386
directory=/tmp/multistrap/
cleanup=true
noauth=false
unpack=true
aptsources=Grip Updates
debootstrap=Grip
[Debian]
packages=
source=http://ftp.nl.debian.org/debian
keyring=debian-archive-keyring
suite=squeeze
[Grip]
packages=locales busybox
keyring=emdebian-archive-keyring
source=http://www.emdebian.org/grip
suite=squeeze
execute:
sudo multistrap -f emdebian.conf
You'll end up with the base install in /tmp/multistrap.
Now you can chroot into that dir and configure the OS.
sudo chroot /tmp/multistrap
Inside the chroot:
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
export LC_ALL=C LANGUAGE=C LANG=C
#workaround a configure bug
mkdir -p /usr/share/man/man1
/var/lib/dpkg/info/dash.preinst install
dpkg --configure -a
mount proc -t proc /proc
dpkg --configure -a
Some fixes, do this outside the chroot since you won't have a text editor. * Fix root login in /tmp/multistrap/etc/passwd
root::0:0:root:/root:/bin/bash
- Minimal /etc/fstab
echo "proc /proc proc defaults 0 0" > /tmp/multistrap/etc/fstab
- Add busybox ifconfig
ln -s /tmp/multistrap/bin/busybox /sbin/ifconfig
You can add most essential commands with busybox like that :)
Look at this doc on how to make this into a harddrive image.
You can test boot your rootfs using qemu:
sudo qemu-system-x86_64 -kernel /boot/vmlinuz-3.2.0-32-generic -initrd /boot/initrd.img-3.2.0-32-generic -hda /tmp/disk.img -net nic -net user -m 265 -append "root=/dev/sda rw devtmpfs"
root permission is needed to read the kernel from your machine
Since you won't have any DHCP support you can give yourself an ip adress with the following details: * gateway: 10.0.2.2 * dns: 10.0.2.3 * netmask: 255.255.255.0 You'll have to give yourself access to the route command (Busybox!)
References
- http://www.landley.net/writing/
FIXME * pure initramfs instead of harddisk image * install a kernel explanation * rip init scripts from /usr/share/initramfs-tools/, skip rootfs search since its not needed * search some simple union or overlay fs