User Mode Linux is a binary executable that works in a Linux host and boots a virtual Linux within a user process. It's an isolated environment for making experiments on a kernel or a system. Its hardware architecture is a process in the host system (the system that you execute UML binary). For detailed information see:
http://usermodelinux.org/
Once you execute the UML binary, a Linux system boots in the terminal and opens some consoles.
Login one of the departments systems (inek??.ceng.metu.edu.tr) with ssh or from console.
All files are already available under:
/usr/local/uml
Files are
debian-root Root filesystem of your Linux
kernel-conf Kernel config to copy as .config
ldd3-samples-1.0.0.tar.gz Sample sources from the book
ldd3_pdf.tar.bz2 Chapters of the book
linux UML binary
linux-source-2.6.18 Kernel sources
prepare your environment, create a directory uml:
cd ~
mkdir uml
cd uml
execute this command to test your environment:
/usr/local/uml/linux ubd0=my-root,/usr/local/uml/debian-root
You should have a system booting. You can login as root without any password.
In host system, extract ldd3-samples-1.0.0.tar.gz:
tar xzvf ldd3-samples-1.0.0.tar.gz
In host system, change directory to ldd3-samples-1.0.0/scullc
execute:
make KERNELDIR=/usr/local/uml/linux-source-2.6.18 ARCH=um
You should have scullc.ko file is created (ignore a warning about vmlinuz)
In UML system change directory to /home/youruser/uml/ldd3-samples-1.0.0/scullc
In UML system, execute:
chmod +x scullc_load scullc_unload
./scullc_load
echo “hello” >/dev/scullc0
cat /dev/scullc0
If it echoed back your “hello”, it works. Now you can change “scullc” as your device: “pstackdev”
Make all your compilations in the host system, module test in UML system.