kernel development using virtualization installing vmware and using a virtual machine to build and...

26
Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Upload: jeffery-blake

Post on 11-Jan-2016

234 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Kernel Development using Virtualization

Installing VMWare and using a virtual machine to build and test a

Linux Kernel

Page 2: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Get VMWare

• Download VMWare (http://vmware.com/download/server/)

• Apply for license keys (http://register.vmware.com/content/registration.html)

Page 3: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Begin the installation

Page 4: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Accept the license terms

Page 5: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Customize

Page 6: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Choose desired features and installation path

Page 7: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Disable AutoRun

Note: Windows XP requires extra steps here

Page 8: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Disable each auto-run type in XP

Page 9: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Ready to install!

Page 10: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

This may take a while

Note: You may need to temporarily disable your Virus Shield (mcsheild.exe hogs processor ticks while VMWare installs)

Page 11: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Enter one of the serial number you applied for in the step above.

Note: Linux and Windows serial numbers are different

Page 12: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Finished!

Page 13: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Connect to the new VMWare instance

Page 14: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Check settings

Page 15: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Select a directory on a drive with plenty of free space

Page 16: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Download pre-built Ubuntu 8.04 LTS VMWare guest

• http://speedy.hestonsystems.com/csueb/Ubuntu-GOS.zip

Save it to the “Virtual Machines” directory you specified during the VMWare setup and unzip the file.

Page 17: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Open the existing virtual machine

Page 18: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Open the Guest

Page 19: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Start the guest and create a new identifier

Page 20: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Now you can log in!

Username: studentPassword: csueb123

Page 21: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Start the toolbox with command: “vmware-toolbox &”

Note: Minimize, but do not close this dialog.

Page 22: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Now for Kernel development:

• Overview– Install C compiler– Download kernel– Change make file– Compile!

Page 23: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Open a terminal window and type commands to retrieve and set up the kernel compile environment

Page 24: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Kernel-compile commands

• Adapted from: http://www.howtoforge.com/kernel_compilation_ubuntu• sudo apt-get install kernel-package libncurses5-dev fakeroot wget bzip2• sudo passwd root• su <password you set above>• cd /usr/src/• # Get the kernel source• wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.7.tar.bz2• wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.7.tar.bz2.sign• gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E• gpg --verify linux-2.6.24.7.tar.bz2.sign linux-2.6.24.7.tar.bz2• tar -xjf linux-2.6.24.7.tar.bz2• ln -s linux-2.6.24.7 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

Page 25: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

Install New Kernel• # Install Kernel• dpkg -i linux-image-2.6.18.1-custom_2.6.24.7-kurt2009-10.00.Custom_i386.deb• dpkg -i linux-headers-2.6.18.1-custom_2.6.24.7-kurt2009-10.00.Custom_i386.deb• reboot

Page 26: Kernel Development using Virtualization Installing VMWare and using a virtual machine to build and test a Linux Kernel

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)