$ sudo apt-get install qemu $ wget http://ftp.linuxfoundation.org/pub/kvm-images/fedora-9-i386.qcow2 $ qemu fedora-9-i386.qcow2 -redir tcp:2222::22 & Get root on qemu by logging in with single user mode, then reboot. $ ssh -p 2222 localhost *** on qemu *** $ su - # nano /etc/yum.repos.d/lsb.repo # LSB 4.0 Packages # Reproducible and reportable issues should be filed at # http://bugs.linuxbase.org [lsb-4.0] name=LSB 4.0 baseurl=http://ftp.linuxfoundation.org/pub/lsb/repositories/yum/lsb-4.0/repo-ia32 enabled=1 #gpgcheck=1 gpgcheck=0 # yum install lsb-task-sdk lsb-appchk gcc # exit $ nano echoargs.c #include #include #include main(argc, argv) int argc; char *argv[]; { int i = 0; for (i = 1; i < argc; i++) { fputs(argv[i], stdout); putchar(' '); } putchar('\n'); exit(0); } $ cc -o echoargs echoargs.c $ /opt/lsb/bin/lsbappchk echoargs $ /opt/lsb/bin/lsbcc -o lsb-echoargs echoargs.c $ /opt/lsb/bin/lsbappchk lsb-echoargs *** Part 2 *** # yum install pcre-devel $ nano pcre.c #include int main() { pcre *re; const char *error; int erroffset; re = pcre_compile("^[A-Z]", 0, &error, &erroffset, NULL); } $ cc -o pcre pcre.c -l pcre $ /opt/lsb/bin/lsbappchk pcre $ /opt/lsb/bin/lsbcc -o lsb-pcre pcre.c -l pcre $ /opt/lsb/bin/lsbappchk lsb-pcre *** Part 3 *** $ wget http://ispras.linuxfoundation.org/images/e/ee/Lsbsi-chroot-4.0.0-1.i586.rpm http://ispras.linux-foundation.org/images/d/dd/Lsbsi-tools-4.0.0-1.i586.rpm http://dev.linuxfoundation.org/~mats/redhat-lsb-4.0-1.fc11.i386.rpm # yum localinstall --nogpgcheck redhat-lsb-4.0-1.fc11.i386.rpm Lsbsi-chroot-4.0.0-1.i586.rpm Lsbsi-tools-4.0.0-1.i586.rpm Log into root on qemu. # FC9=/tmp/work # BE=/opt/lsb/tmp/work # SI=/opt/lsb/si/chroot/tmp/work # mkdir -p $FC9 $BE $SI # cp /home/rwhe/tutorial/lsb-* $SI # /opt/lsb/bin/si-chroot # cd /tmp/work # ./lsb-echoargs hello there hello there