Difference between revisions of "SRT210 Lab 1"
(→Create Host VM) |
(→Create Host VM) |
||
Line 33: | Line 33: | ||
Start VMware workstation and create a new virtual machine, with the following specifications: | Start VMware workstation and create a new virtual machine, with the following specifications: | ||
+ | * Choose Microsoft Windows Server 2016 as the operating system type (even though we'll be installing Linux first). | ||
* Install from the CentOS 7 iso. | * Install from the CentOS 7 iso. | ||
− | * Set the hostname to matrixusernameVMhost (notice that VM is in capitals but everything else is lowercase) | + | * Set the hostname to matrixusernameVMhost (notice that VM is in capitals but everything else is lowercase). |
* Store the virtual machine files on your SSD drive. | * Store the virtual machine files on your SSD drive. | ||
− | * Set up the virtual disk to be up to 180GB in size, a single file | + | * Set up the virtual disk to be up to 180GB in size, a single file. |
* Set up the network adapter to be in bridged mode. | * Set up the network adapter to be in bridged mode. | ||
Revision as of 17:47, 4 January 2019
Contents
Objectives
- Get an overview of the course, faculty, and expectations.
- Set up host virtual machine to use in the course.
- Understand how boot records and offline disk access affect the security of a system.
Introduction
- The course is made primarily of labs. It will contain traditional instruction but only enough to get you started. Use the rest of the time to practice what you're supposed to be learning and ask questions when you get stuck or when something doesn't make sense.
- We'll typically have one weak for each lab. The lab is due in class, and needs to be checked by the professor before class is over. That means you should plan to have everything done by the middle of the class.
- Make the best out of your labbook. Not only is it a record of your progress (and your marks for the labs) but it's a large set of notes you'll be able to use at all the assessments.
- Everything in the labbook must be hand-written (by you) and every page must have your name on it. If I catch you using someone else's notes during an assessment - that will be treated as plagiarism.
- Speaking of plagiarism - it will not be tolerated in this course. You're encouraged to discuss and help each other (within reason) during labs, but all other assessed work must be completed independently.
- The lab instructions are written for the lab environment at school, but ask your professor if you can use your own host for the coursework and assessments. Generally speaking it should be possible.
- You do not need the following items which are listed in the course outline: USB stick; raspberry pi, case, cable, and power supply; network cable; SD card; and wireless adapter.
PART 1: HOST VIRTUAL MACHINE AND c7host
Overview
You'll use the Vmware on our lab machines as a hypervisor for your host. Typically you have one hypervisor running a bunch of VMs, but for securitty reasons in our lab environment we'll need to use nested virtualisation.
That means the VMware hypervisor will run on the real hardware (the lab machine) and we'll set up a second hypervisor in one VMware VM, which will host several other VMs.
Just to make it more interesting the host VM will be a dual-boot setup, so you can choose whether you boot into CentOS or Windows.
Create Host VM
Make sure your SSD drive has a single NTFS partition taking up the whole space.
Download both the CentOS and Windows Server 2012 ISO files. Start the downloads now in case they take a long time.
Start VMware workstation and create a new virtual machine, with the following specifications:
- Choose Microsoft Windows Server 2016 as the operating system type (even though we'll be installing Linux first).
- Install from the CentOS 7 iso.
- Set the hostname to matrixusernameVMhost (notice that VM is in capitals but everything else is lowercase).
- Store the virtual machine files on your SSD drive.
- Set up the virtual disk to be up to 180GB in size, a single file.
- Set up the network adapter to be in bridged mode.
Install CentOS
During the CentOS installation, make sure to follow these instructions:
- Set the software selection to Gnome Desktop
- Configure the "partition" layout by starting from the defaults, remove the /home logivcal volume, and allocate 140GB for /. This will leave about 36GB unallocated, you'll use that later for Windows.
- Set the hostname to c7host.
- The network should be connected on boot, as a dhcp client for now.
- Set the root password to something different from your regular user password.
- Create a regular user with the same username as your matrix username. Set the password to anything you like, as long as it's different from the root password.
Once the installation is complete your andrewVMhost virtual machine should boot into CentOS when it's powered on, you should be able to log in with your username, and browse the internet using Firefox.
Back up the Master Boot Record
The MBR contains a pointer to the operating system that's loaded when the computer is powered on. We'll need a backup of the CentOS boot record because Windows will overwrite it.
- First find out what the device name is for your hard drive. You can use the
blkid
andpvs
commands to guide you to the device name. For example a partition /dev/hda6 will be on the drive /dev/hda. You want the drive not the partition. - Create a directory
lab1
in your regular user's home directory. Not in root's home directory. - Use the dd command to back up the first 446 bytes of the drive into ~/lab1/centos-mbr.dd. Those 446 bytes contain the master boot record, not including the partition table. You don't need the partition table backed up.
We'll use this backup later.