![Linux-distros](http://www.worldoweb.co.uk/wp-content/uploads/linux.jpg) Welcome to Linux II. ==================== **There are many different distributions of Linux.** In this course, we will be using [CentOS 7](https://www.centos.org/). To get started with CentOS 7, please follow the instructions below. Assignment #1 Quickstart ------------------------ This assignment must be completed by midnight on September 17th. 1. Get the ISO. --------------- Download the **CentOS 7 64-bit LiveGNOME DVD** .iso file. Get it on-campus at [http://cstech.ottawa.ad.algonquincollege.com](http://cstech.ottawa.ad.algonquincollege.com), or off-campus using [BitTorrent](http://mirror.csclub.uwaterloo.ca/centos/7.3.1611/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1611.torrent) or [direct download](http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-LiveGNOME-1611.iso). 2. Create a VM. --------------- Create a virtual machine in VMware Workstation, using the following procedure. Leave all default settings, except where specified below. 1. Click *Create a New Virtual Machine*, or click *File* and then click *New Virtual Machine...*. 2. Select *Custom(advanced)*. 3. Make sure that *Virtual machine hardware compatibility* is set to **Workstation 12.0**. 4. Select *I will install the operating system later.* 5. Set the *Guest operating system* and *Version* appropriately. 6. Name your virtual machine "CST8177 17F *username* LiveGNOME", where *username* is your assigned Algonquin College network user name. Change the *Location* parameter if you need to. Click *Next*. 7. Allocate one processor and **two** cores to the virtual machine. This will improve performance. If you have a quad-core processor, you can allocate as many as four cores to the virtual machine. 7. Allocate **2048** MB of memory to the virtual machine. Click *Next*. 8. On the *Network Type* screen, select **Use host-only networking**. 10. Use the default settings for all the remaining options. When you reach the "Ready to Create Virtual Machine" dialogue window, click the "Customize Hardware" button. 11. From the "Hardware" dialogue box, select *New CD/DVD (IDE)*. 12. In the right half of the dialogue box, select the `Use ISO image file` radio button. Click the `Browse...` button and locate the CentOS 7 LiveGNOME 64-bit DVD .iso file you downloaded earlier. 13. Click the `Close` and then `Finish` buttons. 14. Click `Finish`. 3. Run CentOS 7 --------------- Power the virtual machine on by clicking the `Power on this virtual machine` button. Once the Live DVD boots up, answer the initial questions and try using the CentOS 7 operating system. It is not necessary to install CentOS 7 to the hard drive, as we will do this in a future assignment. 4. Answer Online Questions -------------------------- Once you have completed the assignment, go on to answer the questions on Blackboard. You may wish to do the assigned reading before attempting the questions. 5. The Fine Print ----------------- > **Do not print this assignment on paper!** > > - On paper, you will miss updates, corrections, and hints added to > the online version. > - On paper, you cannot follow any of the hyperlink URLs that lead you > to hints and course notes relevant to answering a question. * **Due Date**: Midnight on Sunday, September 17th - No marks are given for work submitted late. * **Available online** - Version 1.0 -- 12h30 September 3, 2017 * **Prerequisites** - [CST8207 GNU/Linux Operating Systems I] - BYOD device - VMware Workstation 12.5 or higher - Read Chapters 2, 3 and 4 in the course textbook * **Deliverables** 1. Work through this assignment and be prepared to show the instructor your work if asked. 2. Answer the questions on Blackboard. * **Evaluation** - This assignment is worth 1% of your final mark. - This assignment is graded out of 10 marks. ###Purpose of this Assignment 1. Run a Linux LiveCD inside a VM (virtual machine). 2. Learn how to start and shut down a Linux VM. 3. Learn about the GNOME GUI. ###Assignment Summary This assignment will be completed on your laptop. You will create a virtual machine which will run a CentOS 7 64-bit live DVD. A live DVD is a complete bootable computer installation including operating system which runs in a computer's memory, rather than loading from a hard disk drive; the DVD itself is read-only. **When you reboot the virtual machine, you will lose any work you have done.** If you need to, you can pause or suspend the virtual machine instead. After starting CentOS using a VM and a live DVD, you will experiment with the GNOME GUI, and evaluate the results in order to answer questions on Blackboard. ###Grading This assignment has assignment questions; these are to be submitted on Blackboard and are worth ten marks. ###Requirements This assignment was written for VMware Workstation 12.5. VMware is available through the "Digital Downloads" link in Blackboard. You will also need a copy of the 64-bit LiveGNOME DVD for CentOS 7. If you do not want to download the .iso file as described in the Quickstart section, you could also try obtaining a copy from someone else who has already installed successfully. ###Questions Once you have completed the assignment, go on to answer the questions on Blackboard. <!-- References --> [CST8207 GNU/Linux Operating Systems I]: http://teaching.idallen.com/cst8207/17w/ Troubleshooting =============== <a name="Verify_the_Downloaded_ISO"> Verify the Downloaded ISO ------------------------- To verify the downloaded CentOS ISO, you must check the checksum of the ISO file you have downloaded. 1. Verify that you have the exact ISO file named `CentOS-7-x86_64-LiveGNOME-1611` that is `1,216,512` KB (`1.16GB`). 2. To verify the download, you will need some form of checksum program that runs on your local computer that can calculate **sha256** hashes. Unix and Linux machines may have the `sha256sum` command available (the equivalent on OSX is `shasum -a 256`); you don't need to download anything; read the `man` page or just run `sha256sum` (or `shasum -a 256`) followed by the ISO image name and compare the number with this checksum hash: **8af6ad70c35c9b65e7ca88b38d18bed14598eb122169c1a22fc3f5b1c2de7d87** For Windows users, one suggestion to use is [DivHasher](http://soft.mydiv.org/win/files-DivHasher.html) 3. If the number you calculate doesn't match the checksum hash above, there is a problem with your download. If the checksums match, your ISO file is not corrupt. Errors ------ You may from time to time receive **SELinux Alerts** in the GUI. These can be disabled by clicking on the "Show" button on the alert, and changing the "Would you like to receive alerts?" setting to "No" in the dialog box that pops up. VMware Troubleshooting ---------------------- The most common problem with VMware Workstation since 2008 is when you receive the following error: > This virtual machine appears to be in use. > > If this virtual machine is not in use, press the "Take Ownership" button to obtain ownership of it. Otherwise, press the "Cancel" button > to avoid damaging it. Ideally, you should click the "Take Ownership" button and then everything will work normally for you. If that doesn't work, you can use the following procedure: 1. Close VMware Workstation 2. Delete any `.lck` or `.lock` files and/or folder you see in the directory containing the problematic virtual machine. 3. Run VMware Workstation 4. Start the virtual machine. ----------- 1. Give your virtual machine two gigabytes of RAM. One gigabyte might result in poor performance, especially when the GUI is used. Using more than two gigabytes of RAM might trigger a kernel lockup when you take a snapshot. If you do receive a warning about a kernel lockup, you can safely ignore it. 1. Ensure that the following settings are turned on in your BIOS or UEFI firmware (you may not have all these settings, and some are different names for the same thing): - Intel Virtualization Technology - Intel VT-x - Virtualization Extensions - Vanderpool <!-- unnecessary blank line --> 1. Try uninstalling Microsoft's Hyper-V extension in the "Windows Features" option in the Control Panel. 1. Try increasing the number of processor cores allocated to the virtual machine to two. If you have a quad-core Intel CPU, you might be able to allocate as many as four cores. 2. Try uninstalling and reinstalling VMware. 3. Try an older version of VMware. 4. Don't use VMware. Try [VirtualBox](https://www.virtualbox.org/) instead. 5. Don't use Windows 10. There are [security issues with Windows 10](http://arstechnica.com/information-technology/2015/08/even-when-told-not-to-windows-10-just-cant-stop-talking-to-microsoft/) as well. Use an older version of Windows. 6. Don't use an AMD CPU. Historically, AMD CPUs have not always worked well with VMware Workstation. However there are [security issues with Intel chipsets](http://www.fsf.org/blogs/community/active-management-technology). Network Troubleshooting --------------- The following suggestions may help you to get your network working. THIS IS NOT REQUIRED FOR THIS ASSIGNMENT. 1. If you cannot see a network interface, try adding the following line to your virtual machine's `.vmx` file: ethernet0.virtualDev = "e1000" 2. If you network interface appears to be disconnected and you have made changes to your virtual network settings in the "Virtual Network Editor" in VMware, then the "NAT" setting on your virtual network adapter may not actually be connected to "NAT". Use the "Virtual Network Editor" window in VMware to confirm which of virtual networks you have has NAT enabled. Use the "Custom: Specific virtual network" setting for your "Network Adapter" in the "Virtual Machine Settings" window in VMWare to explicitly select the virtual network you want to connect to (that has NAT). 2. If you are unable to SSH into your virtual machine, the following suggestions might help: 1. Try using the `ping` and `tracert` commands from Windows to confirm network connectivity 2. Use the `systemctl status sshd` command to confirm that SSH is running ------ > Thanks to Ian Allen for some of the material on verifying ISO files.