dt249 3 computer system architecture and administration csaa week 3 l.
Skip this Video
Loading SlideShow in 5 Seconds..
DT249/3 Computer System Architecture and Administration (CSAA) ? Week 3 PowerPoint Presentation
Download Presentation
DT249/3 Computer System Architecture and Administration (CSAA) ? Week 3

Loading in 2 Seconds...

play fullscreen
1 / 13

DT249/3 Computer System Architecture and Administration (CSAA) ? Week 3 - PowerPoint PPT Presentation

  • Uploaded on

DT249/3 Computer System Architecture and Administration (CSAA) ‏ Week 3 “User-Mode Linux is a safe, secure way of running Linux versions and Linux processes.”

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'DT249/3 Computer System Architecture and Administration (CSAA) ? Week 3' - Gideon

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
dt249 3 computer system architecture and administration csaa week 3

Computer System Architecture and Administration (CSAA)‏

Week 3

user mode linux uml http user mode linux sourceforge net

“User-Mode Linux is a safe, secure way of running Linux versions and Linux processes.”

“Run buggy software, experiment with new Linux kernels or distributions, and poke around in the internals of Linux, all without risking your main Linux setup.”

User Mode Linux (UML)‏(http://user-mode-linux.sourceforge.net/)

DT249/3 - CSAA - L03

user mode linux uml
DT249/3 - CSAA - L03User Mode Linux (UML)‏
  • UML is a useful teaching tool, especially in courses where students need a dedicated machine in order to get the most out of it
  • UML is being used to teach OS development, network administration, and more general system administration.
  • These are all cases where having a virtual machine to practice on is far more convenient for everyone than using physical boxes.
why uml
DT249/3 - CSAA - L03Why UML?
  • The UML kernel runs in a virtual machine that can be configured in ways that your physical machine can't. It can have more memory, more devices, and, soon, more processors. So you can do development and testing of hardware capabilities even when you don't have the relevant hardware.
  • Poking around inside a running system
  • Since you have a full OS running outside UML, it's pretty easy for the terminally curious to find ways of looking inside this kernel that are impossible for a native kernel.
  • As a secure sandbox or jail Processes inside the user-mode kernel have no access to the hosting machine or to the outside world that's not explicitly provided. So, a malicious application running inside it can do no harm to anything that matters.
why uml5
DT249/3 - CSAA - L03Why UML?
  • Virtual networking UML virtual machines are networkable, to each other, to the host, and to other physical machines. So, UML can be used to set up a virtual network that allows setting up and testing of experimental services.
  • As a test environment Testing of some types of software requires booting up a machine. With UML, this can be very easily automated.
uml at the school of computing
DT249/3 - CSAA - L03UML at the School of Computing
  • At present The School of Computing provides one system specifically for hosting UML sessions
  • wicklow.cs.dit.ie
  • The binary executable on wicklow which loads the Linux kernel for the UML environment is


copy on write
DT249/3 - CSAA - L03Copy On Write
  • In UML, the entire file system is contained in a single file
  • By default the file used is root_fs in the current directory
  • If no command-line option is specified, the executable linux kernel will look for a file called root_fs in the current directoryThe Copy On Write mechanism (COW) allows many users to use the same base root_fs yet still make their own changes
DT249/3 - CSAA - L03
  • This works by keeping a read-only copy of the root file system shared by all users and a copy-on-write file for each individual user
  • The copy-on-write (cow) file contains only those changes which an individual user has made to files
  • From the user’s point of view, their file system consists of two parts
    • root_fs (read-only and shared)‏
    • cow_fs (read/write and not shared)‏
  • To support the sharing of a single root file system among all UML users on wicklow, the master root file system is stored in
    • /opt/uml/rootfs.debian
personal cow file
DT249/3 - CSAA - L03Personal cow file
  • To allow UML users on wicklow to store their own modifications to the root_fs file, each student has their own cow file
  • This cow file is located in their home directory on wicklow and is called
    • /uml/root_fs_cow_<your username>
  • Since this file reflects any changes you have made to the root_fs, if you delete this file all changes will be lost
umllinux script
DT249/3 - CSAA - L03umllinux script
  • To start UML on wicklow, users use the umllinux script


/bin/linux.nfs ubd0=/uml/root_fs_cow_`whoami`,/opt/uml/rootfs.debian eth0=mcast

  • This tells the executable linux kernel /bin/linux.nfs to use the root_fs (/opt/uml/rootfs.debian) and the cow file specified (/uml/root_fs_cow_<your username>)‏
  • It also tells linux to provide one ethernet card, eth0
backup your cow file
DT249/3 - CSAA - L03Backup your cow file
  • If the user were to create a backup copy of their cow file at the start of each wicklow session, then they would have the ability to roll-back any changes that were made during a given session
  • In this way users could experiment with settings and installing software in the knowledge that undoing their changes would be a simple matter
host fs
DT249/3 - CSAA - L03host_fs
  • One of the first questions asked in relation to UML is how to transfer files between the host and the UML session
  • UML supports the use of a specialised file system driver host_fs
  • This allows us to mount the file system of the host machine from within the UML instance
  • There are a number of ways of doing this
  • The first mechanism for mounting the host file system is to use the mount command as follows

mount none /mnt/host –t hostfs

DT249/3 - CSAA - L03
  • This will cause the root of the host’s file system to be mounted at the /mnt/host directory (which must exist)‏
  • Alternatively we could specify a non-root directory to mount
  • mount none /mnt/host2 –t hostfs –o /home/student/<name>
  • To make either of these mounts persistent, we can add the appropriate line to the /etc/fstab file
  • none /mnt/host hostfs /home/student/<name>