sebanc / brunch

Boot ChromeOS on x86_64 PC - Supports Intel CPU/GPU from 8th gen or AMD Ryzen
GNU General Public License v3.0
3.62k stars 389 forks source link

Dual booting with Pop_OS (uses systemd-boot) #1148

Open umasse opened 3 years ago

umasse commented 3 years ago

Hello,

I have a laptop installed with Pop_OS, which uses systemd-boot by default. I want to have it dual-boot, with ChromeOS+brunch installed in an image file. The process worked fine, and I have ChromeOS installed into an image file in the main partition. However, the instructions presented are only for GRUB.

I see 3 possible options:

  1. Figure out how to boot ChromeOS from inside the image using systemd-boot.
  2. Install Grub in Pop_OS, but this will break Pop_OS in several ways, and is officially discouraged and unsupported.
  3. Install Grub in Pop_OS, but still boot using systemd-boot. Chainload Grub from systemd-boot, to be able to boot ChromeOS.

Does anyone have any experience with Pop_OS and Brunch? Thanks!

sebanc commented 3 years ago

In general, it is easier to use the linux distro grub to dual boot but in that case you will need to create a separate bootloader (some specific grub features are needed for dual boot).

1) You would need to mount the brunch efi partition (partition 12) and copy the /efi/boot folder to /efi/brunch in your hdd efi partition. 2) replace "grub.cfg" content with the grub config provided by the chromeos-install.sh script 3) Use "efibootmgr" from linux to create an uefi boot entry named "brunch" pointing to /efi/brunch/grubx64.efi 4) (optional) you can probably create an additional boot entry to boot Pop_OS systemd-boot efi file from grub

umasse commented 3 years ago

Thanks! This seems doable. I will check if I can just install grub in Pop_OS to have the files without replacing systemd-boot. That may be easier.

umasse commented 3 years ago

Ok, to recap here, I got it to work. I basically installed Grub in Pop_OS, to make sure all the files were there as they should be.

apt install grub-efi-amd64

Then I tweaked the grub.cfg files with the brunch installer information, just like on Ubuntu. Then I finally went into the BIOS and fixed the UEFI boot entries so systemd-boot would be still the default, because it is the official supported bootloader for Pop_OS. I added a loader .conf file so I can load Grub as an option in systemd-boot, with this content:

title Grub ChromeOS
efi /EFI/ubuntu/grubx64.efi
options configfile=/EFI/ubuntu/grub.cfg

I am not sure if the options line is needed, but it doesn't hurt. Note that this grub.cfg file is just a skeleton that loads the full grub.cfg from /boot/grub/grub.cfg