User Tools

Site Tools


ubuntu:boot:prevent_uefi_boot_issues

Ubuntu - Boot - Prevent UEFI Boot Issues

If you installed on a UEFI system you may want to run the following commands before booting into your new installation:

efi="/target/boot/efi/EFI"; \
if [[ -e "${efi}/boot" ]]; then \
  echo "Backup:"; \
  mv -v "${efi}/boot/" "${efi}/boot-bak-$(lsb_release -cs)"; \
fi; \
echo "Copy:"; \
cp -va "${efi}/ubuntu" "${efi}/boot"; \
arch="$(ls -1 {efi}/ubuntu/shim*.efi)"; \
arch="${arch#*shim}"; \
arch="${arch%.efi}"; \
cp -v "${efi}/boot/shim${arch}.efi" "${efi}/boot/boot${arch}.efi";

This will copy Ubuntu's boot files to the default bootloader location and backup any previously existing files. By doing this you save yourself from headaches caused by non-standards compliant behavior of some UEFI firmwares found on VirtualBox as well as some older HP, Toshiba, Sony and other devices.

Related bug report.


References

ubuntu/boot/prevent_uefi_boot_issues.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki