Marco's Blog

All content personal opinions or work.
en eo

Installing Dual-boot Linux on Asus Chromebook Flip C302

2017-10-03 8 min read Howto marco

[YO! In case you didn’t know, installing a new OS on any computer is always risky. You are likely to lose all your data, brick your Flip, and suffer grievous injury if you follow the steps below.]

I’ve been a big fan of the Flip line of Chromebooks from Asus. It started with the absolutely fun 10.1″, which was a goddess-send on cramped flights (hello, Spirit?). I moved on to the C301, a plasticky thing that was all standard Chromebook and not as much fun. But once I saw the almost identically named C302. an all-aluminum unibody beauty, I knew I needed one.

On the other Flips, I installed Crouton. That’s software that allows you to run Linux on top of ChromeOS. That’s very useful: ChromeOS is great for media consumption and online work, but it lacks in everything else I want from a laptop. You can’t program, you can’t use software that isn’t available online, etc. Crouton allows you to do all that and then some and I loved it.

Still, I run Linux natively on all my computers and it was a pain to deal with the limitations of an add-on. Cron jobs wouldn’t work, init scripts weren’t run, and whenever something didn’t work as expected, the first task was always to figure out if it was a problem with the environment or with my code. I wanted real Linux, not just an emulation. But I wanted to be able to continue using ChromeOS because Google is powerful enough to force media companies to run their stuff on its platform.

Dual-boot it had to be. Fortunately, since installing on the C301, the options for Linux installation have vastly improved and gotten more stable, easy-to-use, and reliable. Also, the first Linux distributions specifically meant for Chromebooks have appeared and sounded quite awesome.

First, to the options. If you opt to install Linux in a dual-boot way, you can either install it externally or internally. If you go the former route, the advantage is that your Chromebook will barely change from the way it is. This option is particularly useful if you have used your Flip for a while (that is, lots of customization) and it’s already in Developer Mode (since that wipes the device, anyway). The advantage of installing internally is that the internal storage device is much faster than virtually anything you attach, and you’ll end up with a snappier Linux.

Second, to the hardware. The Flip has a zippy Skylake processor, for which support is relatively good. Relatively means that the only thing known to absolutely not work (at the time of writing) is the internal sound system. If sound is important to your work and you can’t live with Bluetooth, you sadly have to pass for now (but check back later, as there is a lot of work being done right now).

Third, external devices. This is a sad story, unfortunately. Apple introduced the stupid idea of having only tiny numbers of ports and Asus followed suit. The only external ports you’ll find on the new Flip are an SD card slot and a USB-C port. Yes, you can attach anything you want on the latter – but it will stick out like a sore thumb (drive). You can install on an SD card, but that comes with lots of issues, as I found out.

Fourth, installation options. Basically, there are two ways of dealing with the installation: the regular Linux installer and a new software package, chrx, which is more specifically geared towards the issue at hand. I ended up with chrx because it was the only non-frustrating option.

Without much further ado, here is the sequence of steps I followed to have an amazing installation of GalliumOS in dual-boot. Please, make absolutely sure you read the section below the sequence, where I describe the issues I had, because they explain in detail what and why.

  1. Create a recovery image. Can’t stress how important this is
    1. Get an SD card or USB drive (with USB-C connector), at least 4GB in size (“the memory device”)
    2. Start the Flip and run the initial configuration
    3. Start the web store
    4. Search for Chromebook Recovery Utility and install
    5. Insert the memory device
    6. Start the recovery utility and follow prompts. Enter the ID of the Flip that shows in the box (starts with CAVE)
    7. Select the memory device from the list
    8. Wait until a recovery image is downloaded and created
    9. Eject the memory device
    10. Reboot
  2. Activate developer mode. Skip to the next step if you are already in developer mode. Activating developer mode will factory reset your Flip, so you will lose all data on the device!
    1. Hold Esc + Refresh and hit the power button (left side of the Flip)
    2. The computer will (re)boot and show an ugly screen (which screen depends on circumstance). Hit Ctrl + D
    3. You will get a screen telling you about turning OS verification OFF. Hit enter (turn off verification)
    4. The Flip will reboot. You may get a screen saying a critical update is being applied, and when that’s done, the Flip will reboot again
    5. You will get another ugly white screen (that you’ll see from now on whenever the Flip reboots). Hit Ctrl + D
    6. The system will warn you that it will go into Developer Mode in 30 seconds. Wait 30 seconds. You will lose all data on the device!
    7. The system is going to enter Developer Mode, which takes anything from forever to an eternity. Then it will reboot.
    8. Ugly screen again. Get used to it. Hit Ctrl + D. Memorize the key combination. Or wait and hear the super-annoying double-beep of doom.
    9. The Flip starts in ChromeOS mode. All your data has been erased!
    10. Reconfigure as if you had turned on the Flip for the first time
  3. Update firmware (recommended). Where “recommended” means, “do it, you lazy bum!”
    1. On the Flip, open a chrome window and go to http://mrchromebox.tech
    2. Select the “Firmware Utility Script” menu item (left sidebar)
    3. Copy the script under “To download and run this script,…”
    4. Open a shell window: Alt + Ctrl + T
    5. You get a black screen with white text on top and a yellow “crosh>”. Type “shell” + enter
    6. You get a command prompt that says “chronos@localhost / $” and a red rectangle
    7. Hit Shift + Ctrl + V to paste the command from c. above
    8. You will get a menu with options 1), 4), 5) available. 1) is going to be Install/Update RW_LEGACY Firmware. Type “1” + enter
    9. You will be asked if you want to default to booting from USB. In this case, you will start in Linux. I selected no (default) so the Flip starts in ChromeOS
    10. The Flip will download and install the correct firmware. Once finished, hit enter to return to the main menu
    11. Hit R for reboot. Login to Chrome
  4. Run chrx to install GalliumOS in dual-boot
    1. Open a Chrome window and go to http://chrx.org
    2. Copy the script under “step-by-step” (This and the following is like the firmware script above)
    3. Open a shell window Ctrl + Alt + T
    4. Enter “shell” + enter
    5. Hit Shift + Ctrl + V, then enter
    6. Follow instructions. The Flip will reboot
    7. Repeat a. to f.
  5. Start GalliumOS
    1. At the annoying boot screen, hit Ctrl + L and you will be able to start GalliumOS. Ctrl + D gets you to ChromeOS

Notes: The process was extremely frustrating and painful for me. Initially, I tried to install on a memory card using the GalliumOS installer from an ISO image on a USB stick attached using a USB-C to USB-A converter. GalliumOS started just fine, it ran the installation on the card just fine, but when I tried booting, I got nothing. The text mode screen said it was starting from Hard Disk and just froze there.

Next I tried to install using chrx on the card, which you can do. Same result. Since GalliumOS started fine from the ISO, I knew the problem was not the OS but the configuration of the installer. trying to triage the issue, I read that the problem could be the SD card, so I got a new one. Same issue.

I finally restored the factory image, which apparently doesn’t reset the boot flag (still in Developer Mode), but everything else. Still, running from SD card netted me a big fat nothing. This was the 12th time I tried, so I decided to go for the approach above: I reset to factory image (still in Developer Mode, though) and let chrx run its default mode. In it, it takes part of the internal drive on which ChromeOS resides and installs Linux there, making it unavailable to Chrome.

I decided that was an OK thing to do, since I had an SD card to save things on. In the end, it was better this way, because I could use the SD card to share information between ChromeOS and GalliumOS. I should also note that chrx, annoyingly, won’t allow you to save the downloaded image and always fetches it fresh, no matter how many times an hour you try and fail to install.

What do you know, this time was the charm and GalliumOS booted just fine. It’s fast, it’s full-featured, and it has the power of Ubuntu behind it (it’s a modified version of Xubuntu). Note that chrx allows you to install full Ubuntu and a bunch of other distributions and variants, but it installs GalliumOS by default.

As you noticed in the litany of errors I got, this process was not easy. I hope I made it easier for you, but I must disavow all responsibility and give no warranty that any of the steps above is (a) correct or (b) free from perils, risks, and/or injury. In particular, if you didn’t backup your data and/or have no recovery image available, you shouldn’t have read this article and should probably not own computers in the first place. You may apply for a position in IT security at Equifax, possibly.