Skip to content

Instantly share code, notes, and snippets.

@n3ddu8
Created September 2, 2024 11:30
Show Gist options
  • Save n3ddu8/a7c8e04fb2ca5fc40c4456b2f59a3816 to your computer and use it in GitHub Desktop.
Save n3ddu8/a7c8e04fb2ca5fc40c4456b2f59a3816 to your computer and use it in GitHub Desktop.
Installing Linux on a Chromebook using Submarine

Installing Linux on a Chromebook using Submarine

PROCEED AT YOUR OWN RISK

These are the specific instructions that worked for me on an Acer Chromebook Spin 13 and Ultramarine Linux. For more generalised usage, see the source document.

This method requires a raw image not an ISO. There is a method using an ISO in the source material but I haven't tested it.

Contents
  1. Acknowledgments
  2. Prerequisites
  3. Preparing the Media
  4. Preparing the Chrombook
  5. Boot to Linux
  6. Contributing

Acknowledgments

(back to top)

Prerequisites

  • An exisitng Linux machine (MacOS may work too).
  • A USB stick/SD Card < Chromebooks HDD capacity (for the purposes of this document we are assuming a USB stick and will refer to it as so)

(back to top)

Preparing the Media

  • Download an Ultramarine Raw Image with a desktop environment (for example, gnome-base-disk-x86_64.img.zst)
  • Uncompress the file by running:
zstd -d /path/to/file.img.zst
  • Flash the image to the USB stick using an imaging utility that supports .img files.
  • Using your OS disk utility, delete the first partition on the disk, this will be labelled something like: Filesystem Partition 1: EFI 511 MB FAT.
  • Create a new 16MB ext4 partition on the disk.
  • Download Submarine
  • Extract the zip file using your OS files app.
  • Write the submarine.kpart file to the 16MB partition you created earlier by running the following, replacing sdXn with the partition:
sudo dd if=/path/to/submarine.kpart of=/dev/sdXn bs=4M status=progress
  • Set the partition flags (if you don't have the cgpt command, install vboot-utils with your systems package manager) by running the following command, replacing <partition-number> with the number of the 16MB partition you created earlier, and /dev/sdX with the USB disk assignment:
cgpt add -i <partition-number> -t kernel -P 15 -T 1 -S 1 /dev/sdX
  • With the USB drive mounted, navigate to /etc/fstab and delete the line containing /efi/boot

(back to top)

Preparing the Chrombook

There are a few steps you will need to follow to get the Chromebook ready.

Enable Developer Mode

NB: these steps worked on the Acer Chromebook Spin 13 I tested this on, YMMV! WARNING: THIS WILL DELETE ALL LOCAL DATA

  • Press Esc+Refresh+Power to reach the recovery screen.
  • Press Ctrl+D
  • You should see the following message, press Enter to continue:

To turn OS verification OFF, press ENTER. Your system will reboot and local data will be cleared. To go back , press ESC

  • Your Chromebook will reboot, after which, press Ctrl+D and it will reboot yet again.

Enable USB boot

NB: these steps worked on the Acer Chromebook Spin 13 I tested this on, YMMV!

  • Press Ctrl+Alt+F2 (->)
  • Enter username: chronos
  • Run sudo -i
  • Run enable_dev_usb_boot
  • You should see the following:

SUCCESS: Booting any self-signed kernel from SSD/USB/SDCard slot is enabled.

  • Press Esc+Refresh+Power to reach the recovery screen.

(back to top)

Boot to Linux

  • At the recovery screen, press Ctrl+U.
  • Choose the default 01 option.
  • You should see an Ultramarine splash screen before it eventually boots into a DE, this may take a while depending on your flash media.
  • I chose the Gnome DE, and on boot I had to go through the user setup process, again YMMV!
  • Open the Terminal, and run the following to flash the contents of the USB to the internal storage, replacing <usb-stick (likely /dev/sda) and <internal-drive (likely /dev/mmcblk0 if your CB has eMMC storage) - this may take a while depending on the size of your internal storage:
sudo dd if=/dev/<usb-stick> of=/dev/<internal-drive> bs=4M status=progress
  • Reboot, when you reach the Chrome OS recovery screen from now on, press Ctrl+D.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. This is a living document and any contributions you can make are greatly appreciated. Just pop a comment below.

(back to top)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment