Friday, June 09, 2006

Emu v2

I've managed to get qemu installed and working using the guide posted here. However I'll post a short HOW-TO here as well:) I do not take credit for getting this to work;)

  1. Download the QEMU + KQEMU package from here.
  2. Install the following packages which includes your linux kernel headers "sudo apt-get install linux-headers-$(uname -r) libsdl1.2-dev zlib1g-dev checkinstall qemu".
  3. Create a symlink to your linux kernel for simplifying things at a later stage (which includes updates) using 'sudo ln -s /usr/src/linux-headers-$(uname -r) /usr/src/linux-headers'
  4. Extract the qemu package to a folder of your choice (i.e. /home/user/qemu) and also extract the kqemu package into the same directory. Remain in this directory.
  5. edit the qemu 'configure' file and change the kernel_path="" to
    'kernel_path="/usr/src/linux-headers"', quit and save the file.
  6. type './configure' and look for the line that says "kqemu support yes".
  7. type 'make'. This process might take some time.
  8. Now we're ready to create the debian package. Type 'sudo checkinstall -D' and you will be prompted to answer a few questions. "
    1st question: Answer = default y
    2nd question: Answer = Any description you like about qemu
    "
  9. In my case after the creation of the package I had to install the .deb file manually. This is accomplished using 'sudo dpkg -i '.
  10. Now we have to make sure that the modules required for functionality are loaded. Edit '/etc/modules' and add kqemu and tun to the file. To load it manually type 'sudo modprobe kqemu' and 'sudo modprobe tun'.
  11. Edit your '/etc/rc.local' and add the following
mknod /dev/kqemu c 250 0 # Create the KQEMU device
chmod 666 /dev/kqemu # Make it accessible to all users
chmod 666 /dev/net/tun # Make tun accessible by all
mount -o remount,size=544m /dev/shm
echo 1024 > /proc/sys/dev/rtc/max-user-freq

Now your system can emulate any OS of your choice;) Enjoy

No comments: