-
Notifications
You must be signed in to change notification settings - Fork 36
Dual boot Chrome OS and Linux
Installing another operating system alongside Chrome OS can be difficult, since Chrome OS enforces a particular partitioning format. If the partition layout is changed, Chrome OS will "repair" itself (i.e., reformat the disk and reinstall itself) upon next boot, which can cause data loss.
To avoid catastrophe, we will adhere to its enforced layout and simply resize the partitions we want to use rather than creating new partitions.
The following guide will produce a booting, up-to-date system that can be customized as desired.
Follow the instructions listed at How do I restore ChromeOS after it has been removed? to update firmware, install Chrome OS, and get the disk set up.
Use the Chrome OS partition resize script to allocate more space to the partitions Linux will be using (KERN-C
, or /dev/sda6
, will mount to /boot
. ROOT-C
, or /dev/sda7
, will mount to /
).
Open a shell in Chrome OS by pressing CTRL+ALT+T and executing shell
when presented with a prompt.
Execute the following commands to download and run the partitioning script.
$ wget https://raw.githubusercontent.com/ethanmad/chromeos-resize/master/cros-resize.sh
$ sudo bash ./cros-resize.sh
When everything is to your liking (you may check the partition sizes with cgpt show
or lsblk
), install Linux as you normally would, taking care to deviate from standard installation as described in the next section.
Arch Linux: Follow the Beginner's Guide until Prepare the storage devices.
Gentoo: Follow Gentoo Linux amd64 Handbook until Introduction to block devices
Check which drive the SSD is (it's usually /dev/sda
, but it can differ). Replace the /dev/sdx
with the correct drive where applicable below.
Format the disks.
# mkfs.ext4 /dev/sdx6
# mkfs.btrfs /dev/sdx7
btrfs
is suggested here for the root partition, as its transparent compression will allow us to make the most of our limited disk space.
Then, mount the volumes:
# mount -t btrfs -o compress=lzo /dev/sdx7 /mnt/<chroot directory>
# mkdir -p /mnt/<chroot directory>/boot
# mount /dev/sdx6 /mnt/<chroot directory>/boot
And remember to update your /etc/fstab
with appropriate mount options to enable btrfs
compression.
Arch Linux: Follow the guide from Installation to Install a boot loader. Install grub
with pacman -S grub
.
Ensure to install grub
using the following flags:
# grub-install --target=i386-pc --force /dev/sdx
Note there is to be no partition number when specifying /dev/sdx
.
Edit /etc/default/grub
to look like so:
- Uncomment
GRUB_TERMINAL_OUTPUT=console
- Turn off
GRUB_GFX_MODE
(comment out the line enabling it).
Proceed with your installation, reboot, and then install linux-samus
after setting up a user account.