0% found this document useful (0 votes)
216 views46 pages

S12 - OS - Lab 1

This document provides instructions for installing VMware Workstation and setting up Fedora Core 11 (Red Hat Linux) in a virtual machine. The steps include downloading and installing VMware Workstation, creating a new virtual machine configured for Fedora 11, and allocating disk space and resources for the virtual operating system installation. The overall goal is to allow students to install, use, and experiment with an operating system virtually using VMware.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
216 views46 pages

S12 - OS - Lab 1

This document provides instructions for installing VMware Workstation and setting up Fedora Core 11 (Red Hat Linux) in a virtual machine. The steps include downloading and installing VMware Workstation, creating a new virtual machine configured for Fedora 11, and allocating disk space and resources for the virtual operating system installation. The overall goal is to allow students to install, use, and experiment with an operating system virtually using VMware.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

FPT University Lab 1 – Operating System

FPT UNIVERSITY
Lab 1 for Operating Systems

Learning outcome
Upon successful completion of this lab, you will be able
 To install the VMware-workstation and how to use it to install and test the OS
software
 To setup the Fedora Core 11 (RedHat Linux) on VMWare
 To use, study, and manipulate some operations on this OS.
 To use the C and C++ compiler, then compile them to the OS concept
Install VMware-workstation-8.x (current version is 8.0.0)
 Requirement: setup.exe
 Configure the VM to setup the OS Fedora 11 as following steps

Click New Virtual


Machine to create new
virtual machine that
can setup the new OS

o The “New Virtual Machine Wizard” windows is appeared

Choose the Custom to


configure the hardware
parameters that are
supported the OS as
requirements

o Click Next Button to go next step

Instructor: Kieu Trong Khanh, M.Eng Page 1 of 46


FPT University Lab 1 – Operating System
o Click Next Button to go next step

Choose “Workstation x” in
the Hardware compatibility
to the appropriate parameter
appeared as below in
“Compatible Products” and
“Limitation”, then decide
the chosen workstation that
is corresponded

o Click Next Button to go next step

Choose the “I will install the


operating system later”
option to customize Fedora
install (in lastest WS, the
program always requires
the user with licenses key
and setups in complexity)

o Click Next Button to go next step

Instructor: Kieu Trong Khanh, M.Eng Page 2 of 46


FPT University Lab 1 – Operating System

Choose the appropriate OS


family that would be liked
to setup (e.g. Linux)

Choose the OS serial/ version


exactly (e.g. Fedora)

o Click Next Button to go next step

Type the name of the virtual


machine (can be typed the
name keeping in your mind
and same name as the OS
name)

Type or Browse to the


location on hard disk that is
used to stored the virtual
machine (The virtual
machine is only one file
with extenstion .vmdk that
is portables and easy to
maintain

Instructor: Kieu Trong Khanh, M.Eng Page 3 of 46


FPT University Lab 1 – Operating System

o Click Next Button to go next step

Instructor: Kieu Trong Khanh, M.Eng Page 4 of 46


FPT University Lab 1 – Operating System
o Choose the number of processors that you need for the installed OS. Then,
Click Next Button to go next step

Slide the bar or type the size


of RAM that is used for the
installed OS.
Notes: the Fedora Core or
Redhat Linux requires the
swap file partition having
double size of RAM

o Click Next Button to go next step

Allows the machine can


directly access the Internet
with particular IP different
to the real machine
Allows the machine is
shared Internet from the real
machine (the IP is generated
by the real machine)

Do not allows this machine


access the Internet through
the real machine
Do not support (install the
driver of) the network card

Instructor: Kieu Trong Khanh, M.Eng Page 5 of 46


FPT University Lab 1 – Operating System
o Choose the network connection that you want. Then, Click Next Button to go
next step

o Click Next Button to go next step (should be used the recommended of


software – do not change anything)

Instructor: Kieu Trong Khanh, M.Eng Page 6 of 46


FPT University Lab 1 – Operating System

o Choose the “Create a new virtual disk” to create a new file on real machine
(as means that create a new disk on the virtual machine that is used for this
machine – don’t worry about that because the disk is a virtual – not real – that
is concept and remember that virtual machine is only a file on hard disk).
Then, Click Next Button to go next step

o Click Next Button to go next step (should be used the recommended of


software – do not change anything)
Type the size of disk (using
GB) that you want to use if
necessary. This means the
file on real hard disk have
maximum size depending
your chosen size.

Check to preserve the disk


space with setting above

The virtual machine disk


space is allocated in single
or multiple file depending
on user’s purpose

Instructor: Kieu Trong Khanh, M.Eng Page 7 of 46


FPT University Lab 1 – Operating System
o Click Next Button to go next

Instructor: Kieu Trong Khanh, M.Eng Page 8 of 46


FPT University Lab 1 – Operating System
o Click Next Button to go to next step

o Click Finish Button to finish all steps creating the new machine for the
purposed OS. You can see as below picture (otherwise, you have some
mistakes in one of above steps – checking and do it again  )
 First the WS allocating the disk file

Instructor: Kieu Trong Khanh, M.Eng Page 9 of 46


FPT University Lab 1 – Operating System
 Second the below picture is shown

Setup the Fedora 11 OS on VMWare


 Creating the Virtual Machine disk for setup Fedora 11 OS (as the first option in this
tutorial) (Recommended: HDD: at least 8GB, at least RAM 512MB, the Network
connection should be NAT – easy to connect internet anyway without configure the
domain in the private network)
o Click the “Edit virtual machine settings” link to configure some option in
setting up OS

o Choose Hardware tab/ Choose CD/DVD (IDE) Auto detect


 Choose “Use ISO image file”, the browse to iso file is used to setup
fedora
 Click OK Button to complete

Instructor: Kieu Trong Khanh, M.Eng Page 10 of 46


FPT University Lab 1 – Operating System

 Set up the Fedora 11 is executed as following steps


o Click the “Power on this virtual machine” item/ links on Command Panel

o The application (the virtual machine) is started, then you can see the screen as

Instructor: Kieu Trong Khanh, M.Eng Page 11 of 46


FPT University Lab 1 – Operating System

o Click (left) mouse into inside of the application, then use the arrow keys on
your keyboard to choose the option that you want to execute
o Choose the first option “Install or upgrade an existing system, then press Enter

Instructor: Kieu Trong Khanh, M.Eng Page 12 of 46


FPT University Lab 1 – Operating System

o Use the right arrow (→) to choose the skip to save time and skip checking
some testing hardware component (it is not necessary)

Instructor: Kieu Trong Khanh, M.Eng Page 13 of 46


FPT University Lab 1 – Operating System

o Click Next Button to go next step

o Choose the appropriate Language using. Then, click Next Button to go next
step

Instructor: Kieu Trong Khanh, M.Eng Page 14 of 46


FPT University Lab 1 – Operating System
o Choose the appropriate keyboard using. Then, click Next Button to go next
step. The warning dialog is appeared

o The warning informs the virtual hard disk need to configure for setting up the
OS, thus the data on disk can be lost (don’t worry about that – your disk have
nothing). Click the “Re-initialize drive” to reset the default partition
following the OS’s requirement

Type the computer name


that you want to name

Instructor: Kieu Trong Khanh, M.Eng Page 15 of 46


FPT University Lab 1 – Operating System

o Click Next Button to go next step

Instructor: Kieu Trong Khanh, M.Eng Page 16 of 46


FPT University Lab 1 – Operating System
o Choose the time zone (using the graphic or the combo box). Then, click Next
Button to go next step

Instructor: Kieu Trong Khanh, M.Eng Page 17 of 46


FPT University Lab 1 – Operating System
o Type the Root Password and Confirm (Notes: do not allow the blank
password in Fedora. The password is at least 6 characters and should be
contained the special character mixing numeric and character). Then,
click Next Button to go next step (if the warning is appeared, you should click
yes to accept – don’t worry about that)

Choose “Replace existing


Linux System” item to reset
the default configuration

Check “Review and


modify partitioning
layout” to divide the hard
disk following the
particular purposes

o Click Next Button to go next step


Instructor: Kieu Trong Khanh, M.Eng Page 18 of 46
FPT University Lab 1 – Operating System

o Choose the Reset button to delete the available partition (Click Yes button if
the warning is appeared).

Instructor: Kieu Trong Khanh, M.Eng Page 19 of 46


FPT University Lab 1 – Operating System

 Click New button to create new partition

Instructor: Kieu Trong Khanh, M.Eng Page 20 of 46


FPT University Lab 1 – Operating System

Choose swap to create the


swap partition that
supports the OS in the
swap file in process

Type the size of this


partition, the size is
recommended is double
of RAM size (e.g: 2 x
512MB = 1024 MB)

o Click OK button to finish the create swap partition

o Click New button again to create the root partition

Instructor: Kieu Trong Khanh, M.Eng Page 21 of 46


FPT University Lab 1 – Operating System

Choose “/” symbol that


represent the root partition

Choose “ext3” that


represent the formatting
type to hard disk

Use all the part unused of


hard disk

Set this partition as Boot


disk

 Click OK button the create root partition

o Click Next Button

Instructor: Kieu Trong Khanh, M.Eng Page 22 of 46


FPT University Lab 1 – Operating System

o Click “Write changes to disk” to valid the changing (same as partition


and format each partition)

Instructor: Kieu Trong Khanh, M.Eng Page 23 of 46


FPT University Lab 1 – Operating System

o Click Next Button to choose the software/component installed

Check the
component
package that you
want to install

Click the
“Customize now”
to select or
unselect the
package in needed

o Click Next Button to process

Instructor: Kieu Trong Khanh, M.Eng Page 24 of 46


FPT University Lab 1 – Operating System

Choose each of component,


then choose each software
package that are wanted to
install

Check to the packaged that


wanted to install

Click to adjust the number


of package installed in
details

o Click Next Button to process


o Notes: must choose the package mc**** in System Tools to install the
midnight commander

Instructor: Kieu Trong Khanh, M.Eng Page 25 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 26 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 27 of 46


FPT University Lab 1 – Operating System

o Recommended: should be choose the “Office and Produce” and “Software


Development”. Then, read carefully the appropriate software package to
choose installing. In the “System Tools” package of “Base Systems”
Component, add the “mc” – midnight commander. Click Next Button to
start install process

Instructor: Kieu Trong Khanh, M.Eng Page 28 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 29 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 30 of 46


FPT University Lab 1 – Operating System

o Click Reboot Button to finish the Installation OS and start the OS first time
How to use the Fedora OS
 Starting the OS in first time

Instructor: Kieu Trong Khanh, M.Eng Page 31 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 32 of 46


FPT University Lab 1 – Operating System

Instructor: Kieu Trong Khanh, M.Eng Page 33 of 46


FPT University Lab 1 – Operating System

o Click Forward Button

o Click Forward Again to create the user that can access the OS

Instructor: Kieu Trong Khanh, M.Eng Page 34 of 46


FPT University Lab 1 – Operating System

o Fill the Username, Full Name, Password, Confirm password. Then click
Forward Button to setup the time

Instructor: Kieu Trong Khanh, M.Eng Page 35 of 46


FPT University Lab 1 – Operating System

o Choose the correctly time. Then, click Forward Button

Instructor: Kieu Trong Khanh, M.Eng Page 36 of 46


FPT University Lab 1 – Operating System

o Click Finish

o Click the account, then type the password (press Enter or click Login) to
access the OS

Instructor: Kieu Trong Khanh, M.Eng Page 37 of 46


FPT University Lab 1 – Operating System

 Try to use it (depend on the Windows OS experiments)

Instructor: Kieu Trong Khanh, M.Eng Page 38 of 46


FPT University Lab 1 – Operating System
Learning to use the mc, terminal in Fedora OS, and setting up the addition program,
networking … for OS
 Connect to real machine to access the shared hard disk
o In windows,
 Set password to the Administrator account (using Administrative
Tools/ Computer Management/ Choose Local Users and Groups/
Choose Users/ Right click on Administrator, then choose Set
Password …)
 Create the shared disk or folder with alias name (right click on disk
or folder/ Click Properties/ Choose the Sharing tab/ Click Advanced
Sharing Button/ check the “Share this folder” checkbox – notes take
the share name, then click OK button, and click Apply/ OK)

Instructor: Kieu Trong Khanh, M.Eng Page 39 of 46


FPT University Lab 1 – Operating System

 Get the IP config of the VMnet1 that is used to type the “Server”
Item of “Connect to Server” in Fedora (using cmd, then type
ipconfig /all)

Instructor: Kieu Trong Khanh, M.Eng Page 40 of 46


FPT University Lab 1 – Operating System

o In the Fedora, access the shared disk or folder as following


 Connect or active the connection

 Choose Place in taskbar, click the “Connect to Server” item, we can


see

Instructor: Kieu Trong Khanh, M.Eng Page 41 of 46


FPT University Lab 1 – Operating System

Choose the Windows share to access


the Windows network

Fill the IP address of real machine


Ex: 192.168.19.1
Fill the alias name that is shared
Fill the username that can be access the
shared object
Type the WORKGROUP Name in
your Windows
Check “Add bookmark” and fill the
“Bookmark name” allow mapping the
shared folder as mapping driver on
Network in Windows

o Click Connect Button


o Typing the password of username can be access the shared object, press
Enter key

Instructor: Kieu Trong Khanh, M.Eng Page 42 of 46


FPT University Lab 1 – Operating System

o The windows shared object is appeared

 Using the command prompt of Fedora


o Choose the “Application” menu on the taskbar
Instructor: Kieu Trong Khanh, M.Eng Page 43 of 46
FPT University Lab 1 – Operating System
o Choose the “System Tools”, click the Terminal items
o On the command screen, using some command as
 mc
 ifconfig
 ping
 …

Learning to use the compiler in C – C language in Linux with gcc


 C program has a extension .c
 C++ program has a extension .cc or .C, .cpp
 Syntax for C compiler
gcc -o filedestination filesource
o Ex: gcc –o hello hello.c
 Syntax for C++ compiler
g++ -o filedestination filesource
o Ex: g++ –o hello hello.cpp
 Execution
./filedestination
o Ex: ./hello
 Compiling all file in the current directory uses
o make or makeall command
o gcc/g++ –o name sc1.c sc2.c sc3.c …scn.c
 Option of gcc/g++

Instructor: Kieu Trong Khanh, M.Eng Page 44 of 46


FPT University Lab 1 – Operating System
o –o option represent to place output in file filedestination, the default is to
put an executable file in out extension (*.out)
o –c option represent to compile or assemble the source files, but do not link
o –g option represent to produce debugging information in the operating
system following the native format (stabs, COFF, XCOFF, or DWARF 2)
o –wall: warning
 Using the Fedora Eclipse to create the C/C++ project, compile and build
o The Fedora Eclipse is a tool that is same as the Visual Studio of Microsoft
supporting the coding tool with Java and C/C++ language
o Hint: to compile, we should create the “makefile” before the building
project as
 Right click mouse on the project, choose New, click File
 Type the file name as makefile
 Typing the content of this file as
all: hello.exe

clean:
rm main.o hello.exe

hello.exe: main.o
g++ -g -o hello main.o

main.o:
g++ -c -g main.cpp
Submission
Upload the word or pdf file to cms describes some questions as
 Capture the terminal screen when using the ifconfig command in Fedora and the
ipconfig command in command prompt in Windows
 Capture the shared windows when connectting to the windows OS’s shared
folder/disk in your machine (using the File Browser with Bookmark). The
shared folder must have data files and sub folders
 Capture the mc screen and give your explanation about the F7 function in mc
 Submit the C/C++ files and objects (*.c and *.o) as the below content then
capture the result of the program, give your explanation the result of this
program

Instructor: Kieu Trong Khanh, M.Eng Page 45 of 46


FPT University Lab 1 – Operating System

Requirement
All the capture must be combination with full the windows including your accounts on
the windows and the Linux OS (if it is not, you will be taken 0 mark). Should be use
the capture in windows with jpg format to reduce the file size with your submitting
END

Instructor: Kieu Trong Khanh, M.Eng Page 46 of 46

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy