Boot Linux-based operating systems from a RMA shim.
terraOS utilizes a bug in chromebook RMA shims, which are bootable recovery images that are used for running diagnostic utilities, to chainload regular Linux distros by replacing the rootfs. Replacing the rootfs entirely doesn't work however, since the RMA shim boots in an environment made specifically for those diagnostic utilities. terraOS is made to get around that.
You'll need to create a partition with the type chromeOS rootfs
(3cb8e202-3b7e-47dd-8a3c-7ff2a13cfcec
) and bootstrap your distro in the root of an ext4 filesystem on that partition. Place any squashfs files in the root of the first partition.
Make sure you use an Arch Linux system as other distros are not supported due to the lack of scripts for bootstrapping Arch Linux.
bash ../scripts/build_stage1.sh <defconfig>
terraos
as the defconfig if building for x86_64 chromebooks.terraos_jacuzzi
as the defconfig if building for jacuzzi
board chromebooks. Support for jacuzzi
board chromebooks is experimental and may not work, however.bash ../scripts/build_aur_packages.sh
bash ../scripts/build_all.sh <shim.bin> <board_recovery.bin> <reven_recovery.bin>
replacing <shim.bin>
with the path to a shim for your board, <board_recovery.bin>
with the path to a recovery image for your board, and <reven_recovery.bin>
with the path to a chromeOS flex recovery of the same version. This will place a built bootloader image, squashfs and tarballs of the arch rootfs, a bootloader image with the arch rootfs, a bootloader image with terraOS chromeOS, and a bootloader image with both the arch rootfs and terraOS chromeOS in the build directory.
The default arch rootfs user is terraos
and its password is terraos
.
sudo fdisk -l
to find your internal storage. Replace /dev/mmcblkX
in the rest of the steps with the internal storage device.sudo dd if=<image> of=/dev/mmcblkX status=progress bs=16M oflag=direct
to write the image to the internal storage. Replace <image>
with the path to the image you copied.Alternatively you can manually create a chromeOS rootfs
type partition via parted
or fdisk
, format as ext4, and copy over the rootfs.
Yes, edit /sbin/init
on the terraOS bootloader partition and pass terraOS the arguments autoboot <partnum>
where <partnum>
is a partition number on the same disk as terraOS.
Yes, you will need to either use a non-systemd distro or manually compile systemd with the chromiumos patches.