CS183 Lab 1: VMware and CentOS Linux Installation

Goal: In this lab, you will learn: 1) how to create a virtual machine using VMware Server; 2) how to install CentOS Linux; 3) how to recover the root passwd.

VM Creation

NOTE: During VM Creation and Linux installation, take screenshots as many as needed for your report. Use VM/Capture Screen from the VMware menu.

You will need to create a new Linux VM with 5G of disk space and 256M of memory.

  1. Start a terminal on the host OS and type:
    $ /usr/bin/vmware &
    
  2. Select Custom VM configuration.
  3. Go ahead and create a VM.

CentOS Installation

  1. Check if CentOS 5 CD1 (CentOS-5.1-i386-bin-1of6.iso) is already in /extra. If not, download one by doing:
    $ cd /extra
    $ wget http://mirrors.usc.edu/pub/linux/distributions/centos/5.1/isos/i386/CentOS-5.1-i386-bin-1of6.iso 
    
  2. Go back to VMware, double-click on CD-ROM, use ISO image: /extra/CentOS-5.1-i386-bin-1of6.iso
  3. Power on the virtual machine.
  4. Type in "linux text" to get text installation setup .
  5. Hit Skip CD test.
  6. Follow the instructions.
  7. Say "yes" if warned to erase ALL DATA.
  8. Partitioning Type: Create custom layout.
  9. Press F2 to create the following partitions 1-by-1.
    Mount Point  Type   Size
    -----------  ----   ----
    /	     ext3   3000M
                 swap   256M
    /tmp	     ext3   512M
    /var	     ext3   128M
    /import      ext3   1000M
    /home        ext3   Fill all available space
    
  10. Ignore partition warning.
  11. Boot loader configuration.
  12. Configure Network Interface.
  13. IPv4 Configuration for eth0
  14. Hostname Configuration.
  15. Time Zone Selection.
  16. Pick a good root passwd.
  17. Package selection. We want MINIMAL installation, so
  18. Reboot.
  19. Login as root.
  20. Turn off SELinux by editing /etc/selinux/config
    $ vi /etc/selinux/config
    
    Change
    SELINUX=enforcing
    
    into
    SELINUX=disabled
    
  21. Reboot again to make sure SELinux is disabled.
  22. Update current installed package.
    $ yum update 
    
  23. Create an user account for yourself.
    $ useradd <username>
    $ passwd  <username>
    
  24. Login yourself to make sure it works.

Root Passwd Recovery

Before doing so, you need to "forget" your root passwd by asking the person next to you or your TA (in case the person next to you is busy in recoverying his/her root passwd :) to change your root passwd to something else. DO NOT PEEK when he/she is changing it. After that, try to login as root several times and make sure your old one does not work anymore. Now, try to recover your root passwd by doing the following:
  1. Reboot your VM.
  2. On the splash screen, press any key to get to GRUB manual.
  3. Press 'a'.
  4. Type " single" (make sure there is a space before "single") and Enter.
  5. You should get a shell, change your root passwd there.
  6. Type "exit" to continue booting.
  7. Login as root to make sure your root passwd works.

Questions

  1. The device name for SCSI drives are named like /dev/sda, /dev/sdb, and so. What's the device name for IDE drives?
  2. What is an extended partition?

Scoring


Notes & Tips: