Creating a bootable Xubuntu flash drive Using a Chromebook

Creating a bootable Xubuntu flash drive Using a Chromebook

Prepping the Flash Drive and Installing Xubuntu

Chromebooks are by far the sketchiest computers for this project. They do not lend themselves easily to booting into other OSes, and you’ll almost certainly need to do a full factory reset in the process. Also, because there are so many different Chromebook manufacturers and configurations, it’s hard to be certain that any single set of instruction will work consistently. You’ll likely need to do some improvisation and Googling to get it all sorted out.

Before you start make sure that you are using an Intel-based Chromebook and that you have three USB flash drives handy. One will become your Chromebook recovery device. The other two will be used to make your first bootable persistent Xubuntu USB flash drive (i.e., a version of Xubuntu that resides on its own USB flash drive, that you can boot from on most computers, and where you can save your work as you go).

As with macOS, this process cannot be done entirely in ChromeOS. So we will break this into two procedures: First we create a bootable read-only Xubuntu USB flash drive. Then we use that drive to run Xubuntu on our Chromebook so we can create a second fully fledged readable/writable “persistent” bootable USB flash drive.

Yes, this is messy. But it (often) works.

PROCEDURE #1: Making a bootable USB drive on a Chromebook

  1. First, save yourself a headache and label your USB flash drives. Call one “Recovery,” another “USB A,” and the third “USB B.”
  2. Install the Google’s Chromebook Recovery Utility, add it as a Chrome extension, and use it to create a recovery image:
    1. Launch the app, follow the pop-up instructions, plug in a your Recovery USB flash drive, and select that device as the location for your recovery image. When the process finishes, remove your recovery device and set it aside.
  3. Now goto xubuntu.org and download the 20.04 LTS (“long term support”) release. (This version of Xubuntu is current and stable, and considered “enterprise grade”; it is scheduled to continue to enjoy full support and updates until 2025, and critical security updates until 2030.) You’ll want the file that ends in “.iso“; it’ll be 1 or 2 GB.
  4. Once the image has finished downloading, rename it, replacing “.iso” at the end of the filename with “.bin
  5. Insert USB A (this is the one that will become your read-only bootable Xubuntu stick).
  6. Launch Chromebook Recovery Utility again.
  7. Click on “Settings” in the top right, chose “Use local image” and then select your “.bin” file from earlier (the name will be something like “xubuntu-20.04.2.0-desktop-amd64.bin“)
  8. Once that process finishes, eject USB A and set it aside. It’s ready to go, but your Chromebook isn’t.
  9. Note: This part is the most confusing, as some steps may differ by Chromebook model. The gist of it is that we are going to enter “developer mode” (which usually means factory reseting the Chromebook), make some modifications to the Chromebook firmware. Once that’s complete you’ll be able to boot from USB whenever we chose.
  10. In order to modify your Chromebook firmware, start with entering “recovery mode“:
    1. Hold down the Esc, Refresh, (the curved circle-arrow key on the top row of keys), and the Power buttons all at once. Release them when the screen lights up.
  11. Ignore whatever is on the screen and instead hit Ctrl + D.
  12. Hit Enter. WARNING: This will wipe the Chromebook and factory reset it. That is our goal.
  13. You are now officially in developer mode on a factory clean Chromebook!
  14. Set up an account and log in, then bring up the Terminal
    1. Different models use different key combos for this. Ctrl + Alt + T and Ctrl + Alt + F2 are common choices. You can Google what they are for your specific model.
  15. Now you’ll need to enter several commands into the Terminal in order to enable USB boot on your Chromebook. For many models, that means typing the following, hitting Enter after each:
    1. shell” (on some models you use “chronos” instead)
    2. sudo bash
    3. crossystem dev_boot_usb=1 dev_boot_legacy=1
  16. You may also need to update LIOS (depending on which Chromebook model you’re using). To do this, type the following commands into the Terminal (hitting Enter after each):
    1. cd; curl -LO mrchromebox.tech/firmwareutil.sh
    2. sudo install -Dt /usr/local/bin -m 755 firmware-util.sh
    3. sudo firmware-util.sh
    4. Then follow the prompts and choose the option (1) to “Modify my Chromebook’s RW_legacy slot
  17. Now it’s time to try to boot from USB! Plug in USB A (your bootable read-only Xubuntu USB flash drive).
  18. Reboot your Chromebook while holding down Ctrl + L
  19. This will bring you to a new menu which will give you the option to boot from USB if you press Esc
  20. Select USB A and wait for it to load.
  21. Success! You are now booted into Xununtu (although you cannot save any changes you make or work you do).

PROCEDURE #2: Making a bootable persistent Xubuntu USB drive on a Chromebook

  1. Next we’ll make a bootable Xubuntu flash drive where you can save your work, install applications, and so on, You should still be booted into Xubuntu. Connect to the Internet.
  2. Once again download the Xubuntu .iso by going to xubuntu.org and downloading the 20.04 LTS (“long term support”) release. You’ll want the file that ends in “.iso“; it’ll be 1 or 2 GB. Save it to your Desktop so that it’s easy to find later.
  3. Now it’s time to install the software that will allow us to create a persistent flash drive. Start by opening the Terminal Emulator (click on the mouse icon in the upper left corner and look under “Favorites”) and enter the following commends at the command line prompt (hit Enter after each, and wait for the command to run; it will return you to a prompt when it’s ready for a new command):
    1. sudo add-apt-repository universe (will probably tell you ‘universe’ distribution component already enabled for all sources; that’s good!)
    2. sudo add-apt-repository ppa:mkusb/unstable
    3. sudo apt update
    4. sudo apt install mkusb
    5. sudo apt install usb-pack-efi  
  4. Now click on the little mouse icon in the upper left and start typing “mkusb” in the Search box. A green icon with a stylized USB-pitchfork will pop up. It will be labelled “mkusb”  Click it to launch.
  5. The program will ask “Run mkusb versin dus?” click YES
  6. The program will warn you that the target device will be overwritten. That’s the point, so click OK.
  7. Chose “i” (for “install (make a boot device)”) and click OK
  8. Chose “p” (for “‘persistent live’—only Debian and Ubuntu“) and click OK
  9. Select your .iso (again)
  10. Plug in USB B.
  11. Select it in mkusb and click OK.
  12. A new window will open labeled “persistent live drive settings”. Click Use defaults.
  13. Another new window will open labeled “select space for persistence (percent)”. click Use default.
  14. One more new window will open labeled “select version of usb-pack”. click Use default.
  15. Next you’ll get the “final checkpoint, go ahead?” dialogue. Select the “Go” radio button and click Go.
  16. Wait. A bunch of stuff will happen in the various open terminal windows. That’s good.
  17. When all of the operations are complete you can click the OK button.
  18. Shutdown the computer (click on the mouse icon in the upper left corner and then click the shutdown power button in the lower right corner of that menu.)
  19. Done! Now test it out. To boot up your persistent Xubuntu flash drive:
    1. Unplug USB A and set it aside. Be sure to leave USB B plugged in.
    2. Start your Chromebook while holding down Ctrl + L
    3. This will bring you to a new menu which will give you the option to boot from USB if you press Esc
    4. Select your USB flash drive from the list.
    5. The next menu is the “Grub” menu; it’s simple and text-based. Highlight the top option (it ends in “persistent live” and is probably already highlighted). Hit Enter. Xubuntu loads as before (likely skipping the big “Install/Try Xubuntu” dialogue box).
    6. Poke around for a bit and familiarize yourself with Xubuntu. Change the desktop background image (there are several ways to do so; one is to right click anywhere on the desktop. Or you can click on that little mouse icon in the upper left and look for Settings). Once you’ve picked a new background image, shutdown the computer entirely. Restart while holding down Ctrl + L and boot back into Xubuntu. If all is working well, then you should still see the new background image you picked.
  20. You will no longer need USB A for anything, feel free to format it and clone USB B onto it, or use it for another project.

All done! You’re ready for the next step. Go back to the “Install PyCKBot” section of Software and carry on.