Results 1 to 10 of 12

Thread: UEFI Installing - Tips

Threaded View

  1. #1
    Join Date
    Jun 2009
    SW Forida

    UEFI Installing - Tips

    General UEFI install Info (not for Macs)
    Note that 18.04.1 LTS has long term support.
    Ubuntu 17.10 reached End of Life (EOL) on July 19, 2018
    Systems need UEFI updates for or Meltdown/Spectre mitigation, both Windows & Linux kernel updated, but new variants regularly found, so regular updates needed.

    If re-installing Ubuntu only use Something Else (links to examples below).
    Do not use LVM nor full drive encryption if new user. It will erase your Windows and requires advanced knowledge.
    Many brands/models have unique settings, see below.

    Backups are very important, see backup section below.

    UEFI is now a bit more complex than the old BIOS install as it includes both UEFI and BIOS as options. You must choose in UEFI and choose how you boot installs. Various settings in UEFI/BIOS may be required to enable correct boot mode. You do always want to boot in UEFI mode, but may not need nor want secure boot mode of UEFI.
    Install instructions for dual booting in UEFI apply with any current version of Windows in UEFI mode & Ubuntu in UEFI mode. Very minor differences with newer Windows (same settings required) and Ubuntu versions.

    Major Sections below:
    Summary UEFI install instructions
    Ubuntu UEFI install ISO Download link
    Windows 10 or 8 pre-installed with UEFI & secure boot, Windows 10 upgrade from Windows 7 probably BIOS with MBR partitions. No UEFI system, but if newer hardware it may be UEFI.
    Systems that only boot Windows from UEFI.
    Windows 7 with UEFI (only a few as most used BIOS), or new self built system - no secure boot issues
    Boot-Repair Should only be required if issues, will not fix Windows. Great for Summary Report.
    Partitioning - gpt required for UEFI
    Boot but black screen/Video issues with nVidia or AMD, nomodeset

    Additional Info
    UltraBooks with Intel SRT(Seen as RAID) and dual video
    Two drive installs - both must be gpt partitioned
    efi Menu cleanup
    gpt partitioning
    Backup - Windows & efi partition
    Windows 8/10 repair links
    rEFInd Boot Manager may solve some issues

    Examples by brand - Some users have posted details of how they did it.
    Links to additional info & what UEFI is

    Summary UEFI install instructions:
    1. Back up Windows, your data, and make a Windows repair/recovery flash drive.
    2. Download and create Ubuntu 64 bit installer, flash drive or DVD.
    3. Only use Windows own Disk Management tools to shrink Windows & reboot so it can run chkdsk.
    4. Turn off Windows fast startup in Windows.
    5. In UEFI turn off fast boot (different than fast start up) and often better but not required to turn off
    6. Secure boot (may be called "other" vs. "Windows"), some may need CSM mode on (Dell), but still select UEFI
    7. Some UEFI may need you to turn on or allow USB/DVD boot, especially if Secure boot is on.
    8. Boot Ubuntu installing in UEFI live mode, and verify your system works ok.
    9. Install Ubuntu. links to screen shots below
    If nVidia or AMD video may need nomodeset boot parameter. Some brands also may need other boot parameters.
    Create backup procedure for your Ubuntu data and configuration files.
    If Issue with install, more info needed, or terms not understood, see info & links below:

    Ubuntu UEFI install ISO
    Also link on install guide, from Windows or Ubuntu
    Easy way to create UEFI only bootable flash drive

    Windows 8 or 10 pre-installed & secure boot
    Since vendors also have bugs in UEFI, they are also updating regularly. Best to update to latest UEFI/BIOS version. You may have to make UEFI/BIOS settings changes also. New SSD also may need firmware updates.
    You will need to use the 64 bit version of newest 18.04LTS (best for very new hardware) or latest version 16.04LTS and from the UEFI menu, boot the flash drive or DVD in UEFI mode. That way it will install in UEFI mode. Very new hardware needs latest version of Ubuntu and still may need ppa to update to even newer software/drivers not yet in distribution.

    Systems need Windows fast start up (hibernation) and UEFI/BIOS fast boot or quick boot UEFI settings turned off. Vital for some systems. UEFI fast boot may prevent or make it difficult to get into UEFI menu. Some systems need password set to allow settings changes (Acer for one).

    Use Windows Disk Tools to shrink Windows main partition, but not to create any new partitions, if installing on same drive. Reboot into Windows after shrink so it can run its repairs to its new size.
    Backup efi partition and Windows partition before Install of Ubuntu.

    Shows install with screen shots. Both BIOS purple accessibility screen & UEFI black grub menu screen - Good first link to follow for UEFI install details:
    How To Install Ubuntu Linux Alongside Windows 8 or 10 (UEFI)
    SSD & HDD, but I prefer full backup of Windows before deleting recovery partitions

    UEFI install,windows 8 or newer with Something Else screen shots
    Linux on UEFI: A Quick Installation Guide
    Something Else or manual Install, essentially same for Windows 10 & Ubuntu 16.04.
    More info on Windows:

    It is possible to install Ubuntu on UEFI systems with Secure Boot enabled (using signed versions of Shim, GRUB, and the Linux kernel). But best to use newest version to have latest software updates as UEFI fixes for newest hardware is more up to date in newer versions.
    18.04 & 16.04 LTS Release Notes:

    UEFI systems now have multiple ways to boot - UEFI w/Secure boot, UEFI (secure boot off) and BIOS/CSM. Some UEFI clearly have all 3 settings, others may default. Some are not clear that a Windows boot setting in UEFI means secure boot and you need to select "Other" for UEFI only or CSM- UEFI Compatibility Support Module (CSM), which emulates a BIOS mode. Also the mode you select to boot USB installer may not be the default you have set in UEFI/BIOS. Make sure all boot settings are UEFI.

    Systems that only boot Windows from UEFI.

    Per UEFI standard you should be able to boot any entry in UEFI boot menu. But some vendors have modified UEFI code to only boot the Windows efi file. The UEFI looks for the Windows file name and only boots it. (Note for Acer, it requires "trust" settings in UEFI)
    Installing Grub for UEFI secure boot is only possible if you have booted your system using EFI with the 64bit version with secure boot on. A few systems will only boot with UEFI and secure boot on or with CSM (BIOS) if secure boot is off. Best to test system to see which modes it boots in. In secure boot mode it will only show/allow systems that have secure boot. You may have to change UEFI settings or set password to allow other devices to boot.

    Backup entire efi partition before making changes.

    A: Manually rename files efi hard drive boot files in efi partition /EFI/Boot

    In Boot-Repair "Use the standard EFI file" Should do the same as these manual instrutions by copying shimx64.efi to /EFI/Boot/bootx64.efi for fallback or hard drive boot from UEFI menu.

    Rename /efi/boot/bootx64.efi, copy shim or grub into /efi/boot and name it bootx64.efi Then boot harddrive entry in UEFI menu.
    Older rename of Windows efi file not recommended anymore. (old versions of Boot-Repair did rename the Windows efi file)

    From live installer booted in UEFI mode, mount the efi partition on hard drive, lines with # are comments only: Mount ESP - efi system partition. check which partition is FAT32 with boot flag. Often sda1 or sda2 but varies.
    # if your ESP is not sda1 change this to correct partition
    sudo mount /dev/sda1 /mnt
    only if /EFI/Boot not already existing, run the mkdir command,
    sudo mkdir /mnt/EFI/Boot
    sudo cp /mnt/EFI/ubuntu/* /mnt/EFI/Boot
    # If new folder created, the bootx64.efi will not exist, skip backup command
    sudo mv /mnt/EFI/Boot/bootx64.efi /mnt/EFI/Boot/bootx64.efi.backup
    # make grub be hard drive boot entry in UEFI. Then boot hard drive entry in UEFI menu.
    sudo mv /mnt/EFI/Boot/grubx64.efi /mnt/EFI/Boot/bootx64.efi
    # You may need new hard drive entry (uses default of sda1 for ESP):
    sudo efibootmgr -c -L "UEFI Hard drive" -l "\EFI\Boot\bootx64.efi"
    # if not sda1 you must specify drive X with -d and partition Y with - p , see also man efibootmgr
    sudo efibootmgr -c -g -d /dev/sdX -p Y -w -L "UEFI hard drive" -l '\EFI\Boot\bootx64.efi'

    # confirm entries:
    sudo efibootmgr -v

    More examples of users who manually moved efi files

    B: Edit Windows BCD to make Ubuntu default
    bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
    UEFI NVRAM boot entries are cached in the BCD store
    BCD has 1:1 mappings for some UEFI global variables
    Any time {fwbootmgr} is manipulated, NVRAM is automatically updated

    C: Use efibootmgr, if only Ubuntu install, not dual boot, install to make Windows UEFI description boot grub or shim file (Assumes default of sda1 for ESP, see links for added parameters for different drive or partitions) examples are with efibootmgr's default of sda1 for ESP, additional parameters required if not sda1:
    sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\ubuntu\shimx64.efi"
    If you have Windows to restore Windows boot entry:
    sudo efibootmgr -c -L "Windows Boot Manager" -l "\EFI\Microsoft\Boot\bootmgfw.efi"

    D: Some install rEFInd which seems to be another workaround and has nice boot icons.
    See section below on rEFInd

    Other work arounds for UEFI that only boots Windows.

    Windows 7 UEFI, or new self built system - no secure boot issues, new motherboards may now have Windows secure boot setting. Many call it "Windows" or "Other", "Other" also required for Windows 7.

    You should not have any of the secure boot issues, but still should use the newest versions of Ubuntu. They include many UEFI & grub install updates.
    You still have gpt partitioning and should use Windows disk tools to shrink Windows if you have Windows.
    If installing only Ubuntu (no Windows), see partitioning below. But you then can use either BIOS or UEFI, but probably should use gpt partitioning.
    How to Create a Bootable UEFI USB Flash Drive for Installing Windows 7, Windows 8, or Windows 8.1

    Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot, but not most Windows 7 or 8 issues:
    If issues, run Boot-Repair's summary report and post a new thread in Ubuntu forums.

    Boot-Repair will convert a BIOS install to UEFI by uninstalling grub-pc, and installing grub-efi, if gpt partitioned.
    It can update system to secure boot if you boot in secure boot mode. But then the grub entry for Windows may not work.

    If unsure of which file is orginal Windows boot file - Windows UEFI install should have backup of bootmgfw.efi here:
    C:\Windows\Boot\EFI\bootmgfw.efi from a working Windows x86_64 installation.

    Two Drive installs - See also examples below

    Both drives must be gpt partitioned. Best to include ESP - efi system partition as first partition on every gpt drive, even if booting from Windows efi partition. And Ubuntu's grub only installs to ESP on first drive usually sda or nvme0n1.
    Once you are booting with UEFI, best to have all drives and larger external devices even larger flash as gpt partitioned with an efi partition first even if just for future use. May have to manually edit UUID of efi partition, but Boot-Repair updated for two drive installs.

    And Ubuntu's UEFI grub only installs to the ESP on sda, or not the external drive and not to /EFI/Boot/bootx64.efi. For my PC UEFI full install to a flash drive I manually copied /EFI/ubuntu on sda's ESP to flash drive's ESP. Then copied it again to /EFI/Boot and renamed shimx64.efi to bootx64.efi. I then updated fstab to have correct UUID for ESP on external drive.

    The version of grub in a full install is hard coded to find the rest of grub in /EFI/ubuntu so both copies are requried. There are ways to directly install grub as bootx64.efi, but then you have to manually maintain grub.cfg.
    Good advice on UEFI and two drive installs

    Details on full UEFI install to flash drive or any external drive.

    With UEFI, gpt partitioning is (almost) required. If multiple drives all bootable drives need to be gpt and best if data drives are also gpt in case later you want to make it bootable. With gpt there is no primary, extended, logical partitions as in MBR(msdos) nor the 4 primary partition limit.
    You can only have one ESP/efi partition per drive and with gparted you use the boot flag to assign it as the efi partition. No other partitions can have boot flag. Only if booting in BIOS mode with Ubuntu on gpt partitioned drive, you need a bios_grub partition.
    Windows will only boot in UEFI mode so you cannot install Windows to gpt drive unless booting with UEFI.
    I suggest 300-500MB efi partition - FAT32, 25GB /(root) - ext4, and then either /home - ext4, or /mnt/data partition(s). But you cannot do data partitions as part of install.
    If dual booting with Windows a shared NTFS data partition is also recommended.

    Black Screen/ Video Modes
    This usually required with AMD or nVidia.
    How to set NOMODESET and other kernel boot options in grub2 - both liveCD & first boot, but different
    Newer systems may have this setting:
    Also turn off one Video mode or Intel settings in UEFI/BIOS like Intel NIC if USB flash not working.
    Some Laptops need this in place of quiet splash:
    acpi_osi=Linux acpi_backlight=vendor
    Some laptops just have backlight set way down, press f key to make it brighter

    Some new Intel may need above or this (usually not required with 16.04 or later):
    Or Force Intel Video mode as boot parameter in grub menu - change to your screen size

    New Haswell & Broadwell systems may need newest kernel in currently 14.04.5 or newer verisons to support newest video and other devices. Skylake or Kabylake may need even newer kernels & support software in 16.04 or later.
    Also Ubuntu now has experimental ppa with newest nVidia drivers.

    UltraBooks - Also see examples below Also see updated comment in post #5 below. Grub may correctly install now with 14.04 or later without much effort.

    Ubuntu now installs with Intel SRT on, but when grub sees the RAID grub will not install. So you have to turn the SRT off or set UEFI/BIOS to AHCI and remove the RAID meta data from the drives. Some install Ubuntu to SSD, others install to hard drive and turn SRT back on and have had it work.
    Dell XPS 8920 & Nvidia GTX 1060 & PCIe M2 drive Raid change to AHCI

    Some discussion of limits of new nVidia driver with some Optimus support
    Intel Smart Response Technology
    Some general info in post #3
    Uses larger SSD for both Intel SRT & Ubuntu
    Ubuntu on hard drive, re-enable SRT post #19 details
    If issues with RAID, disable the RAID (Change to AHCI unless RAID 0), it was using the Intel rapid management in UEFI and telling it to disable the acceleration or the use of the SSD. If you have a different system, just disable the RAID system then install Ubuntu. Once installed you can then re-enable it.
    sudo dmraid -E -r /dev/sda
    sudo dmraid -E -r /dev/sdb

    Grub menu (# is comment)

    # You can add this line to grub configuration or turn off the execute bit on 30_os-prober
    gksudo gedit /etc/default/grub
    #or turn off executable bit
    sudo chmod a-x /etc/grub.d/30_os-prober
    # Then do:
    sudo update-grub

    # Edit descriptions used by Boot-Repair or remove entire boot stanza
    sudo cp -a /etc/grub.d/25_custom /etc/grub.d/bkup25_custom
    gksudo gedit /etc/grub.d/25_custom
    #Then do:
    sudo update-grub

    UEFI menu clean up (UEFI saves entries in its NVRAM)
    You first need to remove /EFI/ubuntu folder from efi(ESP) partition or else UEFI may add it back again. Best to fully backup efi partition before making any changes.
    If you cannot do change from UEFI menu, you can from command line with efibootmgr.

    # from liveDVD or flash booted in UEFI mode and use efibootmgr
    sudo apt-get install efibootmgr
    sudo efibootmgr -v
    ls /sys/firmware/efi/vars
    The "-v" option displays all the entries so you can confirm you're deleting the right one, and then you use the combination of "-b ####" (to specify the entry) and "-B" (to delete it). Examples #5 is delete:, with Ubuntu you need sudo, others must be at root.
    efibootmgr -b XXXX -B

    Really UEFI boot menu edits

    Remove Duplicate Firmware Objects in Windows BCD and NVRAM

    gpt(GUID)) partitioning
    Required for UEFI, and for drives over 2.2GB.
    You can also use gparted but must change default partitioning first.
    Select gpt under device, advanced over msdos(MBR) default partitioning before starting.
    Or use gdisk which is in repository, now standard in newer installs:
    GPT fdisk Tutorial -srs5694 in forums
    sudo apt-get install gdisk
    GPT Advantages (older but still valid) srs5694 post #2:

    Backup - Windows, data & efi partitions
    Backup windows before install - post by Mark Phelps
    Another suggestion by srs5694
    Microsoft Windows 7,8 & 10 reinstall/refresh
    Ubuntu backup

    Windows 8/10 UEFI Repairs
    How to: Create a Recovery Drive for reinstalling Windows 10 from Windows 10
    Windows 10 repair disk
    Create Windows 8 Repair flash drive, must be FAT32 to boot in UEFI mode:

    rEFInd - Boot Manager
    rEFInd is a boot manager with graphical boot choices. UEFI and grub are also boot managers, but UEFI is limited and grub only has menu. You will still need grub2 as it is Ubuntu's boot loader but may want rEFInd. rEFInd also solves some issues with UEFI that will not correctly dual boot.
    Now has a ppa to make it easy to install:

    Examples - some older, newer versions of Ubuntu should be easier as major updates to kernel, support software, video & UEFI drivers.
    Dell often requires changing RAID to AHCI, may need UEFI update from Dell and SSD firmware update.
    Dell UEFI Dual boot instructions using Something Else
    Dell XPS 13 9360
    Dell XPS 13 9560 install without issues
    Dell XPS 8920 desktop GTX 1060, needed UEFI/BIOS update

    Toshiba Satellite - turned Secure boot off in Boot-Repair update & UEFI

    Screenshots of secure boot settings Asrock, Asus, HP, Acer

    Haswell Laptop - Toshiba P50
    acer aspire s7 Dual SSD RAID - [SOLVED] Installed Ubuntu on Pre- UEFI Win

    All Acer require supervisor password & enable "trust" on Ubuntu/grub efi files. Acer Trust Settings - details:
    Acer Spin 5 Ubuntu 17.04 Needs Acer password & trust

    Problems Installing on ASUS F555U needed boot option pci=nomsi
    Asus x555u w/o pci=nomsi - space issue on drive and runaway log files filling drive
    ASUS Zenbook Prime UX32VD

    HP to get into UEFI/BIOS menu - escape then f10 as soon as it starts. uct=5171079
    HP Check if Customized UEFI settings available like this HP ProBook 4340
    Dell UltraBook - Instructions & Details in Post #15 & 16 Devine Shine

    Lenovo T540 works but UEFI settings critical or it may brick
    Lenovo Thinkpad E531 - turn off locked boot order setting in UEFI
    Lenovo Ideapad Y500 LiveUSB Problem
    Samsung Ativ Book 9 Plus UEFI Install Troubles - manual copy of grub to /EFI/Boot
    Sony Vaio Pro 13 - To get into UEFI press this "Assist" button BEFORE starting
    [SOLVED] Trouble installing Xubuntu 14.04 on Toshiba Satellite P55-A (UEFI) - file rename
    Phoenix SecureCore Tiano bios setup and secure boot is greyed out. You need to set a Supervisor Password in the Security tab
    Samsung w/ Phoenix Tiano SecureCore

    Two Drive UEFI installs, Internal, external or flash drive
    You must gpt partition in advance including ESP - efi system partition on second drive, then use Something Else to install.
    Install Ubuntu in UEFI mode on second HDD without affecting first HDD
    UEFI dual boot two drives - HP
    UEFI dual boot two drives see #14 on how edit UUID to Windows efi partiton

    Links to more Info
    Background and details of what UEFI is.
    Matthew Garrett's Blog
    Details on Ubuntu's shim with 12.10
    They land alongside their unsigned variants in /boot with the file suffix “.efi.signed”.

    Video Older versions still similar UEFI install process
    Intel - Install Ubuntu 12.10 part 3 of series for new system w/secure boot, part one install keys, part 2 install Windows 8

    Acer Windows 8 Video on getting into UEFI
    Dual-Boot Windows 8 and Ubuntu 12.10 (BIOS)
    Technical info on Legacy BIOS and UEFI AMI AptioMar 2012 - 20 MIn

    Somewhat simple explanation of UEFI:
    ESP/efi - Efi System Partition for UEFI boot on gpt drive:
    bios_grub - For BIOS boot on gpt drive:
    BIOS - Basic Input/Output System # must be inside first 2TB of drive
    CSM - UEFI Compatibility Support Module (CSM), which emulates a BIOS mode, only available with secure boot off.
    Secure Boot -
    LVM Logical Volume Management
    LVM not recommended for newer users, but used with full drive encryption which erases entire hard drive.
    Windows BCD - Boot Configuration Data
    Last edited by oldfred; July 30th, 2018 at 06:31 PM. Reason: Updates 18.04LTS, 16.04LTS
    For more info on UEFI boot install & repair - Regularly Updated :
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts