Exercise 4

Table of Contents

1 Introduction

In this exercise, we jump straight into the current day and reinstall KONE2 with Ubuntu 18.04 LTS. We put the VM into the NAT network, as we will have some special use for it later.

\includegraphics[width=18cm]{verkko} ./verkko.svg

2 Steps

2.1 Reinstall KONE2

  1. If you have anything valuable in KONE2, save it. Otherwise, nuke the VM.
  2. Login to lonkaN+1, where lonkaN is your home lonka (or lonka5 if N=8). Start a new log in that lonka. (Optional) make a note in the old KONE2 log that the machine has been removed and reinstalled in another location.
  3. Reinstall in similiar manner as the previous install of KONE2. Differences below:
  4. 5G disk.
  5. Virt-install arguments: Replace xenial with bionic in the installer URL, and add priority=low in kernel arguments (to enable expert mode). Replace bridge=br0 with network=default.
  6. Network settings: No autoconfiguration. For IP address, choose 192.168.12X.NNN, where X is the number of your (different) lonka and NNN is the last octet of your KONE2 address. Check the netmask from lonka's routing settings. (ip r)
  7. Proxy: http://192.168.12N.1:3142/
  8. LVM with following partition table:
    LVSizeFSMount pointDetails
    lvusr1Gext4/usrTypical use news
  9. At the end of the installer, after GRUB is installed, open a shell and chroot into the installed system (chroot /target sh). Enable serial console right away (systemctl enable serial-getty@ttyS0). Exit the shell and finish the installation after that.

2.2 Post-installation

  1. Setup Kerberos and users. (Using a backup or scp, doesn't matter.)
  2. Move disk out of /ramdisk.
  3. Update system. Check free disk space.
  4. Reduce RAM to 256M. Reboot.

2.3 Create a backups VG

  • Create a 1G image and attach it to KONE2. Create a new PV and a new VG on that. Name it TUNNUS-backups-vg.

2.4 Change UID and home path of the zero account

Move the zero account (TUNNUS0) directly to filesystem root (/TUNNUS0) and change its uid to 999. usermod refuses to change these details of a logged in user. You can work around this by using the normal account

2.5 Grep

  • What is the origin of the name of the command grep?
  • Find the config file where apt's proxy information is stored in /etc. Recursive grep (grep -r) can be very useful here.
  • How can you find all addresses of form 192.168.12X.NNN in /etc? Write the command and analyze the found addresses in your log.

2.6 Shrink swap partition

  • Shrink swap partition down to 500MB (swapoff, lvresize, mkswap, swapon). Check disk space before and after.

Date: 2019-03-08T13:32+0200

Author: Janne Uusitupa

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0