Section Under Construction
Submarine
Experimental bootloader for ChromeOS' Depthcharge
Submarine provides a minimal Linux environment that lives in a small partition (16MB) on the disk. This is used to boot into a full Linux distro through kexec.
Prebuilt Images
If you're just trying to get Linux running on your Chromebook, these are likely the images you need.
We offer prebuilt versions of the images per each commit:
The kpart file can be flashed to an existing partition, see Usage
Dependencies
Please make sure you have these dependencies first before building.
make
gcc
flex
bison
elfutils-devel
parted
vboot-utils
golang
xz
bc
openssl-develAdditionally, you'll need to install u-root and depthcharge-tools (if you have the Terra repository (opens in a new tab), you can dnf install them).
To install the latest versions:
go install github.com/u-root/u-root@latest
pip3 install depthcharge-toolsLastly, you may need to install a cross-compile gcc. For example:
gcc-aarch64-linux-gnuBuilding
Simply clone this repo (opens in a new tab) with submodules, so pass --recurse-submodules to git clone, then:
make -j$(nproc) <x86_64|arm64>Please note that you must pass an architecture target.
The build output is located in build/.
You can now dd the .bin to a disk, or a .kpart to a partition, more information below.
Usage
Before you can boot submarine, you need to enable booting from external storage. On your Chrome device, make sure developer mode is enabled, then go into ChromeOS, press Ctrl + Alt + F2 (This will either be the forward or refresh key on the top row) to switch to vt2. Log in as root (chronos, no password) and run the following command:
sudo enable_dev_usb_bootFor quick testing, you can flash submarine-<arch>.bin to an external drive. This image includes a partition table already set up for booting ChromeOS kernels.
So, for example, replace /dev/sdX with the device file of the external drive:
sudo dd if=build/submarine.bin of=/dev/sdXAlternatively, you can create your own partition to install submarine to. Start by creating an EXT4 partition (16MB for x86_64, 64MB for aarch64). Next you will edit the partition flags to tell depthcharge that you can boot from that partition by running the following command (you may need to install the vboot-utils package):
cgpt add -i <partition number> -t kernel -P 15 -T 1 -S 1 /dev/sdXAs always, substitute in the correct values for your drive. You can then flash submarine-<arch>.kpart to the partition you just created.
So, for example, replace /dev/sdX with the device file of the external drive:
sudo dd if=build/submarine-<arch>.kpart of=/dev/sdXAfter installing submarine to an external drive, plug in your drive with submarine to your ChromeOS device. On the developer mode screen, press Ctrl + U to boot from external storage. If all goes well, you should soon see the submarine boot menu.
If you want to install submarine to your internal disk to avoid having to boot using an external storage device, install your operating system like normal, and then create a partition on the internal disk for submarine as described above.
You will then need to flash the .kpart and set the flags using the cgpt command above (note, if you do not want to make another partition, you can safely wipe the EFI partition and use that space for submarine instead).
If you run into any issues, please report them. Include the model of your device, which can be found on the developer mode screen.
If you want a guide on how to install Ultramarine using this 'manual' method, follow the instructions here (opens in a new tab). Note that we also have (unofficial) guides for some other distributions in this devdocs section.