Hamburger Menu

HOME

HOST A CONTEST!

CONTEST RULES

REGISTRATION

CONTEST DETAILS

RESULTS

LINKS

SPONSOR OUR CONTEST

OS Image Installation Instructions

Pacific Northwest NA Regional

1. Overview

This page describes how to set up a machine to run the current PacNW Regional Contest OS image (the “Contest OS”). The contest image consists of the Ubuntu Linux operating system and its tools and utilities, together with contest-specific software such as various IDEs and language compilers to be used for the Regional Contest. The Contest OS image is based on, and directly derived from, the ICPC World Finals OS image.

The result of following the instructions on this page will be to install the Contest OS on what is referred to as a “target drive”. The “target drive” can be either an internal drive on a machine [1], or an external USB chip (which is then referred to as the “target chip”). Once the Contest OS is installed on a target drive, booting a machine from the target drive will cause the machine to start running the Contest OS.

Installing the contest image on a target drive involves the following basic steps:

  1. Creating a “bootable installer chip” by burning the Contest image ISO onto a USB chip;
  2. Booting a machine from the bootable installer chip;
  3. Selecting the desired “target drive” onto which the installer should install the Contest OS (this could be an internal drive on the machine, or it could be a second USB chip);
  4. Following the instructions provided by the installer to install the complete Contest OS image onto the target drive; and
  5. Booting a machine from the target drive and executing certain necessary and certain optional post-install commands.

The option to run the Contest OS “live” from the bootable installer chip for testing purposes (instead of actually installing the OS onto a target drive) is also available — although doing so will NOT actually install the Contest OS on the computer.

Note: If you are a contest administrator or staff member involved in managing multiple Contest OS machines (for example, setting up a laboratory to host multiple teams, or managing and updating the Contest OS configuration), you may be interested in additional information provided at Additional Information for Contest Administrators. Also, if you have trouble with the following instructions you may find the information on this Troubleshooting page to be helpful.

2. Creating a Bootable Installer Chip

  1. Download ubuntu-22.04.1-icpc.pacnw2023-20240118-amd64.iso . This is the boot image ISO file (6.1 GBytes).
    • Checksums for the image can be found here:   MD5   SHA1   SHA256   SHA512
    • A list of packages included in the image can be found here.
    • A list of Python3 modules included in the image can be found here.

     

  2. Burn a bootable image onto a USB chip using that ISO file [2]. The USB chip onto which you burn the ISO file is referred to as the “bootable installer chip”.There are many tools which can be used to create a bootable installer chip from the downloaded ISO file. One such tool which we have used successfully many times is Etcher, which we have tested under both MS Windows and MacOS. However, you can use any tool you like as long as it can create an EFI bootable image from the ISO file.

3. Pre-Installation Setup

In order to install the Contest OS, you must use some computer as an “installation machine”. There are two separate approaches, depending on whether you want to install the Contest OS onto an internal drive in the installation machine or you want to install the Contest OS onto an external USB target chip plugged into the installation machine.

Installing to an internal drive

If you want to install the Contest OS onto an internal drive on the installation machine, proceed to the next section, “Starting the Installation“.

Installing to an external USB chip

Installing the Contest OS onto an external target chip is complicated by the fact that the Ubuntu installer does not provide a straightforward mechanism for selecting the intended installation drive. Rather, the installer looks for the first drive it can find, and uses that as the “default” installation drive. As a result, the installer is (by default) going to want to install to an internal drive on the installation machine (assuming such a drive exists and is accessbile). There are several available workarounds to this problem.

  • Physically disconnect the internal drive(s) in the machine before proceeding; or
  • Before booting the installation machine from the bootable installer chip (as described in the next section), go into the BIOS settings on the installation machine and disable the controller for the internal drive(s). This will keep the Ubuntu installer from seeing the internal drives and will instead cause it to automatically select the (external) USB target chip for the installation. Or,
  • Use the Ubuntu “Partition Editor” to select the external target chip. This option also requires formatting the necessary partitions on the target chip, along with specifying that the OS Boot Loader should be installed on the target chip. This option is selected by choosing the “Something else” menu item during the “Select Installation Type” step under the “Configuring the Installation” section, described below.

We recommend one of the first two options (either disconnecting the internal drives or disabling the internal drive controllers). However, if you are comfortable with partition editing and Linux disk configuration details, the third option will also work.

In any case, in order to install the Contest OS on an external target chip the installation machine must have at least one additional available USB port into which you can plug the target chip (note that the “target chip” is a separate device from the “bootable installer chip”, which must also be plugged into a USB port on the installation machine).

Finally, take note of the following regarding “target chips”:

  • The target chip must be at least 32GB.
  • In our experience, a USB target chip should be at LEAST USB 3.2 Gen 1 or higher; anything less will likely be too slow to use effectively during a contest. You will get the best performance out of a USB 3.2 Gen 2 (or higher) device. (Those who are curious about the differences between various “USB 3” devices might be interested in this page).
  • An important attribute of chips is their read/write speed. Chips with high speeds (>400MB/sec if possible) are strongly preferred.
  • The target chip must be inserted into a USB port that supports at least USB 3.2 Gen 1 or higher on the installation machine.
  • Prior to installing to a target chip, we first recommend using the installation machine BIOS to disable the controller for the machine’s existing internal drives, just to ensure you don’t accidently damage the existing drive contents. You’ve been warned 🙂

4. Starting the Installation

Installing the Contest OS starts with booting the installation machine from the bootable installer chip, using whatever boot sequence is appropriate for that machine (for example, power the machine on and interrupt the automatic bootup sequence using F10, F12, ESC, RETURN, or another key as appropriate, and then select the bootable installer chip as the boot device).

When the installation machine is booted from the bootable installer chip, multiple options are displayed by the “GRUB Boot Loader”. Among these options are:

  • Ubuntu
    • Performs an interactive Contest OS installation allowing you to manage OS configuration options. THIS IS THE RECOMMENDED OPTION.

     

  • Wipe NVMe and Install Contest Image
    • Installs the Contest OS image on an automatically-selected NVMe device (e.g. an SSD) using the default configuration options used at the ICPC World Finals, without allowing for interactive configuration changes. YOU PROBABLY DON’T WANT TO DO THIS.

     

  • Wipe Disk and Install Contest Image
    • Installs the Contest OS image on an automatically-selected hard drive, using the default configuration options used at the ICPC World Finals, without allowing for interactive configuration changes. YOU PROBABLY DON’T WANT TO DO THIS.

Normally you should choose “Ubuntu” and perform an interactive installation (since the default values configured by the other options may not reflect your desired configuration).

Selecting the “Ubuntu” option then displays a screen asking you to select either “Try Ubuntu” or “Install Ubuntu“.

  • If you want to run the Contest OS without actually installing it (e.g. for testing purposes), select “Try Ubuntu”; this will start the Contest OS running from the installer chip.

NOTE: this option does not provide for OS configuration, nor does it “install” the Contest OS (rather, the OS is run strictly in RAM). As a result, while this choice can be used to get an idea of what the contest desktop and similar facilities look like, it should not be assumed that the OS it runs will contain all of the features of a properly-installed Contest OS.

  • If you want to install the Contest OS (either on an installation machine internal drive or on a separate target chip), select “Install Ubuntu”. This will begin the interactive configuration and installation process. The detailed steps which apply during interactive configuration are covered in the next section.

5. Configuring the Installation

Once the installation process has been started and the “Install Ubuntu” option has been selected as described above, the installer will present multiple configuration option screens.

Note: because hardware configurations vary widely, you may encounter differences or difficulties with various configuration options. In that event, you may have to do some troubleshooting; see below.

Configuration option screens include:

Keyboard Layout
  • Choose the keyboard layout for the machine for which you are installing the Contest OS.
Updates and other software
  • Choose Normal installation.
Installation Type
  • Choose the location (drive) where you want the Contest OS installed. If the installer detects one or more operating systems already installed, it will list those and give you the option of either installing over the top of (that is, overwriting) an existing OS or installng “along side” an existing OS. If the installer detects an empty drive (for example, you’re installing to an empty target chip), this drive will be indicated with the option Erase disk and install Ubuntu.
  • Be sure to choose the correct location; proceeding with the installation is going to wipe out ALL data on the location you select! See the section on Pre-Installation Setup, above, for additional information regarding drive selection.
  • Click “Continue”, and then on the following screen, choose “Install Now”.
Where are you?
  • Choose the time zone where this computer will be located by clicking on the map or typing the time zone name (or a major city name) in the text box.
Who are You?
  • Specify the parameters for the default administrator account.

Ubuntu works by creating a privileged user account intended to be used to manage the system (as opposed to other Unix-like systems which use the root account directly for this purpose). This screen allows you to configure the parameters for this privileged account. Subquently, administrative operations on the machine would typically be done by logging in to this account and then using “sudo” to perform root operations. [3]

NOTE: the account created during the installation process is “privileged”, in that it has permission to execute the sudo command to perform super-user (“root”) operations. However, teams will NOT have permission to use the sudo command or the root account/password during the contest; unless you are a Contest Administrator configuring the Contest OS for installation on multiple team machines we do not recommend using root privileges to change anything in your machine configuration, as this will cause it to be different from what will be available at the Regional Contest.

Once you have completed the above steps the installation will proceed. Installation can take from a few minutes to well over an hour, depending on the speed of your machine and the USB chips you are using; a progress bar displays the status.

When the installation is complete it will ask you to restart the machine. Pressing “Restart Now” will prompt you to remove the installation media (the bootable installer chip) and press ENTER to restart.

Restarting the machine (booting it from the installed target drive) will take you to a screen which prompts for a login and then a password. Enter the account login id and password that you created during the installation steps above.

If you are a contestant who is creating a contest machine for your own use, logging in will will put you at the Linux desktop configured as it will be for team machines at the Regional Contest, and no further steps are necessary. Note however that the login account you have used is “privileged” (has “sudo” access); you will NOT have an account with privileged access during the Regional Contest).

If you are a Contest Adminisrator who is configuring machines for use by teams, continue with the following post-installation steps.

6. Post-Installation Updates

If you are a team member who is installing the Contest OS on your own machine to practice with it, You do not need to do anything else; simply boot your machine into the Contest OS from your target drive and login using the account/password you created during the above steps.

If you are a Contest Administrator configuring multiple team machines, it is necessary to perform certain additional operations, as follows:

  • Open a command prompt terminal window, either by right-clicking on the desktop or by using the appropriate menu item.
  • Ensure your machine has an active network connection. (Type ping google.com and verify you get a response. If not, type ip addr and see if you have an IP address assigned. If not, try typing sudo dhclient to obtain an IP address from your network’s DHCP server.) Your machine must have a network connection to the Internet in order for the following commands to succeed.
  • Execute the following commands:
    • sudo apt update
    • sudo apt upgrade

This set of commands pulls in any necessary updates to the machine configuration, along with creating a single account named “team” with password “contest” (see below regarding alternatives to this account).

Next, edit the file /etc/default/grub. You can do this using the nano editor by typing the following command:

	sudo nano /etc/default/grub

Using the nano editor (or any other editor you like), modify the line:

	GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to say:

	GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"

Save the file and exit the editor, by typing CTRL-X, then Y, then ENTER.

Finally, execute the command

	sudo update-grub

At this point you have the option to make any additional adjustments needed for team machines at your site. For example, you may want to provide further updates to iptables to enable network printing (see Printer Setup for further information on enabling network printing).

A final note for Contest Administrators: as noted above, the default arrangement created by these installation instructions is that every team will use the same “account” (login “team”, password “contest”). If you wish to create a more secure environment where every team machine in your contest has a distinct login/password, or if you wish to apply additional configuration (such as special firewall rules), see the additional information provided at Additional Information for Contest Administrators.

Once interactive configuration and installation are completed as described above, you will have a completely installed Contest OS on the “target drive” which was selected during configuration. To create multiple USB chips, execute the command

	sudo shutdown -h now

and make copies (clones) of the target chip (see Additional Information for Contest Administrators for further information on cloning chips).

7. TroubleShooting the Installation and Configuration Process

We’ve tried to make installing the Contest OS image as easy and as universally-compatible as possible. However, creating a single installation which can be easily installed on the literally thousands of machine hardware configurations which exist is a nearly impossible task; it’s understandable that it might not go perfectly for you. If you are having problems with installing the WF OS, this page contains a few notes which may be helpful.

 


[1] The use of the term “internal drive” on this page refers to an internally-installed storage device; it could be a rotating hard disk or it could be a Solid-State Drive (SSD). The instructions are the same in either case.

[2] It’s possible to burn the ISO onto a DVD (instead of a USB Chip) and use the DVD as the “bootable installer” device. However, since USB chips are far more common these days, the instructions on this page refer to the “bootable installer” device as the “bootable installer chip”. (Note: the install image will not fit on a CD-ROM.)

[3] This is a common source of confusion for people new to Ubuntu. There is no default password on the root account, and there is no point during the Ubuntu installation where you are asked to provide one (as is typical on other Linux installations, e.g. Fedora and CentOS). [Actually, saying “there is no password” is a bit misleading, as it implies you can login without providing a password – which would be a major security hole. Technically, the root account by default exists but is “locked out” — that is, there is NO password which will be accepted to allow a login to that account.]

The way Ubuntu provides root access is as follows. When you install Ubuntu, the installation procedure asks (during the “Who Are You?” step) for a user account name and password. It automatically creates and installs that account in a group which has root access – meaning the account is allowed to execute the “sudo” command. When you login using this account, you can execute commands which require root privilege simply by preceding the command with “sudo”. For example, to create a new account named “team999” which is in group 3000 you would type the following:

    sudo adduser --gid 3000 team999

This will prompt for the current account password (NOT the root password), and then execute the command as root. If you have a bunch of root-level operations to do and get tired of typing “sudo” in front of every command, you can instead type sudo bash. This will start a (bash) shell (after first prompting for the account password); that shell will display the standard “root prompt” (#) and will execute every command typed as root. (The command sudo -i is similar but has the effect that the default shell is used and the shell reads the standard initialization files, such as .profile and .login). If you really want to change the root password you can do it with sudo passwd. See this page for further details.

Note that, as stated above, team accounts will not have root access or sudo capability during the actual contest.