Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

IT Support & Help Desk Fundamentals  Module 4 – Operating systems: install, update and recover

Linux desktops and ChromeOS Flex for old PCs

Pick between ChromeOS Flex, Ubuntu Desktop and replacement for an ageing PC, install Ubuntu with Secure Boot left on, and rescue files with a live USB.

  • Beginner
  • 25 minutes
  • Examples run with Python 3.14.8 and Pyodide 314.0.7
  • By MySmartCoPilot
Free lesson, Pro answers: 25 minutes
Free: the whole lesson. With a pass: the model answers to its 2 interview questions.

What you will learn

  • Decide between ChromeOS Flex, Ubuntu Desktop and replacement for an ageing PC
  • Check a PC against the published minimums of ChromeOS Flex and Ubuntu Desktop
  • Install Ubuntu Desktop on a UEFI PC with Secure Boot left switched on
  • Recover a user's files from a PC that will not boot, with a read-only mount
  • Find the network, display, software and printer settings on a GNOME desktop

Before you start

What you’ll learn · Before you start

What you will learn

  • Decide between ChromeOS Flex, Ubuntu Desktop and replacement for an ageing PC
  • Check a PC against the published minimums of ChromeOS Flex and Ubuntu Desktop
  • Install Ubuntu Desktop on a UEFI PC with Secure Boot left switched on
  • Recover a user's files from a PC that will not boot, with a read-only mount
  • Find the network, display, software and printer settings on a GNOME desktop

Before you start

On this page

Forty PCs on the second floor stop getting Windows updates, and the budget pays for twelve new ones. The other twenty-eight have three futures, and the published minimums decide which: ChromeOS Flex: Google's version of ChromeOS that installs over Windows, macOS or Linux on Intel and AMD PCs, turning a model Google has tested into a centrally managed device for the Chrome browser and web apps. turns a listed model into a managed browser machine on 4 GB of memory, Ubuntu Desktop runs a full desktop where there are 6 GB of memory and 25 GB of disk, and the rest are replaced. One machine out of the twenty-eight runs a Windows-only application, and no new operating system changes that.

This lesson gives you the rule that sorts them, a program that applies it to ten PCs, an Ubuntu install that leaves Secure Boot: A UEFI firmware feature that refuses to start firmware drivers, boot loaders or operating systems that are not signed with keys the firmware trusts. Windows 11 needs Secure Boot capable firmware, in a VM too. More in “Build a practice lab with virtual machines” switched on, a live USB: A USB stick that boots a whole operating system without installing it, so a technician can test a PC's hardware or copy files out of a machine whose own system will not start. rescue that respects encryption, and the five places on a GNOME: The desktop Ubuntu Desktop ships with: the Activities overview that finds anything by name, the dock, and one Settings application whose panels hold Wi-Fi, displays, printers, users and accessibility. desktop a user’s questions will send you.

An ageing PC has three futures, and the user’s work picks one

Start with the user, not the hardware. The PC on the second floor that runs a browser, a web mail client and a spreadsheet in the browser all day is a different problem from the one that runs a drawing package installed on its own disk, and different again from the one with a single accounting application that exists only for Windows.

Three futures, each in a sentence. ChromeOS Flex replaces the old system with a managed ChromeOS device that runs web apps and the Chrome browser, which Google supports on the models it has tested. Ubuntu Desktop replaces it with a full Linux desktop that installs its own applications and gets five years of security and maintenance updates on a long-term support release. Replacement buys a supported machine, which is the only future that keeps a Windows-only application running.

Those three answers come from four questions, and the table below asks them. Answer it for one real machine on your own desk: what the user does all day, whether the exact model is on Google’s models list with support years left, and whether the PC has Ubuntu’s 6 GB of memory and 25 GB of disk.

Interactive · answer and compare Which future fits this PC? Answer three questions about the machine and its user. The table marks the options that still fit and says why the others do not.
What does this user do all day?
Is this exact model on Google's models list with two or more years of certification left?
Does the PC have 6 GB of memory and 25 GB of disk?

Answer the questions above: the table then marks what fits your case and says why the rest does not.

Three futures for an ageing PC against the four things that decide between them
Option Years of updates Small old machines Apps the user needs Work for the desk
ChromeOS Flex Decided by: Google's models list Mixed only while the model stays listed: HD-19's row stops at 2027, so it is already out Good 4 GB of memory and 16 GB of storage are enough, on x86-64 from 2013 onwards (Nvidia graphics from 2015) Poor web apps and managed Chrome: no Windows virtual machines, and local Linux apps depend on the model Good one USB installer per PC, then central management of every device
Ubuntu 26.04 LTS Decided by: Ubuntu's own requirements Good an LTS release carries five years of security and maintenance updates Mixed asks for 6 GB of memory and 25 GB of disk, above the Flex minimums Mixed Linux apps from App Center, but Windows-only software still does not run Mixed an install and a driver check per PC, and GNOME is new to the user
A newer PC Decided by: the budget and the apps Good a supported system for years, with firmware updates from the maker Good new hardware clears both sets of minimums with room to spare Good the one Windows application that blocks everything else keeps running Poor money, procurement and a migration for each user: the slowest of the three
How the answers decide
  • “What does this user do all day?” One Windows-only app: rules out ChromeOS Flex and Ubuntu 26.04 LTS. Neither system runs a Windows-only application: a different OS does not make the application portable, so the machine stays on Windows or the user moves to a supported PC.
  • “What does this user do all day?” Apps installed on the PC: rules out ChromeOS Flex. ChromeOS Flex is built around the browser: Windows virtual machines are not supported and a local Linux environment depends on the model, so locally installed software rules it out.
  • “Is this exact model on Google's models list with two or more years of certification left?” No, or not listed at all: rules out ChromeOS Flex. Google guarantees ChromeOS Flex only on listed models, and a model past its certification leaves the list and stops being tested, so the desk would carry every future fault itself.
  • “Does the PC have 6 GB of memory and 25 GB of disk?” No, one of them is short: rules out Ubuntu 26.04 LTS. Ubuntu Desktop asks for 6 GB of memory and 25 GB of disk; HD-19 has 8 GB but a 20 GB disk, which is why the rule sends it to replacement rather than to Ubuntu.
  • “What does this user do all day?” Browser and web apps and “Is this exact model on Google's models list with two or more years of certification left?” Yes, listed and in date: adds a caveat to A newer PC. Buying is still an option, but a listed model with support years left does the browser work for nothing more than the installer, so the money buys little here.
  • “Does the PC have 6 GB of memory and 25 GB of disk?” No, one of them is short and “Is this exact model on Google's models list with two or more years of certification left?” No, or not listed at all: adds a caveat to A newer PC. With both sets of minimums missed, replacement is the only future left; plan the data move and the disposal before the new PC arrives.

The table rules options out rather than ranking them, because that is how the decision actually works: one Windows-only application removes both Linux-shaped futures at once, whatever the hardware can do. Keep the answers beside the asset tag in the ticket, so the next technician reads a decision instead of an opinion.

Sorting the floor this way also spends the budget where it is needed. The twelve new machines go to the users the rule sends to replacement, starting with the one that needs the Windows-only application, and every PC that becomes a ChromeOS Flex or Ubuntu machine releases a new one for somebody who had no other option. The order of the work follows from the same table: the machines with data to move first, the shared and spare PCs last.

Choosing by how old the PC feels

Wrong: “it is eight years old, so it is finished.” Right: the age of a machine decides nothing on its own. A listed model from 2015 with 4 GB of memory is a working ChromeOS Flex device, while a 2016 PC with a 20 GB disk misses Ubuntu’s 25 GB and is replaced. Read the minimums, not the year.

Checkpoint

Check: The three futures of an old PC

  1. Question 1 of 2 A PC runs one accounting application that exists only for Windows. Which futures are left for it?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Replacement with a supported machine

    The user's work is the first question, because one Windows-only application removes both Linux-shaped futures at once. The lesson's rule returns the code windows-app-needed before it looks at any hardware field.

  2. Question 2 of 2 Which fact about a PC decides nothing on its own?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: How old the machine is

    The decision is made of published minimums, a row on a list and the user's work. The year on the case is neither of those, which is why the lesson's table asks three questions and never asks the age.

ChromeOS Flex is a managed browser machine while its model is listed

ChromeOS Flex installs over Windows, macOS or Linux and gives the PC the ChromeOS experience: the Chrome browser, web apps, central management and automatic encryption of user data. Google’s own description of its reach is broad — “ChromeOS Flex works on most Windows, Mac, and Linux devices manufactured over the last 10 or more years” — but the support promise is narrow, and that gap is where help desks get hurt.

The published minimums are short. An Intel or AMD x86-64 machine, 4 GB of memory, 16 GB of internal storage, the ability to boot from USB and full administrator access to the firmware. Intel and AMD processors and graphics from 2012 or earlier, and Nvidia graphics from 2014 or earlier, are not recommended or supported, and there is no support for ARM machines at all. The installer itself needs a USB drive of 16 GB or more, written either with the Chromebook Recovery Utility or from the downloaded image.

Then comes the part that decides the ticket: the models list. Google certifies individual models, and its documentation is explicit that a device has that status only when its exact model name and number appear on that list. Each row carries a status and the year the certification runs out:

Status on the list What the desk should do
Certified Deploy it, while two or more years of certification remain
Minor issues expected Deploy it, and check the row’s notes with the user first
Major issues expected Keep it off the list of candidates: boot problems are known
Decertified Do not start a deployment; plan the machine’s replacement
Not on the list It may work, but every future fault is yours to carry

The last two rows are the ones to argue from. Google’s page on certification says that when a model passes its date it leaves the list, stops being eligible for support, stops being tested and may develop faults without warning. The list itself adds that support runs to the end of the year shown. So a model whose listing stops at the year your hardware plan runs to has nothing left to give, which is exactly why the rule in this lesson asks for two years.

Flex is also narrower than a desktop operating system in what it runs: no Windows virtual machines, a local Linux environment that depends on the model, and a list of hardware Google does not test, including CD and DVD drives, fingerprint readers, stylus input and Thunderbolt features. Two further points belong in the ticket. Firmware updates stay the organisation’s job, because a Flex device does not update its own firmware; and Google recommends switching Secure Boot on for Flex devices, because Microsoft accepted its boot loader for that use.

Key idea

ChromeOS Flex is a good answer for a machine whose user lives in a browser, for exactly as long as that model’s row on Google’s models list has years left on it.

Checkpoint

Check: Flex minimums and Google's list

  1. Question 1 of 2 How many gigabytes of memory does Google's published minimum for ChromeOS Flex ask for?

    Type a number.

    Show the answer: Question 1 of 2

    Answer: 4 GB

    The "Prepare for installation" page lists 4 GB of memory and 16 GB of internal storage on an Intel or AMD x86-64 machine. Ubuntu Desktop asks for more: 6 GB of memory and 25 GB of disk.

  2. Question 2 of 2 A model you want to deploy shows "Decertified" on Google's models list. What does that mean for the desk?

    Choose one answer.

    A hint

    Read what Google says happens to a model once its certification date passes.

    Show the answer: Question 2 of 2

    Answer: Google no longer tests or supports it, so every later fault is the desk's own

    Certification is a promise with an end year. Once it passes, the model leaves the list and loses testing, support and fixes, so deploying it moves every future fault onto the help desk.

Ubuntu installs with Secure Boot left switched on

The second future is a full Linux desktop. Ubuntu’s download page offers Ubuntu 26.04.1 LTS, where LTS means Long-term support: a release a vendor maintains for years rather than months. An Ubuntu LTS release carries five years of security and maintenance updates., with five years of security and maintenance updates. Its published requirements are a 2 GHz dual-core processor, 6 GB of memory, 25 GB of disk and a USB port or DVD drive for the installer — higher than Flex’s minimums, which is why some machines that pass one test fail the other. The desktop it installs is GNOME 50, and the file system it puts on the disk by default is ext4: The file system Ubuntu puts on a disk by default. It keeps a journal of pending changes that the kernel replays when the file system is mounted dirty, which is why a rescue mounts it with the ro and noload options..

The install itself is ten minutes of waiting and five decisions. Step through them, and watch where Secure Boot comes up — or rather, where it does not:

Interactive · stage by stage One Ubuntu install with Secure Boot left on Step through an install on a UEFI PC. Each step says what the installer asks, what the technician chooses and why.
One Ubuntu install with Secure Boot left on, step 10 of 10. Showing Write the USB stick, Boot from the stick, Try Ubuntu first (Wi-Fi, sound, display), Answer the installer (third-party software on), Choose the disk layout, Secure Boot stays on, First login. In focus: First login.Install UbuntuWrite the USB stickan image writer, not a copyBoot from the stickF12, Esc, F2 or F10Try Ubuntu firstWi-Fi, sound, displayAnswer the installerthird-party software onChoose the disk layouterase, alongside or manualSecure Boot stays onsigned drivers by defaultFirst loginupdates and settings

The drawing shows the whole scene; its 10 steps are listed below.

Every step as text
  1. Write the stick. Write the Ubuntu Desktop image to a USB stick with an image writer: Disks on Ubuntu, Rufus on Windows, balenaEtcher on a Mac. Copying the file onto the stick does not work, and the write erases everything already on it.
  2. Boot the stick. Insert the stick and restart. If the PC boots its old system instead, hold the boot-menu key during startup: Canonical names F12 as the most common, with Escape, F2 and F10 as the usual alternatives, and the Option key on Apple hardware.
  3. Try before you install. The installer offers Try Ubuntu and Install Ubuntu. Try Ubuntu runs the whole desktop from the stick and writes nothing to the disk, so Wi-Fi, sound, the trackpad and the display can be checked before anything is at risk.
  4. What the preview leaves out. The preview uses open-source drivers only, so a PC that needs a proprietary graphics driver can look worse here than it will after the install. Note what failed; the installer offers those drivers in the next step.
  5. Answer the installer. Install Ubuntu on the desktop reopens the installer: language, accessibility, keyboard layout and network. A network connection is optional, but with one the installer can fetch updates and the third-party drivers while it works.
  6. Tick the third-party software. The installer offers third-party software for device support and media formats. Tick it: Canonical's own driver tools install the pre-built, signed drivers, which are the ones that work with Secure Boot switched on.
  7. Choose the disk layout. Erase disk and install Ubuntu takes the whole drive. Installing alongside Windows needs the Windows volume readable, so a BitLocker-protected disk has to be dealt with first: the installer cannot map an encrypted volume.
  8. Encryption and its key. The advanced options can encrypt the new installation. LVM and ZFS encryption ask for a security key that has to be typed at every boot: write it down and keep it off the machine, because nothing recovers the data without it.
  9. Leave Secure Boot alone. Nothing in this install asks for Secure Boot to be switched off. Ubuntu's boot loader is signed, and so are the drivers the installer offers, so the firmware setting that protects the PC from unsigned boot code stays exactly as it was.
  10. First login. The PC restarts, asks for the stick to be removed and boots the installed system. Finish with the updates, the printer and the accounts the user needs, and record the Ubuntu version in the asset list beside the machine.

Two steps in that walk-through are worth saying twice. The first is Try Ubuntu: the installer offers a preview that runs the whole desktop from the stick and writes nothing to the disk, so the Wi-Fi, the sound, the trackpad and the display can all be tested before a single byte of the user’s data is at risk. Canonical’s tutorial notes that this preview uses open-source drivers only, so a graphics card that needs a proprietary driver may look worse in the preview than it will after the install.

The second is the third-party software box. Ticking it installs device support and media formats, and Canonical’s driver documentation explains why that is safe with Secure Boot on: the ubuntu-drivers tool and the Additional Drivers application install the pre-built, signed drivers by default, and those are the ones that work with Secure Boot. Drivers fetched from elsewhere are what breaks it.

Switching Secure Boot off to make Linux install

Wrong: entering the firmware setup and disabling Secure Boot before an Ubuntu install, because “Linux needs it off”. Right: leave it on. Ubuntu’s boot loader is signed, the drivers the installer offers are signed, and switching the setting off removes a protection from the machine that nobody remembers to put back.

One case does stop the install, and it is an encryption case. Where Ubuntu is to sit beside an existing Windows system, the installer has to read that disk’s layout, and Canonical’s reference page explains that a BitLocker volume appears as random data without the correct key, so it cannot be mapped. That is a conversation with the machine’s owner about turning BitLocker off first, or about erasing the disk on purpose, never a guess.

Checkpoint

Check: Installing Ubuntu with Secure Boot on

  1. Question 1 of 2 What does the Ubuntu installer need done about Secure Boot on a UEFI PC?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Nothing: it installs with Secure Boot left switched on

    Canonical's driver guide says its tools install the pre-built, signed drivers that are known to work with Secure Boot. Leaving the setting on keeps the firmware refusing unsigned boot code, which is the point of it.

  2. Question 2 of 2 A PC has 8 GB of memory, a 2.1 GHz dual-core processor and a 20 GB disk. Does it meet Ubuntu Desktop's published requirements?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: No: the disk is below the 25 GB the download page asks for

    Ubuntu's download page asks for a 2 GHz dual-core processor, 6 GB of memory and 25 GB of disk. This PC misses only the disk, and the lesson's rule reports it as disk-below-25gb.

A live USB rescues files, and stops at encryption

The same stick that installs Ubuntu is the most useful rescue tool on the desk. A PC whose own system will not start can still boot the live session, see its disks and hand over the user’s documents — on a machine the desk owns and has been asked to recover. Two commands carry the work, and one decision stops it.

Interactive · stage by stage Rescuing files from a PC that will not boot Step through one rescue on a machine the desk owns. Each step names the command, what it tells you and where the work stops.
Rescuing files from a PC that will not boot, step 8 of 8. Showing Boot the live session, List the disks, Read the file systems, Encrypted? stop here, Mount read-only, Copy to a spare disk (home folder first), Write the ticket up. In focus: Write the ticket up.encrypted volumeBoot the live sessionTry Ubuntu, no installList the diskslsblk -f, as yourselfRead the file systemsext4, ntfs or crypto_LUKSEncrypted? stop herethe key holder decidesMount read-only-o ro,noload for ext4Copy to a spare diskhome folder firstWrite the ticket upfiles, sizes, where they are

The drawing shows the whole scene; its 8 steps are listed below.

Every step as text
  1. Boot the live session. Start the PC from the Ubuntu stick and choose Try Ubuntu. The desktop runs from the stick, so the broken system is never started and nothing on its disk is changed by the boot itself.
  2. See what is attached. lsblk -f prints every disk and partition with its file system, label and identifier. Read it before touching anything: it shows which device is the PC's disk, which is the stick you booted and which is the spare drive.
  3. Name the file systems. The FSTYPE column decides the next step. ext4 is a Linux system disk, ntfs a Windows one, vfat the EFI partition, and crypto_LUKS or a BitLocker volume means the data is encrypted and no mount will read it.
  4. Stop at an encrypted volume. Canonical's own page puts it plainly: without the right key the contents of a BitLocker drive look like random data. Nothing on the live session changes that, so the ticket goes to whoever holds the recovery key.
  5. Who releases the key. A key is released by the account or the organisation that owns the device, through its own process, and the owner is told. A technician never looks for a way around the lock: that is the one thing encryption is there to stop.
  6. Mount it read-only. For an unencrypted volume, mount it read-only. Plain -o ro is not quite enough on a Linux disk: the manual warns that ext4 replays its journal when the file system is dirty, so -o ro,noload keeps even that write away.
  7. Copy the user's data outward. Copy from the mounted disk to the spare drive, never the other way. Take the home folder and the places the user names, keep the file dates, and check the copy before anything is wiped or re-imaged.
  8. Leave a record. Unmount the disk, then write in the ticket what was copied, how large it was, which drive holds it and what was left behind. The next technician decides on a repair or a rebuild from that record.

lsblk -f is the first command because it answers the question that matters before any mounting: which device is which. Its manual page lists what --fs prints — the name, file-system type, version, label, identifier, free space and use, and where each is mounted — so one screen tells you which partition is Windows (ntfs) and which is Ubuntu (ext4), which disk is encrypted, and which device is the spare drive or the stick you booted from.

The second command is the mount, and it is read-only for a reason: a disk that is about to be sent for recovery must not be written to by the rescue itself. Plain -o ro is not quite enough on a Linux file system. The mount manual warns that “ext3 and ext4 will replay the journal if the filesystem is dirty”, which is a write to a disk you promised not to touch, and suggests ro,noload to prevent it.

Then the stop. If lsblk -f reports crypto_LUKS, or the Windows volume is protected by BitLocker, the data is unreadable without its key, and that is the design working as intended. Canonical’s own page says the contents look like random noise without the correct key. The ticket moves to the person or the organisation that holds the recovery key, through their own process; the owner is told what is happening.

Where the copy does run, two details save the second visit. Format the spare drive so that the user’s next machine can read it, which usually means exFAT rather than ext4, and copy the home folder first, since that is where the documents, the desktop and the mail store live. Then compare the file count and the total size on both sides, unmount the disk and only then let anyone wipe or re-image the machine.

Here is the whole rescue, recorded in a Linux lab: Ubuntu 26.04 LTS with a PC’s two disks and a spare USB drive attached as disk images, named loop0 to loop2 where a PC shows sda or nvme0n1, in a root shell (a live session types sudo in front of these commands). The lab has no udev, which keeps each disk’s details on a running system, so its lsblk reads the disks itself (--properties-by blkid) and leaves the version column empty.

A live-USB rescue: list, mount read-only, copy, check Python · live_rescue/rescue_lab_session.py
"""The rescue of a PC that will not boot, in the lesson's Linux lab (linux_lab.py: an Ubuntu 26.04 LTS root shell,
as in a live session's terminal after `sudo -i`). lab_disks.sh lays out the PC's disks and the spare USB drive as
loop devices: /dev/loop0 the system disk (Windows and Ubuntu), /dev/loop1 a second disk encrypted with LUKS (the lab
kept no key), /dev/loop2 the spare drive. Two commands are meant to fail: the mount of the encrypted disk, and a copy
with cp -a onto the exFAT drive.
"""
from linux_lab import run

run("""
bash lab_disks.sh pc
lsblk -f --properties-by blkid /dev/loop0 /dev/loop1 /dev/loop2
mkdir /mnt/ubuntu /mnt/windows /mnt/data /mnt/spare
mount -o ro,noload /dev/loop0p4 /mnt/ubuntu
mount -o ro /dev/loop0p3 /mnt/windows
mount -o ro /dev/loop1p1 /mnt/data
mount /dev/loop2 /mnt/spare
mount | grep ' /mnt/'
cp -a /mnt/ubuntu/home/asha/Desktop /mnt/spare/
rm -r /mnt/spare/Desktop
mkdir /mnt/spare/ubuntu /mnt/spare/windows
cp -r --preserve=timestamps /mnt/ubuntu/home/asha /mnt/spare/ubuntu/
cp -r --preserve=timestamps /mnt/windows/Users/Asha /mnt/spare/windows/
find /mnt/ubuntu/home/asha /mnt/windows/Users/Asha -type f | wc -l
find /mnt/spare -type f | wc -l
find /mnt/ubuntu/home/asha /mnt/windows/Users/Asha -type f -print0 | du -cb --files0-from=- | tail -n 1
find /mnt/spare -type f -print0 | du -cb --files0-from=- | tail -n 1
umount /mnt/ubuntu /mnt/windows /mnt/spare
""", failures=2)

Output

$ bash lab_disks.sh pc
lab: /dev/loop0 is the PC's system disk (EFI, Microsoft reserved, Windows, Ubuntu)
lab: /dev/loop1 is the PC's second disk (encrypted; the lab kept no key)
lab: /dev/loop2 is the spare USB drive
$ lsblk -f --properties-by blkid /dev/loop0 /dev/loop1 /dev/loop2
NAME      FSTYPE      FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
├─loop0p1 vfat                      9C1E-5A7B
├─loop0p2
├─loop0p3 ntfs              Windows 3F2A6B1C0D9E8F70
└─loop0p4 ext4              ubuntu  6f1d2e3c-4b5a-4968-8778-695a4b3c2d1e
loop1
└─loop1p1 crypto_LUKS               2b8f0c1e-7d3a-4e59-9a61-3c4d5e6f7a8b
loop2     exfat             SPARE   5A3E-1C07
$ mkdir /mnt/ubuntu /mnt/windows /mnt/data /mnt/spare
$ mount -o ro,noload /dev/loop0p4 /mnt/ubuntu
$ mount -o ro /dev/loop0p3 /mnt/windows
$ mount -o ro /dev/loop1p1 /mnt/data
mount: /mnt/data: unknown filesystem type 'crypto_LUKS'.
       dmesg(1) may have more information after failed mount system call.
[exit status 32]
$ mount /dev/loop2 /mnt/spare
$ mount | grep ' /mnt/'
/dev/loop0p4 on /mnt/ubuntu type ext4 (ro,relatime,norecovery)
/dev/loop0p3 on /mnt/windows type fuseblk (ro,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
/dev/loop2 on /mnt/spare type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
$ cp -a /mnt/ubuntu/home/asha/Desktop /mnt/spare/
cp: failed to preserve ownership for '/mnt/spare/Desktop/todo.txt': Operation not permitted
cp: failed to preserve ownership for '/mnt/spare/Desktop': Operation not permitted
[exit status 1]
$ rm -r /mnt/spare/Desktop
$ mkdir /mnt/spare/ubuntu /mnt/spare/windows
$ cp -r --preserve=timestamps /mnt/ubuntu/home/asha /mnt/spare/ubuntu/
$ cp -r --preserve=timestamps /mnt/windows/Users/Asha /mnt/spare/windows/
$ find /mnt/ubuntu/home/asha /mnt/windows/Users/Asha -type f | wc -l
14
$ find /mnt/spare -type f | wc -l
14
$ find /mnt/ubuntu/home/asha /mnt/windows/Users/Asha -type f -print0 | du -cb --files0-from=- | tail -n 1
4036818	total
$ find /mnt/spare -type f -print0 | du -cb --files0-from=- | tail -n 1
4036818	total
$ umount /mnt/ubuntu /mnt/windows /mnt/spare

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 rescue_lab_session.py

lsblk names every partition before anything is touched: EFI (vfat), the Microsoft reserved one with no file system, Windows (ntfs), Ubuntu (ext4), a second disk whose only partition is crypto_LUKS, and the spare drive (exfat). Ubuntu mounts with ro,noload, which the list of mounts shows as norecovery; the lab runs NTFS and exFAT through FUSE programs, shown as fuseblk; and the encrypted partition does not mount at all. cp -a fails on the spare drive because exFAT stores no owners, so the copy uses cp -r --preserve=timestamps, which keeps the dates, and the last commands check it: 14 files and 4,036,818 bytes on each side.

A second recording shows what noload prevents, on two copies of an Ubuntu partition as a power cut during a save leaves it: one is mounted with plain -o ro, the other with -o ro,noload, and each is then compared with a third, untouched copy.

Why -o ro alone writes to a dirty ext4 disk Python · live_rescue/noload_lab_session.py
"""Why a read-only mount is not enough on a dirty ext4 file system, in the lesson's Linux lab (linux_lab.py; the
disks from lab_disks.sh power-cut): /dev/loop0 and /dev/loop1 are two identical copies of an Ubuntu partition as a
power cut during a save leaves it, with its journal still open, and /disks/power-cut.orig is a third copy that nothing
mounts. The first copy is mounted with -o ro, the second with -o ro,noload; dmesg shows the kernel's lines about the
two mounts, and cmp then says whether a mount wrote to its copy.
"""
from linux_lab import run

run("""
bash lab_disks.sh power-cut
dumpe2fs -h /dev/loop0 2>/dev/null | grep -o needs_recovery
mkdir /mnt/a /mnt/b
mount -o ro /dev/loop0 /mnt/a
mount -o ro,noload /dev/loop1 /mnt/b
dmesg -t | grep -E 'EXT4-fs \\(loop[01]\\)' | tail -n 7
ls /mnt/a/home/asha/Documents
ls /mnt/b/home/asha/Documents
umount /mnt/a /mnt/b
cmp -s /disks/power-cut-a.img /disks/power-cut.orig && echo "copy a: unchanged" || echo "copy a: changed"
cmp -s /disks/power-cut-b.img /disks/power-cut.orig && echo "copy b: unchanged" || echo "copy b: changed"
""")

Output

$ bash lab_disks.sh power-cut
lab: /dev/loop0 and /dev/loop1 are two copies of the Ubuntu partition, taken during the power cut
$ dumpe2fs -h /dev/loop0 2>/dev/null | grep -o needs_recovery
needs_recovery
$ mkdir /mnt/a /mnt/b
$ mount -o ro /dev/loop0 /mnt/a
$ mount -o ro,noload /dev/loop1 /mnt/b
$ dmesg -t | grep -E 'EXT4-fs \(loop[01]\)' | tail -n 7
EXT4-fs (loop0): INFO: recovery required on readonly filesystem
EXT4-fs (loop0): write access will be enabled during recovery
EXT4-fs (loop0): orphan cleanup on readonly fs
EXT4-fs (loop0): recovery complete
EXT4-fs (loop0): mounted filesystem 6f1d2e3c-4b5a-4968-8778-695a4b3c2d1e ro with ordered data mode. Quota mode: none.
EXT4-fs (loop1): orphan cleanup on readonly fs
EXT4-fs (loop1): mounted filesystem 6f1d2e3c-4b5a-4968-8778-695a4b3c2d1e ro without journal. Quota mode: none.
$ ls /mnt/a/home/asha/Documents
budget-final.ods
budget.ods
letter.odt
minutes.txt
report.odt
$ ls /mnt/b/home/asha/Documents
budget-final.ods
budget.ods
letter.odt
minutes.txt
report.odt
$ umount /mnt/a /mnt/b
$ cmp -s /disks/power-cut-a.img /disks/power-cut.orig && echo "copy a: unchanged" || echo "copy a: changed"
copy a: changed
$ cmp -s /disks/power-cut-b.img /disks/power-cut.orig && echo "copy b: unchanged" || echo "copy b: changed"
copy b: unchanged

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 noload_lab_session.py

On the plain read-only mount the kernel reports recovery on a read-only file system and “write access will be enabled during recovery”, and cmp shows that copy changed; the noload mount ran “without journal” and changed nothing. The orphan cleanup lines are ext4 looking for files deleted while still open, and there were none. The ext4 manual warns that skipping the replay on a file system that was not unmounted cleanly leaves it with inconsistencies, one more reason to check the copy before anything is wiped.

Encryption is respected, not worked around

A technician does not look for ways past full-disk encryption, and never on a device they do not own or have not been asked to recover. Escalate to the key holder, record who was asked and when, and write in the ticket that the volume stayed locked. A desk that treats a locked disk as a challenge is one lost laptop away from a serious incident.

Checkpoint

Check: Live USB rescue and encryption

  1. Question 1 of 2 Why does the rescue mount an ext4 disk with -o ro,noload rather than -o ro alone?

    Choose one answer.

    Show the answer: Question 1 of 2

    Answer: Because ext4 replays its journal when the file system is dirty, which writes to the disk

    A rescue promises not to write to the disk. The mount manual warns that ext3 and ext4 replay the journal on a dirty file system even when mounted read-only, so the rescue adds noload and keeps that promise.

  2. Question 2 of 2 lsblk -f on a laptop that will not boot shows one partition as crypto_LUKS. What is the next step?

    Choose one answer.

    Show the answer: Question 2 of 2

    Answer: Escalate to whoever holds the recovery key and record that in the ticket

    An encrypted volume is where a rescue stops by design. The ticket goes to the owner or the organisation that holds the key, the owner is told, and the ticket records that the volume stayed locked.

GNOME: where the settings a user will ask for live

A user whose PC changed system asks six questions in the first week, and five of them are answered in Settings. The GNOME desktop puts a single Settings application behind the Activities overview: press the Super key, type the first few letters of what you want, and open the panel. The table maps the questions to the places:

What the user asks Where it is on GNOME
“How do I get on the Wi-Fi?” Settings, Wi-Fi panel
“My second screen is blurry” Settings, Displays panel
“I need the office printer” Settings, Printers panel, Add Printer
“Where do I get the apps?” App Center in the dock, or apt in a terminal
“Who else can use this PC?” Settings, Users panel
“Everything is too small” Settings, Accessibility panel

Printing is the one worth rehearsing, because it is the most common call. GNOME’s documentation says a USB printer is often recognised when it is plugged in, while a printer on the network is not set up by itself and is added from the Printers panel: allow the change with your password, press Add Printer, choose the printer the panel found, or type its network address when the panel does not discover it. The printing module of this track goes into queues, drivers and the faults; here it is enough to know the panel.

Software comes from two places, and both are worth showing the user once. App Center, the application in the dock, installs applications in the two formats Ubuntu carries, snaps and Debian packages, and asks for the password before it does. The terminal’s apt does the same job for anyone who prefers typing, and the updates module of this track covers keeping both current.

The habit to teach on the first day is the Activities overview itself. One key opens it, a few letters find any application or settings panel by name, and the user stops hunting through menus that look nothing like the ones they had. Give them three names to remember on a card beside the PC: Settings for the machine, App Center for software, Files for their documents. Most of the calls in week two are already answered by those three.

Checkpoint

Check: Settings, software and printers on GNOME

  1. One question Where does a user add an office printer that is on the network, on a GNOME desktop?

    Choose one answer.

    Show the answer: One question

    Answer: Settings, in the Printers panel, with Add Printer

    Settings holds the panels a user asks about: Wi-Fi, Displays, Printers, Users and Accessibility. The Printers panel adds a network printer that the desktop did not discover, by name or by its network address.

Ten PCs, one rule, written down

A decision made twice the same way is a rule; a decision made from memory is a mood. This program writes the rule down. It holds the two vendors’ published minimums in one snapshot, records each PC’s row of Google’s list, and prints a recommendation with the code of the rule that decided it, for ten machines off an inventory sheet:

Ten old PCs sorted into ChromeOS Flex, Ubuntu and replacement Python · flex_or_not/flex_or_not.py
"""Ten ageing office PCs against the published minimums of ChromeOS Flex and Ubuntu Desktop.

SNAPSHOT holds the two vendors' own minimums, written down once so that a decision can be
repeated and argued with: Google's "Prepare for installation" page for ChromeOS Flex (x86-64,
4 GB of memory, 16 GB of internal storage, no processor from 2012 or earlier) together with its
certified models list and the "About ChromeOS Flex certified models" page (a model is supported
only while its certification lasts), and Canonical's "Download Ubuntu Desktop" page for Ubuntu
26.04 LTS (a 2 GHz dual-core processor, 6 GB of memory, 25 GB of disk).

PLAN_YEAR is the year the hardware plan runs to, so "two years of certification left" is a
number and not a feeling. The desk records each PC's row of the certified list in FLEET: the
status it read and the year the certification runs out.
"""

SNAPSHOT = {
    "flex": {
        "arch": "x86-64",
        "ram_gb": 4,
        "disk_gb": 16,
        "oldest_cpu_year": 2013,
        "listed": ("certified", "minor-issues"),
        "years_left": 2,
    },
    "ubuntu": {"ram_gb": 6, "disk_gb": 25, "cpu_ghz": 2.0, "cores": 2},
}
PLAN_YEAR = 2027

# One row per PC on the desk's inventory sheet. work is what the user does all day:
# "web" (browser and web apps), "desktop-apps" (software installed on the machine) or
# "windows-app" (one application that runs on Windows only).
FLEET = [
    {"tag": "HD-11", "arch": "x86-64", "cpu_year": 2016, "cpu_ghz": 2.3, "cores": 2,
     "ram_gb": 4, "disk_gb": 128, "flex": "certified", "flex_until": 2030, "work": "web"},
    {"tag": "HD-12", "arch": "x86-64", "cpu_year": 2015, "cpu_ghz": 2.4, "cores": 2,
     "ram_gb": 4, "disk_gb": 500, "flex": "minor-issues", "flex_until": 2029, "work": "web"},
    {"tag": "HD-13", "arch": "x86-64", "cpu_year": 2017, "cpu_ghz": 2.5, "cores": 4,
     "ram_gb": 8, "disk_gb": 256, "flex": "certified", "flex_until": 2030, "work": "desktop-apps"},
    {"tag": "HD-14", "arch": "x86-64", "cpu_year": 2014, "cpu_ghz": 2.0, "cores": 2,
     "ram_gb": 8, "disk_gb": 500, "flex": "decertified", "flex_until": 2026, "work": "web"},
    {"tag": "HD-15", "arch": "x86-64", "cpu_year": 2013, "cpu_ghz": 1.6, "cores": 2,
     "ram_gb": 2, "disk_gb": 32, "flex": "not-listed", "flex_until": None, "work": "web"},
    {"tag": "HD-16", "arch": "arm64", "cpu_year": 2021, "cpu_ghz": 2.4, "cores": 8,
     "ram_gb": 8, "disk_gb": 256, "flex": "not-listed", "flex_until": None, "work": "web"},
    {"tag": "HD-17", "arch": "x86-64", "cpu_year": 2011, "cpu_ghz": 2.8, "cores": 4,
     "ram_gb": 8, "disk_gb": 500, "flex": "not-listed", "flex_until": None, "work": "web"},
    {"tag": "HD-18", "arch": "x86-64", "cpu_year": 2018, "cpu_ghz": 3.0, "cores": 4,
     "ram_gb": 8, "disk_gb": 256, "flex": "certified", "flex_until": 2031, "work": "windows-app"},
    {"tag": "HD-19", "arch": "x86-64", "cpu_year": 2016, "cpu_ghz": 2.1, "cores": 2,
     "ram_gb": 8, "disk_gb": 20, "flex": "certified", "flex_until": 2027, "work": "web"},
    {"tag": "HD-20", "arch": "x86-64", "cpu_year": 2015, "cpu_ghz": 1.8, "cores": 2,
     "ram_gb": 8, "disk_gb": 120, "flex": "not-listed", "flex_until": None, "work": "desktop-apps"},
]


def flex_blocker(pc):
    """The first published rule that keeps ChromeOS Flex off this PC, or None when it fits."""
    flex = SNAPSHOT["flex"]
    if pc["work"] == "desktop-apps":
        return "needs-desktop-apps"
    if pc["arch"] != flex["arch"]:
        return "arch-not-x86"
    if pc["cpu_year"] < flex["oldest_cpu_year"]:
        return "cpu-before-2013"
    if pc["flex"] == "decertified":
        return "flex-support-ends"
    if pc["flex"] not in flex["listed"]:
        return "flex-not-listed"
    if pc["flex_until"] - PLAN_YEAR < flex["years_left"]:
        return "flex-support-ends"
    if pc["ram_gb"] < flex["ram_gb"]:
        return "flex-ram-short"
    if pc["disk_gb"] < flex["disk_gb"]:
        return "flex-storage-short"
    return None


def ubuntu_blocker(pc):
    """The first Ubuntu Desktop requirement this PC misses, or None when it meets them all."""
    ubuntu = SNAPSHOT["ubuntu"]
    if pc["ram_gb"] < ubuntu["ram_gb"]:
        return "ram-below-6gb"
    if pc["disk_gb"] < ubuntu["disk_gb"]:
        return "disk-below-25gb"
    if pc["cpu_ghz"] < ubuntu["cpu_ghz"] or pc["cores"] < ubuntu["cores"]:
        return "cpu-below-2ghz"
    return None


def recommend(pc):
    """Return (recommendation, reason code) for one PC: the rule that decided, not an opinion."""
    if pc["work"] == "windows-app":
        return "replace", "windows-app-needed"
    blocker = flex_blocker(pc)
    if blocker is None:
        return "chromeos-flex", "flex-listed"
    missing = ubuntu_blocker(pc)
    if missing is None:
        return "ubuntu", blocker
    return "replace", missing


def certification(pc):
    """The PC's row of the certified models list, as the desk recorded it."""
    if pc["flex_until"] is None:
        return pc["flex"]
    return f"{pc['flex']} to {pc['flex_until']}"


def main():
    flex, ubuntu = SNAPSHOT["flex"], SNAPSHOT["ubuntu"]
    print("The snapshot both decisions are made against")
    print(f"  ChromeOS Flex : {flex['arch']}, {flex['ram_gb']} GB memory, {flex['disk_gb']} GB storage,")
    print(f"                  no processor before {flex['oldest_cpu_year']}, a listed model with")
    print(f"                  {flex['years_left']} or more years of certification left")
    print(f"  Ubuntu Desktop: {ubuntu['cpu_ghz']} GHz x {ubuntu['cores']} cores, "
          f"{ubuntu['ram_gb']} GB memory, {ubuntu['disk_gb']} GB disk")
    print(f"  Hardware plan runs to {PLAN_YEAR}")
    print()
    head = f"{'PC':6}{'arch':8}{'cpu':13}{'RAM':6}{'disk':7}{'certified list':22}{'recommendation':16}reason"
    print(head)
    print("-" * len(head))
    counts = {}
    for pc in FLEET:
        choice, reason = recommend(pc)
        counts[choice] = counts.get(choice, 0) + 1
        cpu = f"{pc['cpu_year']} {pc['cpu_ghz']} GHz"
        print(f"{pc['tag']:6}{pc['arch']:8}{cpu:13}{str(pc['ram_gb']) + ' GB':6}"
              f"{str(pc['disk_gb']) + ' GB':7}{certification(pc):22}{choice:16}{reason}")
    print()
    for choice in ("chromeos-flex", "ubuntu", "replace"):
        tags = [pc["tag"] for pc in FLEET if recommend(pc)[0] == choice]
        print(f"{choice:14}{counts.get(choice, 0):2}  {', '.join(tags)}")
    print()
    print("Every PC the rule sends to replacement, and the requirement it misses:")
    for pc in FLEET:
        choice, reason = recommend(pc)
        if choice == "replace":
            print(f"  {pc['tag']}: {reason}")


main()

Output

The snapshot both decisions are made against
  ChromeOS Flex : x86-64, 4 GB memory, 16 GB storage,
                  no processor before 2013, a listed model with
                  2 or more years of certification left
  Ubuntu Desktop: 2.0 GHz x 2 cores, 6 GB memory, 25 GB disk
  Hardware plan runs to 2027

PC    arch    cpu          RAM   disk   certified list        recommendation  reason
------------------------------------------------------------------------------------
HD-11 x86-64  2016 2.3 GHz 4 GB  128 GB certified to 2030     chromeos-flex   flex-listed
HD-12 x86-64  2015 2.4 GHz 4 GB  500 GB minor-issues to 2029  chromeos-flex   flex-listed
HD-13 x86-64  2017 2.5 GHz 8 GB  256 GB certified to 2030     ubuntu          needs-desktop-apps
HD-14 x86-64  2014 2.0 GHz 8 GB  500 GB decertified to 2026   ubuntu          flex-support-ends
HD-15 x86-64  2013 1.6 GHz 2 GB  32 GB  not-listed            replace         ram-below-6gb
HD-16 arm64   2021 2.4 GHz 8 GB  256 GB not-listed            ubuntu          arch-not-x86
HD-17 x86-64  2011 2.8 GHz 8 GB  500 GB not-listed            ubuntu          cpu-before-2013
HD-18 x86-64  2018 3.0 GHz 8 GB  256 GB certified to 2031     replace         windows-app-needed
HD-19 x86-64  2016 2.1 GHz 8 GB  20 GB  certified to 2027     replace         disk-below-25gb
HD-20 x86-64  2015 1.8 GHz 8 GB  120 GB not-listed            replace         cpu-below-2ghz

chromeos-flex  2  HD-11, HD-12
ubuntu         4  HD-13, HD-14, HD-16, HD-17
replace        4  HD-15, HD-18, HD-19, HD-20

Every PC the rule sends to replacement, and the requirement it misses:
  HD-15: ram-below-6gb
  HD-18: windows-app-needed
  HD-19: disk-below-25gb
  HD-20: cpu-below-2ghz

Recorded with Python 3.14.8 on macOS 26 arm64. To run it yourself: mise exec python@3.14.8 -- python3 flex_or_not.py

Two of the ten are ChromeOS Flex, four are Ubuntu and four are replaced, and the interesting answers are the ones that look wrong at first glance. HD-13 is a listed model with 8 GB of memory, yet it goes to Ubuntu: its user needs applications installed on the machine, which is the one thing Flex does not do. HD-17 is the oldest PC in the list and still goes to Ubuntu, because Ubuntu publishes no cut-off year while Flex does not support processors from before 2013.

HD-19 is the case to remember. Its listing is current, it has 8 GB of memory, and the rule still sends it to replacement: its certification runs out in the planning year itself, so Flex is out, and its 20 GB disk is under Ubuntu’s 25 GB, so Ubuntu is out too. Press Edit, give it a 240 GB disk, and run the program again — the same PC becomes an Ubuntu machine, and the reason code changes to flex-support-ends, which is what the ticket should have said all along.

Key idea

Write the minimums and the model’s certification into one function, and every PC gets the same answer from the same facts, with a reason code the next technician can argue with.

Checkpoint

Check: One rule, one reason code

  1. One question In the run, HD-19 is a listed model with 8 GB of memory and is still replaced. Which pair of facts decided that?

    Choose one answer.

    A hint

    Look at the certification year beside the model, and then at the disk.

    Show the answer: One question

    Answer: Its certification ends in the planning year, and its 20 GB disk is under Ubuntu's 25 GB

    A model whose listing stops at the planning year has no support left to give, so ChromeOS Flex is out; the 20 GB disk then fails Ubuntu's published 25 GB. The reason code in the run is disk-below-25gb.

Practise: the rule for your own fleet

Build the decision yourself. The exercise gives you the two vendors’ minimums and the fields a desk records for each PC; you write recommend(pc) so that it returns the recommendation and the code of the rule that decided, in the order the published rules fall. Then check the whole lesson with the questions.

Exercise · Easy · Python

Decide between ChromeOS Flex, Ubuntu and replacement

Write recommend(pc) so that the desk gets the same answer from the same facts. pc is a dictionary with arch ("x86-64" or "arm64"), cpu_year, cpu_ghz, cores, ram_gb, disk_gb, flex (the status on the models list: "certified", "minor-issues", "major-issues", "decertified" or "not-listed"), flex_until (the year the certification runs out, or None) and work ("web", "desktop-apps" or "windows-app").

Return a tuple (recommendation, reason). The recommendation is "chromeos-flex", "ubuntu" or "replace", and the reason is the code of the rule that decided. Apply the rules in this order:

  1. work is "windows-app": return ("replace", "windows-app-needed"). Neither system runs it.
  2. Otherwise find the first ChromeOS Flex rule the PC misses, in this order: "needs-desktop-apps" (work is "desktop-apps"), "arch-not-x86", "cpu-before-2013" (cpu_year under 2013), "flex-support-ends" (flex is "decertified"), "flex-not-listed" (flex is neither "certified" nor "minor-issues"), "flex-support-ends" again (fewer than 2 years from PLAN_YEAR to flex_until), "flex-ram-short" (under 4 GB), "flex-storage-short" (under 16 GB). If the PC misses none of them, return ("chromeos-flex", "flex-listed").
  3. Otherwise find the first Ubuntu Desktop requirement it misses: "ram-below-6gb", then "disk-below-25gb", then "cpu-below-2ghz" (under 2 GHz, or fewer than 2 cores). If it misses none, return ("ubuntu", <the Flex code from step 2>), so the ticket says why ChromeOS Flex was ruled out. If it misses one, return ("replace", <that Ubuntu code>).

The published minimums are already in FLEX and UBUNTU, so read the numbers from there rather than typing them again: a changed minimum is then one edit.

Ubuntu asks for more memory and more disk than ChromeOS Flex, so flex-ram-short and flex-storage-short never decide on their own: a PC that misses them misses Ubuntu's memory or disk rule as well, and that code is the one the ticket gets. Keep both tests in the cascade anyway, in the order above, so the function still follows the rules as the two vendors publish them.

Starter code · recommend.py

FLEX = {
    "arch": "x86-64",
    "ram_gb": 4,
    "disk_gb": 16,
    "oldest_cpu_year": 2013,
    "listed": ("certified", "minor-issues"),
    "years_left": 2,
}
UBUNTU = {"ram_gb": 6, "disk_gb": 25, "cpu_ghz": 2.0, "cores": 2}
PLAN_YEAR = 2027


def recommend(pc):
    """Return (recommendation, reason) for one PC: "chromeos-flex", "ubuntu" or "replace"."""
    return "replace", "windows-app-needed"
The sample tests · test_recommend.py
from recommend import recommend


def pc(**changes):
    """A listed PC that ChromeOS Flex fits, with the fields of one test changed."""
    base = {
        "arch": "x86-64",
        "cpu_year": 2016,
        "cpu_ghz": 2.3,
        "cores": 2,
        "ram_gb": 8,
        "disk_gb": 128,
        "flex": "certified",
        "flex_until": 2030,
        "work": "web",
    }
    base.update(changes)
    return base


def test_listed_model_gets_flex():
    """recommends ChromeOS Flex for a listed model that meets its minimums"""
    assert recommend(pc()) == ("chromeos-flex", "flex-listed")
    assert recommend(pc(flex="minor-issues")) == ("chromeos-flex", "flex-listed")


def test_flex_minimums_at_the_boundary():
    """accepts exactly 4 GB of memory, exactly 16 GB of storage and a processor from 2013"""
    assert recommend(pc(ram_gb=4, disk_gb=16)) == ("chromeos-flex", "flex-listed")
    assert recommend(pc(cpu_year=2013)) == ("chromeos-flex", "flex-listed")
    assert recommend(pc(flex_until=2029)) == ("chromeos-flex", "flex-listed")
    assert recommend(pc(disk_gb=20)) == ("chromeos-flex", "flex-listed")


def test_windows_only_application():
    """sends a PC whose user needs a Windows-only application to replacement"""
    assert recommend(pc(work="windows-app")) == ("replace", "windows-app-needed")
    assert recommend(pc(work="windows-app", ram_gb=32)) == ("replace", "windows-app-needed")


def test_flex_ruled_out_but_ubuntu_fits():
    """names the Flex rule that failed when it recommends Ubuntu"""
    assert recommend(pc(work="desktop-apps")) == ("ubuntu", "needs-desktop-apps")
    assert recommend(pc(arch="arm64")) == ("ubuntu", "arch-not-x86")
    assert recommend(pc(cpu_year=2012)) == ("ubuntu", "cpu-before-2013")
    assert recommend(pc(flex="not-listed")) == ("ubuntu", "flex-not-listed")
    assert recommend(pc(flex="major-issues")) == ("ubuntu", "flex-not-listed")


def test_certification_running_out():
    """treats a decertified model, and one with under 2 years left, as support ending"""
    assert recommend(pc(flex="decertified", flex_until=2026)) == ("ubuntu", "flex-support-ends")
    assert recommend(pc(flex_until=2028)) == ("ubuntu", "flex-support-ends")
    assert recommend(pc(flex_until=2027)) == ("ubuntu", "flex-support-ends")


def test_machines_below_both_sets_of_minimums():
    """reports the Ubuntu requirement a small machine misses"""
    assert recommend(pc(ram_gb=2, disk_gb=32)) == ("replace", "ram-below-6gb")
    assert recommend(pc(ram_gb=4, disk_gb=14)) == ("replace", "ram-below-6gb")
    assert recommend(pc(ram_gb=6, disk_gb=12)) == ("replace", "disk-below-25gb")


def test_ubuntu_minimums_at_the_boundary():
    """accepts exactly 6 GB of memory, 25 GB of disk and 2 GHz on two cores"""
    fits = pc(flex="not-listed", ram_gb=6, disk_gb=25, cpu_ghz=2.0, cores=2)
    assert recommend(fits) == ("ubuntu", "flex-not-listed")
    assert recommend(pc(flex="not-listed", ram_gb=5)) == ("replace", "ram-below-6gb")
    assert recommend(pc(flex="not-listed", disk_gb=24)) == ("replace", "disk-below-25gb")
    assert recommend(pc(flex="not-listed", cpu_ghz=1.9)) == ("replace", "cpu-below-2ghz")
    assert recommend(pc(flex="not-listed", cores=1)) == ("replace", "cpu-below-2ghz")


def test_the_order_of_the_rules():
    """reports the first rule that failed, not the last"""
    assert recommend(pc(work="desktop-apps", arch="arm64")) == ("ubuntu", "needs-desktop-apps")
    assert recommend(pc(arch="arm64", cpu_year=2010)) == ("ubuntu", "arch-not-x86")
    assert recommend(pc(flex="decertified", flex_until=2026, ram_gb=2)) == ("replace", "ram-below-6gb")
    assert recommend(pc(work="windows-app", arch="arm64", ram_gb=2)) == ("replace", "windows-app-needed")
A hint

Write two small helpers before recommend itself: one that returns the first ChromeOS Flex rule a PC misses (or None), and one that returns the first Ubuntu requirement it misses (or None). Each is a row of if tests in the order the prompt lists, so the code reads like the rules and the reason code falls out of whichever test fired.

recommend then has three lines of its own: the Windows-only case, the Flex helper returning None, and the Ubuntu helper returning None. Watch the two boundaries the tests check: exactly 4 GB of memory passes Flex's rule, and flex_until minus PLAN_YEAR must be 2 or more, so a model whose row stops at the planning year is already out.

The sample tests run on this device, in your browser (Pyodide): nothing is sent to mysmartcopilot.com. The first run downloads Python (about 13.5 MB), which is kept for the next runs. A check in your browser is feedback for you, not proof that the code is right for every input.

Practice that adapts to you

Practise this lesson

13 questions about 6 ideas of this lesson. Each answer is explained at once, and what you get right is kept in this browser.

  1. Question 1 of 13 Which of the three futures keeps a Windows-only application running?

    Choose one answer.

    Show the answer: Question 1 of 13

    Answer: Buying a supported machine

    The three futures are ChromeOS Flex for browser work on a listed model, Ubuntu Desktop for a full desktop, and replacement. Only the third keeps a Windows-only application alive.

  2. Question 2 of 13 Twenty-eight PCs lose support and the budget buys twelve machines. Where do the twelve go?

    Choose one answer.

    Show the answer: Question 2 of 13

    Answer: To the users the rule sends to replacement, starting with the Windows-only application

    Run the rule over the whole floor first. The machines it sends to replacement are the ones that need the new hardware, and the data moves on those are the work to schedule first.

  3. Question 3 of 13 How many gigabytes of internal storage does the published ChromeOS Flex minimum ask for?

    Type a number.

    Show the answer: Question 3 of 13

    Answer: 16 GB

    The published minimum is 16 GB of internal storage, and the USB installer drive must be 16 GB or larger too. Ubuntu Desktop asks for 25 GB of disk instead.

  4. Question 4 of 13 A model is not on Google's models list at all. What can the desk honestly tell the manager?

    Choose one answer.

    Show the answer: Question 4 of 13

    Answer: It may work, but nothing about it is guaranteed between updates

    Google certifies individual models by exact name and number, and guarantees functionality only on those. An unlisted machine is a decision to carry the risk yourself, which belongs in the ticket in writing.

  5. Question 5 of 13 Which of these does ChromeOS Flex not do? Choose every answer that applies.

    Choose every answer that is right.

    Show the answer: Question 5 of 13

    Answer:

    • Update the PC's own firmware
    • Run on an ARM machine
    • Run a Windows virtual machine

    Flex is a managed browser machine: no Windows virtual machines, no ARM, no firmware management, and a list of hardware Google does not test. It does encrypt user data, with weaker key protection where there is no TPM.

  6. Question 6 of 13 What does Try Ubuntu do before an install?

    Choose one answer.

    Show the answer: Question 6 of 13

    Answer: Runs the desktop from the USB stick without writing to the PC's disk

    The preview runs the whole desktop from the stick and writes nothing, so Wi-Fi, sound, the trackpad and the display can be checked first. It uses open-source drivers only, so proprietary graphics may look worse there.

  7. Question 7 of 13 A technician installs a graphics driver downloaded from outside Ubuntu's own packages, and the PC then fails to boot with Secure Boot on. What is the fix?

    Choose one answer.

    Show the answer: Question 7 of 13

    Answer: Install the signed driver from Ubuntu's own tools instead

    Canonical warns that drivers from outside its listed sources may overwrite the packaged ones and can break Secure Boot. The repair is the signed driver, not a weaker firmware setting.

  8. Question 8 of 13 Why does a rescue start with lsblk -f before anything is mounted?

    Choose one answer.

    Show the answer: Question 8 of 13

    Answer: It names every disk with its file system, label and identifier, so the right device is chosen

    The command answers the question that comes before every other one: which device is which. Choosing the wrong one is how a rescue copies over the data it was sent to save.

  9. Question 9 of 13 You copy a user's home folder onto a spare drive so that their next PC, running Windows, can read it. How should the spare drive be formatted?

    Choose one answer.

    Show the answer: Question 9 of 13

    Answer: exFAT, which both systems read and write

    The rescue has to be readable where it is going. exFAT is the usual choice for a hand-over drive; ext4 is for the Linux machine's own disk, and whatever is chosen, the copy is checked before anything is wiped.

  10. Question 10 of 13 A user on a new GNOME desktop asks how to connect a second screen and change the text size. Where do both answers live?

    Choose one answer.

    Show the answer: Question 10 of 13

    Answer: In Settings, in the Displays and Accessibility panels

    Teach the Activities overview once: one key, then a few letters of the panel's name. Displays, Accessibility, Wi-Fi, Printers and Users are all panels of the same Settings application.

  11. Question 11 of 13 Which two places install applications on an Ubuntu desktop?

    Choose one answer.

    Show the answer: Question 11 of 13

    Answer: App Center in the dock, and apt in a terminal

    Ubuntu carries applications as snaps and as Debian packages, and App Center lists both. It asks for the password before it installs, as apt does on the command line.

  12. Question 12 of 13 Why does the rule return a reason code beside each recommendation?

    Choose one answer.

    Show the answer: Question 12 of 13

    Answer: So the next person can see which published rule decided, and argue with it

    A decision made twice the same way is a rule. The reason code turns "replace it" into "its disk is under the 25 GB Ubuntu publishes", which the next technician, the manager and the user can all check.

  13. Question 13 of 13 HD-13 is a listed model with 8 GB of memory, and the run recommends Ubuntu. Which reason code does it print?

    Choose one answer.

    Show the answer: Question 13 of 13

    Answer: needs-desktop-apps

    When Ubuntu is the answer, the code the rule returns is the first ChromeOS Flex rule the PC missed, so the ticket says why Flex was ruled out. For HD-13 that is the locally installed software its user needs.

Interview questions

Warm-up (fresher): does an Ubuntu install need Secure Boot switched off?

No. Ubuntu Desktop installs and runs with Secure Boot on, because its boot loader is signed with a key the firmware trusts, and the drivers Canonical’s own tools install by default are the pre-built, signed ones that work with the setting on. Switching it off is a change to the machine’s firmware that removes a protection against unsigned boot code, and it tends to stay off for the rest of the PC’s life. The time the question really comes up is when someone installs a graphics driver built outside Ubuntu’s own packages, which can leave the system unable to boot with the setting on — and the fix is to use the signed driver, not to weaken the firmware.

Warm-up (fresher to 2-5 years): a PC is on Google’s models list, so can you deploy ChromeOS Flex on it?

Only after reading the whole row. The list gives each model a status and the year its certification ends, and both matter. A row marked “major issues expected” means boot problems are known; a decertified row, or one whose year is nearly here, means Google stops testing that model and will not support it, so every fault afterwards lands on your desk. Check also that the row is for the exact model name and number, because Google’s documentation warns that variants of a model may behave differently, and that the machine clears the minimums of 4 GB of memory and 16 GB of storage on an x86-64 processor newer than 2012.

Two harder questions follow: one about twenty-eight PCs and a deadline, one about a laptop that will not boot. Choose a plan for the pile of PCs and for the dead laptop before reading on, then see where the model answers begin:

Model answers open with any pass: ₹79 for 1 week ($2.99), one payment that never renews.

  1. Mid to senior

    Twenty-eight PCs on one floor stop getting vendor updates in four weeks. The budget buys twelve machines, you are the only technician, and the floor works office hours. Plan the four weeks: what you do first, what each PC ends up running, and what the floor is told.

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page. First step and follow-ups

  2. Fresher to senior

    A user's laptop will not boot and they present at 9 a.m. tomorrow. You boot a live USB session and the disk's Windows volume is encrypted with BitLocker. The user is travelling and answers only on a phone. What do you do tonight, and what do you tell them?

    Model answer, Pro. First step and follow-ups

Flashcards · 5 cards

Recall it, then check

Say the answer to yourself before you look: recalling it is what makes it stick.

  1. Which three futures does an ageing PC have, and what picks one?

    The user's work picks: ChromeOS Flex for browser work on a listed model, Ubuntu Desktop for a full desktop, and replacement when a Windows-only application must keep running.

  2. What does a PC need before ChromeOS Flex is a good answer for it?

    An x86-64 processor no older than 2013, 4 GB of memory and 16 GB of storage, and a row on Google's models list whose certification year has not yet arrived.

  3. How much does Ubuntu Desktop need here, and must Secure Boot be turned off for it?

    At least 6 GB of RAM and 25 GB of storage. Secure Boot can stay on, because Ubuntu's boot loader and the drivers its own tools offer are signed.

  4. How does a live USB session copy files off a disk without writing to it?

    Read the disks with lsblk -f, then mount the volume read-only. For ext4, the options ro,noload also stop the journal from being replayed.

  5. A rescue reaches an encrypted volume. Where does the rescue stop?

    The rescue stops there. The recovery key comes from the owner or the organisation through their own process, and the ticket records that the volume stayed locked.

Key takeaways

  • An ageing PC has three futures, and the user’s work picks one: ChromeOS Flex for browser work on a listed model, Ubuntu Desktop for a full desktop on 6 GB of memory and 25 GB of disk, and replacement when a Windows-only application has to keep running.
  • ChromeOS Flex needs an x86-64 machine with 4 GB of memory and 16 GB of storage, no processor older than 2013, and a row on Google’s models list whose certification year has not arrived.
  • Ubuntu Desktop installs with Secure Boot left switched on, because its boot loader and the drivers its own tools offer are signed; an install beside BitLocker-protected Windows stops until the owner deals with the encryption.
  • A live USB session reads the disks with lsblk -f and copies data out through a read-only mount, where ro,noload keeps even ext4’s journal replay off a disk you promised not to write to.
  • An encrypted volume is where a rescue stops: the recovery key comes from the owner or the organisation through their own process, and the ticket records that the volume stayed locked.

Terms in this lesson

ChromeOS Flex
Google's version of ChromeOS that installs over Windows, macOS or Linux on Intel and AMD PCs, turning a model Google has tested into a centrally managed device for the Chrome browser and web apps.
ext4
The file system Ubuntu puts on a disk by default. It keeps a journal of pending changes that the kernel replays when the file system is mounted dirty, which is why a rescue mounts it with the ro and noload options.
GNOME
The desktop Ubuntu Desktop ships with: the Activities overview that finds anything by name, the dock, and one Settings application whose panels hold Wi-Fi, displays, printers, users and accessibility.
live USB
A USB stick that boots a whole operating system without installing it, so a technician can test a PC's hardware or copy files out of a machine whose own system will not start.

References

Report a problem with this lesson

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.