#!/bin/sh # this script demonstrates how to build a user-mode-linux (UML) root_fs # with busybox e.g. as an environment for testing lkms space=/tmp/space mkdir -p $space ; cd $space # 30MB of zeros is OK for our root_fs dd if=/dev/zero of=root_fs bs=1024k count=30 mke2fs -F root_fs mount -o loop root_fs /mnt # get some useful files&dirs for it wget http://translucency.sourceforge.net/dl/root_stub.tar.gz tar xzf root_stub.tar.gz -C /mnt # get busybox (press Enter at password prompt) cvs -d:pserver:anonymous@busybox.net:/var/cvs login cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co busybox cd busybox # later just "cvs update" here # either set DOSTATIC:=true in Rules.mak # or "cp /lib/ld-linux.so.2 /lib/libc.so.6 /mnt/lib/" # I used the former method (Version as of May 20 2002) # and the config at http://translucency.sourceforge.net/dl/busybox-config make menuconfig dep all install PREFIX=/mnt cd .. umount /mnt