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

No entry in rEFInd boot manager #1305

Open Pumpino opened 2 years ago

Pumpino commented 2 years ago

I've been using Brunch on a flash drive on one of my machines. When booting this machine with the flash drive connected, rEFInd boot manager detects and adds Brunch to the boot menu (which also lists three linux distros and Windows).

While I've installed Brunch on separate drives before, this installation was to the second SSD, which also has Windows on it. I installed it from a linux distro running on the other SSD. I added the appropriate syntax to grub in Xubuntu, so I can boot into Brunch fine.

However, I'd like rEFInd to display an entry for Brunch so that I don't have to select Xubuntu in rEFInd and then select Brunch from Xubuntu's grub menu.

Is this possible, or is it because Brunch is installed as an image to a single partition when it's sharing a drive, whereas the installation creates numerous partitions when there is an entire drive reserved for the OS. It seems like the EFI partition hasn't been updated.

balopez83 commented 2 years ago

Here is a not so perfect way that should work. I am not using rEFInd right now so can't confirm its still working but it used to and so should now. I just tested some of the steps and cleaned up my earlier response to hopefully make this a little easier. Once done it should show up in rEFInd.

Basically, here is what I did:

  1. Backup your original EFI partition; the one with rEFInd on it.
  2. Install a clean ChromeOS image to an external USB or SD card (an external HDD/SSD should work fine too)
  3. Boot into a Linux live disk or full install if you have one.
  4. From Linux mount the USB EFI partition 12.
  5. Create a new folder named "chromeOS" (or some other custom name) in the destination drives rEFInd partition within the EFI folder.
  6. Copy all the files within folder "/EFI/BOOT/" from the Chrome USB drive EFI partition 12 and paste into the new folder you just created which for this example I will assume is named "chromeOS"
  7. Reboot to rEFInd and see if the Chrome grub boot loader shows up as an option. If not jump to step 5, if it does you are done unless you want to customize your chainloading. see below if yes.
  8. If rEFInd doesnt see Chrome you may need to add Chrome to the UEFI bios first. Boot into the UEFI settings "BIOS", and add the chrome boot loader to the list of boot options. For some locked UEFI's you might need to use the BCFG commands in UEFI shell and add the chrome grub bootloader that way. If you are not sure how to do this, there is a great instruction set on ARCH linux's wiki pages which can be found with a quick Google search of BCFG. You will need to point your UEFI to the file bootx64.efi. In my case I actually renamed my bootx64.efi to grubx64.efi and pointed my UEFI to that instead to reduce the chance of issues down the road but you may not need to do that at all
  9. After adding the boot entry restart to rEFInd and see if it shows up. If everything worked, it should show up finally.

Once you have everything working you will likely want to customize your chainloading experience. To do this, you will want to boot to Linux again, open the grub configuration text file for chromeos/brunch that is located now on your rEFInd EFI partition in that new folder you just created and adjust things like the time to show the chrome grub boot selection screen among other things.

If none of the stuff above worked, you may be able to add the grub boot settings directly to rEFInd manually. I haven't done it myself but the instructions for doing that should be listed on the rEFInd page. Should be similar to how you would manually add a Grub entry to a standard Linux grub bootloader though ymmv.

Hope that helps