Step 1: Create a chroot with Xenial
Ubuntu 16.04 Xenial, despite being obsolesced years ago, is the most recent version of Ubuntu that can be installed directly with crouton. To get to Cosmic, we’ll have to upgrade a few times. This first section is basically an excerpt from the official instructions at https://github.com/dnschneid/crouton
- If you haven’t already, download crouton from https://goo.gl/fd3zc
- Press
ctrl-alt-t
to open a crosh shell - Make the installer by typing
sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
- Install by typing
sudo crouton -t xfce -r xenial -n cosmic
- Follow the prompts
Congratulations! You now have Xenial installed. Enter by typing sudo startxfce4 -n cosmic
Step 2: Upgrade to Bionic
Now that you have a functioning chroot, it’s time to upgrade to Bionic – the most recent version of Ubuntu which is still fully functional on a Chromebook.
- Enter your choot by typing
sudo startxfce4 -n cosmic
- Enter a terminal by typing
ctrl-alt-t
- Install Release Upgrader by typing
sudo apt install ubuntu-release-upgrader-core
- Initiate the upgrade with the following commands:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade - Follow the various prompts
- Log out, restart your Chromebook, and enter your chroot to make sure everything worked.
If all went well, you have yourself a fancy new Bionic installation.
Step 3: Replace a bunch of drivers
If you try to reproduce the above steps to install Cosmic, you will discover that you can never get a clean apt upgrade
. Instead, there’s a set of 5 packages that keep being held back:
The following packages have been kept back:
xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
If you try to get rid of them, you’ll end up cutting off your display, which is sadness. Instead, we need to replace them with different versions, and then revert to these versions post-upgrade.
- Remove the troublesome drivers with
sudo apt remove xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel
- Install the friendly drivers with
sudo apt install xserver-xorg-core-hwe-18.04 xserver-xorg-input-evdev-hwe-18.04 xserver-xorg-input-wacom-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
- Type
sudo nano /etc/update-manager/release-upgrades
and changeprompt=lts
toprompt=normal
- Execute the upgrade with
sudo apt update
sudo apt autoremove
sudo apt dist-upgrade
sudo do-release-upgrade - Do not reboot after the upgrade! You will lose your video.
- Reverse steps 1-2:
sudo apt remove xserver-xorg-core-hwe-18.04 xserver-xorg-input-evdev-hwe-18.04 xserver-xorg-input-wacom-hwe-18.04 xserver-xorg-video-intel-hwe-18.04
sudo apt install xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-intel - Put back the packages that were autoremove’d earlier:
sudo apt install libcurl3 libegl1-mesa libglu1-mesa libgtop2-common libnih-dbus1 x11-apps x11-session-utils xfonts-base xfonts-encodings xfonts-scalable xfonts-utils xinit xinput xserver-common
Now you can exit, reboot, and log back in.
Congratulations! Also, your system is now unusably slow.
Good news: you upgraded to Cosmic. Good job, give yourself a hug.
Bad news: It’s gonna be slow. Mad slow. Unusably slow.
But it was a fun academic exercise, wasn’t it? Remember, we don’t upgrade software to use it, we upgrade because it’s there.