Linux is an open-source operating system, meaning that anybody can take the source
code, study it, understand it, modify it and use it. This has lead to the creation of
many distributions of the operating system, each having its own team of developers
working to maintain and improve it. At the core of the operating system is the Linux
kernel, currently maintained by Linux creator Linus Torvalds. Thousands of
developers world-wide contribute to it, making it one of the largest open source
projects in existence. Each team, however, chooses which kernel version to use for
their distribution, and sometimes applies its own custom kernel patches.
Due to the large variety of distributions, tools and the plethora of possible hardware
and software configurations, we will be providing you a Virtual Machine to use. It
comes preinstalled with a Linux distribution we selected, as well as a recent version
of the Linux kernel source tree. This ensures that everyone has access to the same
tools, and benefits from a common (virtual) hardware platform to work with. In
addition, we will be able to evaluate your solution in the exact same conditions you
work with, hopefully eliminating most discrepancies. What is more, you will be able
to easily revert to a previous sane state in the case you break something. For
example, this way you don’t need to reboot your physical machine to test your new
kernel.
You are not required to solve the assignments in the provided VM, but your solution
will be evaluated using this VM. Furthermore, if you use a different work
environment, it will be more difficult for us to help you address the issues you may
encounter, since we will not be familiar with your setup. If you choose to build your
own workspace, you can use the Vmchecker 1 automatic evaluation interface to
check that your submitted solution works as expected.
md5(oslab-vm.zip) = 4f42b759ce89a933005eabce30cf9294 .
The ZIP file contains a VMware Virtual Machine with the following configuration:
• 2 processors with 1 core each • 20 GB SCSI HDD
• 1GB RAM
• 2 serial ports
(loopback)
• Debian GNU Linux Wheezy 8.7.1 (32bit) • Linux kernel 4.9.2
• User account:
oslab, password: oslab • Root account password: oslab
In order to run this Virtual Machine, we recommend that you use VMware
Workstation 12 (if you are using Linux or Windows), or VMware Fusion 8.
This VM can also be run inside VirtualBox, but we discourage this due to the way
the two platforms implement the virtual hardware. Unfortunately, we will not be
able to offer support if you choose to use a different solution (such as VirtualBox).
NOTE: It’s probably a good idea to not change any configuration options of the
Virtual Machine. If you do need to change something, please make sure to check the
feedback you receive from Vmchecker before submitting your final version!
3
https://support.microsoft.com/kb/889768
Go to Edit->Virtual Network Editor and check that in the list there is at least one
network of the type host-only and at least one network of the type NAT. If either of
these types are missing, click on Add Network, select the type of net- work to add
(e.g., NAT, Host-Only), and click Save.
4 Booting up the VM
After downloading and unpacking oslab-vm.zip in your folder of choice, go ahead
and start up VMware (Workstation or Fusion). Select File->Open and browse to the
location of the oslab-vm folder, and select oslab.vmx . Once the
VMisaddedtoyourinventory,select”Power on this VM”andtheguestoperating system
will boot up.
When first starting the VM, you may receive a message stating that This virtual
machine might have been moved or copied. In case this happens, you can select I
Moved It.
After it has finished booting up, you will see a prompt that looks like this:
oslab login: _
Simply click inside the VM window and your keyboard and mouse input will be
redirected to the guest operating system. To release control back to your host,
simply press Ctrl+Alt or Ctrl+Cmd.
Your virtual machine is connected to your network card, meaning you can access the
guest operating system via SSH. You can use this to issue commands to the guest
system, as well as to copy files over. The hostname of your guest operating system
is oslab.local
$ ssh oslab@oslab.local
$ scp some_file oslab@oslab.local:/home/oslab/some_file
$ scp oslab@oslab.local:/home/oslab/another_file ./another_file
You can use tools such as PuTTY5 to connect to the guest. To transfer files, you can
use a SCP client such as WinSCP6 . Use the hostname oslab.local and the
oslab/oslab username/password combination.
VMware provides a simple way to copy files to and from the VM called “Shared
Folders”.
When you login to the VM, you can now find the shared folder in
/mnt/hgfs/<your_folder_name>.
Installing a GUI
In order to reduce the size of the VM image and to simplify things, we have not
installed a GUI on the guest OS. If you want to do so, you can by running the
following command:
If you want to use a custom keyboard layout in the VM (e.g., Swiss French), edit
/etc/default/keyboard and change the following (for example, for Swiss French):
XKBLAYOUT="ch"
XKBVARIANT="fr"
Creating a snapshot
Restoring a snapshot
WARNING: When you restore a snapshot, all data written to disk from the time
the snapshot was taken is erased! This does not apply for shared folders, so make
sure to backup your files (either by SCP or shared folders).