Linux

Ubuntu Cosmic on Pixelbook – Possible!

The folks who use Crouton to run Linux on their Chromebooks tend to be an impatient bunch. Every time a new Ubuntu release comes out, they start peppering @dnscheid with questions about whether it’ll run.
 
As of this writing, Bionic is the most recent supported release.  But Cosmic and Disco both exist as well, and people want to install them. I haven’t made it as far as Disco, but I can answer these two questions:
 
Can Ubuntu 18.10 (Cosmic Cuttlefish) be installed on a Chromebook?
 
Yes.
 
Should you install Ubuntu 18.10 on a Chromebook?
 
So very much no.
 
Can I do it anyway?
 
Hold my beer. 

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

  1. If you haven’t already, download crouton from https://goo.gl/fd3zc
  2. Press ctrl-alt-t to open a crosh shell
  3. Make the installer by typing sudo install -Dt /usr/local/bin -m 755 ~/Downloads/crouton
  4. Install by typing sudo crouton -t xfce -r xenial -n cosmic
  5. 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.

  1. Enter your choot by typing sudo startxfce4 -n cosmic
  2. Enter a terminal by typing ctrl-alt-t
  3. Install Release Upgrader by typing sudo apt install ubuntu-release-upgrader-core
  4. Initiate the upgrade with the following commands:
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade
    sudo do-release-upgrade
  5. Follow the various prompts
  6. 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.

  1. 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
  2. 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
  3. Type sudo nano /etc/update-manager/release-upgrades and change prompt=lts to prompt=normal
  4. Execute the upgrade with
    sudo apt update
    sudo apt autoremove
    sudo apt dist-upgrade
    sudo do-release-upgrade
  5. Do not reboot after the upgrade! You will lose your video.
  6. 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
  7. 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.

Posted by Adam Labay, 0 comments