Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

10
Exercise #1: Exploring Open-Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010

Transcript of Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Page 1: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Exercise #1: Exploring Open-Source Operating Systems with

Virtual MachinesJ. H. Wang

Mar. 9, 2010

Page 2: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Objectives

• To get you familiar with some open-source operating systems like Linux

• To use virtualization tools such as VMware Player

• To explore the source code of Linux kernel

Page 3: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Exploring Linux Operating Systems

• The usual (and more difficult) way– Download one of the Linux distributions as CDs or DV

Ds• E.g. Redhat, Debain, Ubuntu, …

– Partition your hard disk and start installing the Linux distribution

– Configure your system parameters such as network, display, I/O devices, …

– Download the latest Linux kernel, compile it and replace the original kernel

• Since we will not focus on directly installing Linux from scratch, this is not what we will do…

Page 4: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

• The easier way (that will not depend on hard disk partitions and the original OS)– Download the VMware Player– Download a virtual machine image pre-

installed with OS and applications– Boot the virtual machine within VMware

Player– Download the latest Linux kernel, compile it

and replace the original kernel

Page 5: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

• Other (indirect) ways– Connecting to remote Linux hosts using telnet,

ssh – Installing UNIX-like environment such as cygw

in• http://www.cygwin.com/

Page 6: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Why VMware Player?

• A popular free virtualization tool– You can run many different OS on various

platforms– We have other virtualization tools, as

introduced in Sec. 2.8

• Easy to use

Page 7: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Details

• Download VMware Player (latest version 3.01)– http://www.vmware.com/download/player/

• Download a virtual machine image– http://www.vmware.com/appliances/

• Boot the virtual machine within VMware Player

Page 8: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Obtaining the Latest Linux Kernel Source Code

• http://www.kernel.org/– The latest version: 2.6.33– Uncompress the downloaded file by: tar, gzip/

gunzip or bzip2/bunzip2• tar xjf linux-2.6.33.tar.bz2

Page 9: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

A Tour of Linux Source Code

• Under /usr/src– Maybe /usr/src/linux or /usr/src/linux-x.y.z

• Different modules– drivers/– fs/– mm/– net/– …

• Procedures of Building a New Kernel– (See Programming Project 2.23)

Page 10: Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.

Further Reading

• Programming Project 2.23– Adding a system call to the Linux kernel