diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh index e9c533ff6b..d20ca6a91c 100755 --- a/build_library/create_legacy_bootloader_templates.sh +++ b/build_library/create_legacy_bootloader_templates.sh @@ -134,63 +134,6 @@ label coreos.B EOF info "Emitted ${SYSLINUX_DIR}/root.B.cfg" - cat </dev/null -Partition 12 contains the active bootloader configuration when -booting from a non-Chrome OS BIOS. EFI BIOSes use /efi/* -and legacy BIOSes use this syslinux configuration. -EOF - info "Emitted ${SYSLINUX_DIR}/README" - - # To cover all of our bases, now populate templated boot support for efi. - sudo mkdir -p "${FLAGS_to}"/efi/boot - - if [[ -f /bin/grub2-mkimage ]];then - # Use the newer grub2 1.99+ - sudo grub2-mkimage -p /efi/boot -O x86_64-efi \ - -o "${FLAGS_to}/efi/boot/bootx64.efi" \ - part_gpt fat ext2 hfs hfsplus normal boot chain configfile linux - else - # Remove this else case after a few weeks (sometime in Dec 2011) - sudo grub-mkimage -p /efi/boot -o "${FLAGS_to}/efi/boot/bootx64.efi" \ - part_gpt fat ext2 normal boot sh chain configfile linux - fi - # Templated variables: - # DMTABLEA, DMTABLEB -> '0 xxxx verity ... ' - # This should be replaced during postinst when updating the ESP. - cat </dev/null -set default=0 -set timeout=2 - -# NOTE: These magic grub variables are a Chrome OS hack. They are not portable. - -menuentry "local image A" { - linux \$grubpartA/boot/vmlinuz ${common_args} i915.modeset=1 cros_efi root=/dev/\$linuxpartA -} - -menuentry "local image B" { - linux \$grubpartB/boot/vmlinuz ${common_args} i915.modeset=1 cros_efi root=/dev/\$linuxpartB -} - -menuentry "verified image A" { - linux \$grubpartA/boot/vmlinuz ${common_args} ${verity_common} \ - i915.modeset=1 cros_efi root=${ROOTDEV} dm=\\"DMTABLEA\\" -} - -menuentry "verified image B" { - linux \$grubpartB/boot/vmlinuz ${common_args} ${verity_common} \ - i915.modeset=1 cros_efi root=${ROOTDEV} dm=\\"DMTABLEB\\" -} - -# FIXME: usb doesn't support verified boot for now -menuentry "Alternate USB Boot" { - linux (hd0,3)/boot/vmlinuz ${common_args} root=/dev/sdb3 i915.modeset=1 cros_efi -} -EOF - if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then - sudo sed -i -e 's/^set default=.*/set default=2/' \ - "${FLAGS_to}/efi/boot/grub.cfg" - fi - info "Emitted ${FLAGS_to}/efi/boot/grub.cfg" exit 0 fi diff --git a/update_bootloaders.sh b/update_bootloaders.sh index d2eb7c6921..afe1bd95da 100755 --- a/update_bootloaders.sh +++ b/update_bootloaders.sh @@ -96,13 +96,6 @@ trap cleanup EXIT sudo mount "${ESP_DEV}" "${ESP_FS_DIR}" if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then - # Populate the EFI bootloader configuration - sudo mkdir -p "${ESP_FS_DIR}/efi/boot" - sudo cp "${FLAGS_from}"/efi/boot/bootx64.efi \ - "${ESP_FS_DIR}/efi/boot/bootx64.efi" - sudo cp "${FLAGS_from}/efi/boot/grub.cfg" \ - "${ESP_FS_DIR}/efi/boot/grub.cfg" - # Copy over the grub configurations for cloud machines and the # kernel into both the A and B slot sudo mkdir -p "${ESP_FS_DIR}"/boot/grub