
To change the boot partition, we just need to edit the grub.cfg file.
#Disk formatting install
It is possible to also install a 32-bit bootloader in the same partition, but we currently do not do that. 64-bit EFI BIOSes will use this bootloader.

The ChromiumOS build process creates an EFI System Partition (partition 12) and installs a 64-bit version of grub2 as the bootloader (/efi/boot/boot圆4.efi), along with its config file (/efi/boot/grub.cfg).
#Disk formatting code
It then locates the kernel, tells the BIOS that it can free any memory that won‘t be needed later, switches down to 32-bit mode, and jumps to the kernel at the kernel’s 32-bit protected-mode entry point (the same place where the legacy Real Mode code used to jump to). The bootloader queries the BIOS for system information using a set of registered function calls and creates the zeropage table for the kernel. That boot圆4.efi file is the bootloader, which is executed as an application within the EFI BIOS environment (still in 64-bit mode).Contains a file named \efi\boot\boot圆4.efi.Each GPT partition is identified by two GUIDs: a type and a unique ID. The BIOS expects the disks to be formatted using a GUID Partition Table (GPT) which can contain a very large number of partitions, not just four.The BIOS switches into protected mode almost immediately and then switches into 64-bit mode (IA-32e mode).While not enthusiastically embraced by the Linux kernel developers, it offers some advantages over legacy BIOS and is becoming more widely used, especially for 64-bit x86 systems. The Extensible Firmware Interface is a BIOS replacement originally developed by Intel® for its Itanium® systems and later expanded to include x86 and other architectures. Virtualized systems (vmware, qemu, etc.) typically have their own legacy BIOS implementations and will use this method to boot ChromiumOS images. We have a tool and scripts that can change the boot partition GUID in the MBR when we need to select an alternate boot path. The second-stage syslinux bootloader is installed on that partition, along with its corresponding config file (/syslinux/syslinux.cfg). That code can specify one GPT partition to boot, indentified by a matching UniquePartitionGUID field in the Partition Entry Array. The ChromiumOS build process places GPT-aware boot sector code from syslinux in the MBR. Legacy BIOSes will continue to boot ChromiumOS from the MBR. The first part of the kernel then switches to protected mode and jumps to the kernel's 32-bit entry point, passing along the pointer to the zeropage table. At this point, the CPU is still running in Real Mode. After the zeropage table is filled in, a pointer to it is placed in the ESI register and execution continues with the first part of the kernel. It also creates a special table in memory called the “zeropage table.” The bootloader initializes fields in that table by making calls to the BIOS via interrupts.


U-Boot still uses the EFI partition table described below. You can find an overview of the verified boot process in the U-Boot Porting Guide. On x86 we use Coreboot to set up RAM and load U-Boot. U-Bootīoth ARM and (recent) x86 devices use U-Boot as their bootloader. But as with any other GNU/Linux system, the pre-kernel boot process is unavoidably dependent on the hardware, BIOS, and bootloader. We want to make as few modifications to the upstream kernel as possible, ideally none.

ChromiumOS is essentially a specially-tailored GNU/Linux distribution.
