Project 0: Linux & Virtual Machine Dabbling

Slides:



Advertisements
Similar presentations
Installing DOS and Windows98 under MS Virtual PC.
Advertisements

VMWare Workstation Installation. Starting Vmware Workstation Go to the start menu and start the VMware Workstation program. *Note: The following instructions.
An End-User Perspective On Using NatQuery Extraction From two Files T
Chapter One The Essence of UNIX.
Project 0, Linux Dabbling CS-3013 A-term Project 0: Linux & Virtual Machine Dabbling CS-3013, Operating Systems.
Project 0: Linux & VM Dabbling CS-3013, C-term Project 0: Linux & Virtual Machine Dabbling CS-3013, Operating Systems.
Project #2, Linux Kernel Modifications CS-502 Fall Programming Project #2 Linux Kernel Hacking CS-502 Operating Systems Fall 2006.
Project 0: Linux & VM Dabbling CS-502, Fall Project 0: Linux & Virtual Machine Dabbling CS-502, Operating Systems.
Guide To UNIX Using Linux Third Edition
Project 0 -- Linux Dabbling CS-502 (EMC) Fall Project 0 Linux & Virtual Machine Dabbling CS-502, Operating Systems Fall 2009 (EMC)
Overview Basic functions Features Installation: Windows host and Linux host.
Project 0 -- Linux Dabbling CS-3013 A-term Project 0 Linux & Virtual Machine Dabbling CS-3013, Operating Systems.
Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ (Course 3060) Section 2 Use the Linux Desktop.
Introduction to. What is Office 365 Office 365 is the same Office you already know and use every day. Office 365 is powered by “the cloud” which is a.
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Eucalyptus Virtual Machines Running Maven, Tomcat, and Mysql.
1 Web Server Administration Chapter 3 Installing the Server.
Chapter 4 Operating Systems and File Management. 4 Chapter 4: Operating Systems and File Management 2 Chapter Contents  Section A: Operating System Basics.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Configuring the MagicInfo Pro Display
Lesson 6 Operating Systems and Software
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
4 1 Operating System Activities  An operating system is a type of system software that acts as the master controller for all activities that take place.
DIY: Your First VMware Server. Introduction to ESXi, VMWare's free virtualization Operating System.
Hands-On Virtual Computing
Home Media Network Hard Drive Training for Update to 2.0 By Erik Collett Revised for Firmware Update.
CENT 305 Information Systems Security Linux Introduction.
University of Management & Technology 1 Operating Systems & Utility Programs.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Linux Operations and Administration Chapter Two Installing OpenSUSE.
Hands-On Virtual Computing
Virtual Machines Module 2. Objectives Define virtual machine Define common terminology Identify advantages and disadvantages Determine what software is.
5/14/2003Sprint TekNet IP Train the Trainer1 Open TekNet Software If working at a client station, enter the IP address of the server and mark page as a.
Using Virtualization in the Classroom
Overview of Linux Fall 2016 Dr. Donghyun Kim
Guide to Operating Systems, 5th Edition
Holland Computing Center STAT802 Create and access Anvil Windows 10 SAS instance 01/23/2017.
Operating System Kernel Compilation
bitcurator-access-webtools Quick Start Guide
CS1010: Intro Workshop.
CSC227: Operating Systems
Getting Started with Application Software
Lesson 4 0x Operating Systems.
Chapter Objectives In this chapter, you will learn:
Guide to Linux Installation and Administration, 2e
Seamless Guest OS's and more!
UNDERSTANDING YOUR COMPUTER
Desktop Virtualization
Installation and Configuration
9 Linux on the Desktop.
Creating a Windows 10 Virtual machine
Bomgar Remote support software
Create A Virtual Machine
Virtual Machines.
Introduction to Computers
Project 0: Linux and Virtual Machine Dabbling
Operating System Kernel Compilation
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
Using Virtual Machines to Teach CS-502 Operating Systems
SAPC Hardware Pentium CPU (or 486) 4M usable memory
CS-3013 Operating Systems Hugh C. Lauer
SUSE Linux Enterprise Desktop Administration
Programming Project #1 Command Shell
Programming Project #1 Fork and Command Shell
Linux as a Virtual Machines
SUSE Linux Enterprise Desktop Administration
Linux Operations and Administration
bitcurator-access-webtools Quick Start Guide
Operating System Kernel Compilation
Windows Operating System
Presentation transcript:

Project 0: Linux & Virtual Machine Dabbling CS-3013 Operating Systems Hugh C. Lauer (Slides include materials from Slides include materials from Modern Operating Systems, 3rd ed., by Andrew Tanenbaum and from Operating System Concepts, 7th ed., by Silbershatz, Galvin, & Gagne) CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

In this project, we will … Install our virtual machines and learn how to use them This is the place you will work during this course! Build and install the Linux kernel With your name on it! Follow Linux naming & numbering conventions Turn in the project using web-based Turnin CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

In this project, we won’t … … try to change anything in the kernel yet This is for a future project … try to support more than one machine architecture However, 32-bit and 64-bit architectures are different at the kernel level! Hardware-level code for different processor families is organized differently in kernel source code! Your kernel is not portable from one to another CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Using your Virtual Machine Characteristics Guest OS is OpenSUSE Linux 11.4 Configured for projects of this course Configured to work with VMware or Fossil Server Just the basic devices needed for this course You may use Your own PC or Mac VMware Player, VMware Workstation, or VMware Fusion Virtual Fossil server Linux server in CS Department with KVM virtualization CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Cloning your Virtual Machine (VMware) Don’t waste too much time trying to figure it out on your own See “cookbook” for how to clone or copy Download zip file, unzip to new folder Open .vmx file VMware Workstation, Player, Fusion Dialog box appears asking if you moved or copied the virtual machine Select “I copied it”! Adjust other parameters if necessary / appropriate Power on / Start your virtual machine CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling OpenSUSE Boot Screen Use arrow keys to select which kernel to boot Boot timer selects default kernel after timeout CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling OpenSUSE Login Screen Menu to restart, shut down, etc. CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Log into your Virtual Machine (VMware) Login is as student Password = CS-3013/502 Opens KDE, a Linux desktop environment Switching between Host and Guest Click in guest window to focus mouse and keyboard Type CTL-ALT to return focus to host … CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

KDE Desktop Environment “Gecko” menu. Equivalent to Windows Start button CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

KDE – a Linux GUI interface Looks and acts a lot like Windows or Mac GUI Many similar tools and applications “Start” menu is in lower left corner under the “Gecko” icon YaST, the SUSE administration tool Select User and group administration Create new user identity for yourself Log out, log in as new identity, delete student CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Starting your Virtual Machine (VMware — continued) Full screen mode Type CTL-ALT-Enter to switch to or from guest full screen (VMware only) Interrupting CTL-ALT-DEL always goes to host system Use VM menu command in VMware to “send CTL-ALT-DEL to guest” CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Other Notes If not, see VM menu Usually! When input focus is in guest window Inserted CD/DVD is recognized by guest OS Same for USB flash drive Snapshots Makes a record of the state of your virtual machine Any subsequent changes are made in copy-on-write mode Shared folder with host operating system Extremely useful! Not available in VMware Player May not work in this version CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Questions about VMware? Next:– Fossil Server CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Cloning your Virtual Machine (Fossil Server — Things you need) Secure shell client PuTTY for Windows Built into Linux and Macintosh desktop systems X11 “server” X-Win32 or equivalent for Windows Built into Linux and Macintosh Free NX Client Download from http://www.nomachine.com/download.php CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Cloning your Virtual Machine (Fossil Server — continued) Start X-Win32 (or equivalent) Windows only (Mac and Linux already started) Login to fossilvm.cs.wpi.edu WPI user ID, temporary password Change your password! Clone script sudo clone-vm.sh name-of-your-guest Open viewer sudo view-vm.sh name-of-your-guest Select kernel to boot CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling OpenSUSE Boot Screen CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling OpenSUSE Login Screen Don’t log in here! CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Remote Desktop to Virtual Machine (Fossil Server) Open Free NX Client Click Configure CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Configuring Free NX Client (for your virtual machine) Your Virtual Machine Name Proxy Host = fossilvm.cs.wpi.edu Proxy Port = 8080 Other settings Save configuration CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Log into Remote Desktop (Fossil Server) Login is as student Password = CS-3013/502 CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Remote Desktop in a Window CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Change User ID and Password! Reason Fossil server not very secure May accidentally connect to someone else’s virtual machine Do it now! Use YaST CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

YaST, the SUSE administration tool A much more efficient/effective way to manage your system Administer hardware, software, users, services, etc. Root password CS-3013/502 (same as student password) Access via third tab under “Gecko” icon Use it to Set up your own user ID and delete the student ID Change root password! CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Share your thoughts and experiences with your colleagues Use the class e-mail list! CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Questions? CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

To get started with kernel build Find kernel sources in /usr/src i.e., a link to /home/src Current version is linux-2.6.37.6-0.5 Clone kernel source tree by linked copy: – In a command shell, do cp –al /usr/src/linux-2.6.37.6-0.5 kernelSrc Creates a linked copy of original tree in new directory called kernelSrc Or whatever you wish to name it CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Digression: Linux Hard Links Directory entries point directly to files Multiple directory entries may point to same file! Same or different directories (within same file system) Same or different name Name attached to directory, not file Permissions & attributes attached to file, not directory Called hard links (as opposed to symbolic links) Modifications to file seen thru all hard links mv and rm commands change directories, not files! File goes away when all directory entries (i.e., hard links) to that file are deleted and file is closed. CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Cloned Source Tree All directories are copied All directory entries are hard-linked to files in original source tree I.e., only one copy of each file exists A good thing, because kernel sources are hundreds of megabytes! To modify a file:– Unlink it in your directory (via mv or rm) Replace with modified copy in your directory Original still remains intact in original directory CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling To Modify a File mv file.c file.c~ Edit file.c~ in your favorite editor Save as file.c (Eventually) rm file.c~ EMACS and patch do this automatically Most other editors require you to do it manually CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling To Build Linux Kernel “Make configuration” step As ordinary user Build kernel files and modules Install modules, boot file, etc. Need root privileges CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

To Build Linux Kernel (continued) Always build to a separate destination tree mkdir ~/kernelDst make O=~/kernelDst … Reason Making the configuration generates a lot of include files and other sources If you don’t specify a destination, it fills up your source tree Submitted project files grow to megabytes! Graders unable to build your kernel! CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Making the Configuration In a command shell cd kernelSrc Do one of:– make O=~/kernelDst config Very long and tedious make O=~/kernelDst menuconfig Still somewhat long and tedious; also hokey make O=~/kernelDst xconfig Really nice; a better GUI; highly recommended make O=~/kernelDst gconfig Used to be better, but has not kept up with xconfig CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Make configuration (continued) Edit configuration file Load course config file from CS-3013.config Edit “General setup” to add your name No other edits necessary for this project. Save and quit If need to rebuild, use make O=~/kernelDst oldconfig to reuse same configuration CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling To Build Kernel In a terminal window (i.e., a shell), do:– cd kernelSrc make O=~/kernelDst Takes ~25 minutes on dual-core 2.4 GHz Core Duo, 1 GByte RAM in VM (2 GByte real memory) ~15 minutes on Virtual Fossil server Rebuilds after small edits are much faster Changing .h files causes longer rebuilds I.e., letter “O” CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Note: building with multiple processors Generally faster to do cd kernelSrc make –j4 O=~/kernelDst j = number of concurrent build “jobs” SUSE advice 2  number of processors CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Warnings Lots of warnings from files you never touched Not your problem No warnings allowed in your own code! In this course CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

For Project Submission Redirect build output to a file Submit A subset of that file (this project only) E.g., first two dozen and last dozen or so lines. Output of uname –a command README file with a summary of any difficulties or issues README.txt, README.doc, or README.pdf CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling To Install Kernel Requires root privileges sudo make modules_install install Root password = CS-3013/502 Note order of arguments! This puts modules into /lib/modules puts kernel, initrd file & symbols into /boot Changes links for vmlinuz, initrd adds entries to /boot/grub/menu.lst So your kernel shows up on boot screen So you can select which kernel to boot CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Running Your Kernel Restart your virtual machine Click in boot window Use arrow keys to select desired kernel or system To determine which kernel is running:– uname -a CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Submitting your Project From within your virtual machine, visit https://turnin.cs.wpi.edu:8088/ Log in Submit output of your build as Project 0 This is to test your ability to submit projects from the virtual machine! CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Project Due Due date:– Tuesday, August 30, 2011 When should projects be due:– 11:59 PM? Day before class vs. day of class Other thoughts? CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling

Linux and Virtual Machine Dabbling Questions? CS-3013, A-Term 2011 Linux and Virtual Machine Dabbling