Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel
Get VMWare Download VMWare ( Apply for license keys ( ation.html)
Begin the installation
Accept the license terms
Customize
Choose desired features and installation path
Disable AutoRun Note: Windows XP requires extra steps here
Disable each auto-run type in XP
Ready to install!
This may take a while Note: You may need to temporarily disable your Virus Shield (mcsheild.exe hogs processor ticks while VMWare installs)
Enter one of the serial number you applied for in the step above. Note: Linux and Windows serial numbers are different
Finished!
Connect to the new VMWare instance
Check settings
Select a directory on a drive with plenty of free space
Download pre-built Ubuntu 8.04 LTS VMWare guest GOS.ziphttp://speedy.hestonsystems.com/csueb/Ubuntu- GOS.zip Save it to the “Virtual Machines” directory you specified during the VMWare setup and unzip the file.
Open the existing virtual machine
Open the Guest
Start the guest and create a new identifier
Now you can log in! Username: student Password: csueb123
Start the toolbox with command: “vmware-toolbox &” Note: Minimize, but do not close this dialog.
Now for Kernel development: Overview –Install C compiler –Download kernel –Change make file –Compile!
Open a terminal window and type commands to retrieve and set up the kernel compile environment
Kernel-compile commands Adapted from: sudo apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 sudo passwd root su cd /usr/src/ # Get the kernel source wget wget gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E gpg --verify linux tar.bz2.sign linux tar.bz2 tar -xjf linux tar.bz2 ln -s linux linux cd /usr/src/linux make clean && make mrproper cp /boot/config-`uname -r`./.config make menuconfig # (see URL above for options to set) vi Makefile # (add suffix to version number ie "EXTRAVERSION =.9-kurt") # Build Kernel make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-kurt2009 kernel_image kernel_headers
Install New Kernel # Install Kernel dpkg -i linux-image custom_ kurt Custom_i386.deb dpkg -i linux-headers custom_ kurt Custom_i386.deb reboot
Helpful Hints Google is your friend treat this as you would any free-standing computer. it is just as susceptible to viruses as one would be and does not enjoy the benenfit of any virus checkers/firewalls installed on the host machine (that is, windows XP will not protect the Linux OS installed under VMWare)