Project 0: Linux & Virtual Machine Dabbling

Similar documents
Project 0: Linux Dabbling

A Linux Virtual Machine for CS-2011 Projects

Setting up your Virtual Machine on VMware

Project 2 Linux Kernel Hacking

Installing and Using SUSE Linux on VMware

The Ip address / Name value should be: srvvcenter-cis

Virtual Data Center (vdc) Manual

The Ip address / Name value should be: srvvcenter-cis

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

There are three separate utilities for configuring Linux kernel and they are listed below: Command-line interface # make config. Figure 1.

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Using the Zoo Workstations

How to Use This Lab Manual

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Introduction to Linux. Fundamentals of Computer Science

Laboratory Assignment #3 Eclipse CDT

SIS offline. Getting Started

Operating Systems Linux 1-2 Measurements Background material

CS Fundamentals of Programming II Fall Very Basic UNIX

Your Own Virtual Playground. CS 1585 :: Doug McGeehan

Installing and Upgrading Cisco Network Registrar Virtual Appliance

Introduction to File Systems

Lab #5 Guide: Installing Ubuntu as a Virtual Machine

Introduction to Concurrency (Processes, Threads, Interrupts, etc.)

Chap2: Operating-System Structures

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Getting Started with VMware Fusion VMware Fusion for Mac OS X Version 1.0

VMware Horizon FLEX Client User Guide

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

CTEC1863/2018F Bonus Lab Page 1 of 5

Lab E2: bypassing authentication and resetting passwords

Nested Home Lab Setting up Shared Storage

WA2592 Applied Data Science and Big Data Analytics. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc.

This is Lab Worksheet 7 - not an Assignment

1) Use either Chrome of Firefox to access the VMware vsphere web Client.

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Configuring GNS3 for CCNA Security Exam (for Windows) Software Requirements to Run GNS3

WA2393 Data Science for Solution Architects. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

This is Lab Worksheet/Installation 7

RWT Network System Installation Guide

Network Management Utility

Ex.no:2 Date: Kernel Configuration, Compilation and Installation

IT 341 Introduction to System Administration Project I Installing Ubuntu Server on a Virtual Machine

Labtainer Student Guide

UNIT 9 Introduction to Linux and Ubuntu

Part I. Introduction to Linux

CS197U: A Hands on Introduction to Unix

Building a 64-bit CentOS 7 Workstation using Oracle Virtual Box

1. Install a Virtual Machine Download Ubuntu Create a New Virtual Machine Seamless Operation between Windows an Linux...

LinX Software Suite v3 Getting Started

Connecting to ICS Server, Shell, Vim CS238P Operating Systems fall 18

Professor Hugh C. Lauer CS-1004 Introduction to Programming for Non-Majors

SETTING UP THE STUDENT COMPUTERS

CIS 231 Windows 10 Install Lab # 3

HiveManager Virtual Appliance QuickStart

CIS 505: Software Systems

About the Presentations

Linux hep.wisc.edu

Perl and R Scripting for Biologists

Parallels Software International, Inc. Parallels Compressor. Installation Guide. Server

HP LeftHand SAN Solutions

Parallel Programming Pre-Assignment. Setting up the Software Environment

CS370 Operating Systems

BIG STEP 400: INSTALL "VMWARE TOOLS" INTO "WINDOWS 10.." RUNNING INSIDE A "VIRTUAL MACHINE" INSIDE "VMWARE WORKSTATION PLAYER"

Parallels Software International, Inc. Parallels Compressor. User Guide. Server

Virtual Infrastructure Web Access Administrator s Guide ESX Server 3.0 and VirtualCenter 2.0

TIBCO FTL Message Switch Installation

Running Java Programs

Temple University Computer Science Programming Under the Linux Operating System January 2017

FireFox. CIS 231 Windows 10 Install Lab # 3. 1) Use either Chrome of Firefox to access the VMware vsphere web Client.

Intro to Linux & Command Line

Your desktop or laptop computer consists of several hardware components:

Due: February 26, 2014, 7.30 PM

Installation of the DigitalSystemsVM virtual machine

WA2342 NoSQL Systems Comparison. Lab Server VM Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

efolder BDR for Quest Rapid Recovery / VMware Continuity Cloud Guide

In this exercise you will practice working with HDFS, the Hadoop. You will use the HDFS command line tool and the Hue File Browser

Send the Ctrl-Alt-Delete key sequence to the Guest OS one of two ways: Key sequence: Ctlr-Alt-Ins Menu Sequence: VM / Guest / Send Ctrl-Alt-Delete

Intro to Linux. this will open up a new terminal window for you is super convenient on the computers in the lab

LinuxPPC Installation Manual for MIT

Laboratory Assignment #4 Debugging in Eclipse CDT 1

CST VMWare Documentation

Ubuntu 7.10 VMware Fusion Virtual Machine Setup Install HOWTO

Guides for Installing MS SQL Server and Creating Your First Database. Please see more guidelines on installing procedure on the class webpage

IT 341 Introduction to System Administration Project I Installing Ubuntu Server on an Virtual Machine

CIS c. University of Pennsylvania Zachary Goldberg. Notes

Installation Manual for Sonnet RAID Controller

CS Programming Languages Fall Homework #2

Chapter 15: Using GemStone/S 64 Bit in a VMware Appliance

CISC 220 fall 2011, set 1: Linux basics

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

CSCA0201 FUNDAMENTALS OF COMPUTING. Chapter 6 Operating Systems

Parallels Software International, Inc. Parallels Compressor. Installation Guide. Workstation

Download the current release* of VirtualBox for the OS on which you will install VirtualBox. In these notes, that's Windows 7.

LAB 0: LINUX COMMAND LINE AND SVN

Lab 1: Accessing the Linux Operating System Spring 2009

IT 341 Introduction to System Administration Project I Installing Ubuntu Server on an Virtual Machine

SAP GUI 7.30 for Windows Computer

CSE 303 Lecture 2. Introduction to bash shell. read Linux Pocket Guide pp , 58-59, 60, 65-70, 71-72, 77-80

Linux Home Lab Environment

Transcription:

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

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 Linux and Virtual Machine Dabbling 2

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 Linux and Virtual Machine Dabbling 3

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 Linux and Virtual Machine Dabbling 4

Cloning your Virtual Machine 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! (VMware) Adjust other parameters if necessary / appropriate Power on / Start your virtual machine Linux and Virtual Machine Dabbling 5

OpenSUSE Boot Screen Use arrow keys to select which kernel to boot Boot timer selects default kernel after timeout Linux and Virtual Machine Dabbling 6

OpenSUSE Login Screen Menu to restart, shut down, etc. Linux and Virtual Machine Dabbling 7

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 Linux and Virtual Machine Dabbling 8

KDE Desktop Environment Gecko menu. Equivalent to Windows Start button Linux and Virtual Machine Dabbling 9

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 Linux and Virtual Machine Dabbling 10

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 Linux and Virtual Machine Dabbling 11

Other Notes 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-onwrite mode Shared folder with host operating system Extremely useful! Linux and Virtual Machine Dabbling 12

Questions about VMware? Next: Fossil Server Linux and Virtual Machine Dabbling 13

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 Linux and Virtual Machine Dabbling 14

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 Linux and Virtual Machine Dabbling 15

OpenSUSE Boot Screen Linux and Virtual Machine Dabbling 16

OpenSUSE Login Screen Don t log in here! Linux and Virtual Machine Dabbling 17

Remote Desktop to Virtual Machine (Fossil Server) Open Free NX Client Click Configure Linux and Virtual Machine Dabbling 18

Configuring Free NX Client (for your virtual machine) Your Virtual Machine Name Other settings Proxy Host = fossilvm.cs.wpi.edu Proxy Port = 8080 Save configuration Linux and Virtual Machine Dabbling 19

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

Remote Desktop in a Window Linux and Virtual Machine Dabbling 21

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 Linux and Virtual Machine Dabbling 22

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! Linux and Virtual Machine Dabbling 23

Share your thoughts and experiences with your colleagues Use the class e-mail list! Linux and Virtual Machine Dabbling 24

Questions? Linux and Virtual Machine Dabbling 25

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 Linux and Virtual Machine Dabbling 26

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. Linux and Virtual Machine Dabbling 27

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 Linux and Virtual Machine Dabbling 28

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 Linux and Virtual Machine Dabbling 29

To Build Linux Kernel Make configuration step As ordinary user Build kernel files and modules As ordinary user Install modules, boot file, etc. Need root privileges Linux and Virtual Machine Dabbling 30

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! Linux and Virtual Machine Dabbling 31

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 Linux and Virtual Machine Dabbling 32

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 Linux and Virtual Machine Dabbling 33

To Build Kernel In a terminal window (i.e., a shell), do: cd kernelsrc make O=~/kernelDst I.e., letter O 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 Linux and Virtual Machine Dabbling 34

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 Linux and Virtual Machine Dabbling 35

Warnings Lots of warnings from files you never touched Not your problem No warnings allowed in your own code! In this course Linux and Virtual Machine Dabbling 36

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 Linux and Virtual Machine Dabbling 37

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 Linux and Virtual Machine Dabbling 38

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 Linux and Virtual Machine Dabbling 39

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! Linux and Virtual Machine Dabbling 40

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? Linux and Virtual Machine Dabbling 41

Questions? Linux and Virtual Machine Dabbling 42