Ubuntu uefi usb windows

Ubuntu Documentation

Outline

The general procedure to install Ubuntu (or Ubuntu flavour, Kubuntu, Lubuntu, Xubuntu, . ) from a USB flash drive is:

Get the correct Ubuntu installation file, ‘the iso file’, via this link or Ubuntu flavour via this link. Download the iso file into your running computer (for example into the directory Downloads in the internal drive, not into the USB flash drive that you want to make into a USB boot drive).

Check with md5sum (or another checksum tool) that the download was good.

  • Put Ubuntu onto your USB flash drive alias ‘stick’ alias ‘pendrive’ alias ‘thumb’. Tools for this purpose are described in this help page.
  • Configure your computer to boot from USB flash drive and boot from it.

    Try Ubuntu (Kubuntu, Lubuntu, Xubuntu, . ) before installing it.

  • Install Ubuntu to your internal drive (hard disk drive or solid state drive or external drive).
  • See also: Installation/FromUSBStickQuick for beginners starting from Windows.

    Introduction

    Ubuntu can be installed from a USB flash drive. This may be necessary for most new portable computers without DVD drives and is handy for others because a USB flash drive is so convenient. Also, you can configure Ubuntu on the USB flash drive to save changes you make, unlike a read-only CD/DVD disk.

    Booting from a USB flash drive created with usb-creator alias Startup Disk Creator and mkusb will behave just as if you had booted from the install CD. It will show the language selection and then the install menu, from which you can install Ubuntu onto the computer’s hard drive or launch the LiveCD environment. Other utilities, e.g. UNetbootin, may create slightly different boot drives or if on UEFI might not work at all with Debian iso files due to a bug

    Note: This article uses the term «USB flash drive» alongside USB stick, USB drive, USB device, USB pendrive and thumb drive.

    Prerequisites

    To create a USB installation device, you will need:

    a 4 GB USB flash device/drive/stick. If the iso file is smaller than 2 GB, it is possible to use a 2 GB USB device, at least with some of the methods. Files on this USB device will be erased, so backup the files you want to keep before making the device bootable. Some of the tools require that this USB device is properly formatted and mounted while other tools will overwrite whatever is on the target device. Please follow the instructions for each tool.

    an Ubuntu flavour ISO file downloaded from an official web page, ubuntu.com/download or http://releases.ubuntu.com, stored in your running computer (for example in the directory Downloads in the internal drive, not in the USB flash drive that you want to make into a USB boot drive).

    Check with md5sum (or another checksum tool) that the download was good. In Linux there is the tool ‘md5sum’. In Windows you can do it with Rufus: click on the circle with a tick mark (more about Rufus here.)

    Dummy headlines

    After a major remake of this help page the following headlines are kept here because they may be linked to from other web sites. Several other headlines further down in the page are also kept for this reason.

    Notes about speed

    Notes about size

    Notes about bootability

    The flash hardware

    There is a detailed description at the sub-page /pre

    Creating a bootable Ubuntu USB flash drive from Windows

    There are various methods available for Windows to create a bootable Ubuntu USB flash drive.

    NEVER try to use one of your hard disk drives or partitions in this process unless you really know what you are doing, as data will get erased.

    Rufus

    Rufus is the tool in Windows that is recommended officially by Ubuntu. A tutorial is available from here.

    balenaEtcher

    Pendrivelinux’s Universal USB Installer

    UNetbootin

    Win32 Disk Imager

    There is a detailed description at /fromWindows including Rufus, balena Etcher, Universal USB Installer, Unetbootin and Win32 Disk Imager.

    Creating a bootable Ubuntu USB flash drive from Ubuntu

    Install and run Startup Disk Creator alias usb-creator

    The Ubuntu Startup Disk Creator is dedicated to creating USB boot drives for Ubuntu and Ubuntu family flavours (Kubuntu, Lubuntu . Xubuntu).

  • Use another tool (e.g. ‘UNetbootin’ or ‘mkusb’), if you want to create a USB boot drive with another Linux distro (alias Linux operating system).
  • You can find usb-creator-gtk by typing «Startup Disk Creator» (Ubuntu Desktop) or usb-creator-kde in K-Menu—>Applications—>System—>Startup Disk Creator (Kubuntu). If it is not there, then you can install it using the Ubuntu Software Center.

    • Insert and mount the USB drive. Inserting the USB drive should auto-mount it.
    • Start the Startup Disk Creator
    • In the top pane of the Startup Disk Creator, pick the .iso file that you downloaded.
    • If the .iso file isn’t listed, click «Other» to locate and select the .iso file that you downloaded.
    • In the bottom pane of the Startup Disk Creator, pick the target device, the USB flash drive. If more than one choice, please check carefully, until you are sure that you will be writing to the correct device.
    • After checking that you are pointing to the correct target device, the USB flash drive, you can start the action.

    You must enter a password because this is a risky operation. Use the password of the current user ID (the same as for login and running tasks with 'sudo'. Password is not required when installing from a ‘live’ system (booted from a DVD disk or another USB flash drive).

    The Startup Disk Creator clones the iso file, which means that you need neither erase nor format the target drive. It will be completely overwritten anyway by the cloning process. The Startup Disk Creator looks like this in Ubuntu 18.04 LTS:

    Notes

    NEVER try to use one of your hard disk drives or SSDs or partitions in this process unless you really know what you are doing, as data will get erased.

    There are bugs that affect the Ubuntu Startup Disk Creator, when you run it in old Ubuntu versions in BIOS mode and try to create USB boot drives with other versions. In the Ubuntu Startup Disk Creator version 0.3.2 in Ubuntu 16.04 LTS, these bugs are no longer a problem, so you can install any version of the Ubuntu flavours from 16.04 LTS and newer versions.

    UNetbootin

    Download UNetbootin

  • UNetbootin works in and with most Linux distros.
  • It is an extracting tool (not a cloning tool).
  • It can make a persistence file up to 4GB in size to save data and defaults.
  • mkusb — dd image of iso file to USB device safely

    If you want to clone from a general image file to a drive, you can use mkusb. It lets you clone to any drive that is not busy, also an internal drive, and there are very obvious warnings to prevent mistakes.

  • mkusb can also
    • run in Debian and many linux distros that are similar to Ubuntu and Debian,
    • clone from iso files of most Linux distros to create USB boot drives,
    • create persistent live drives of the Ubuntu family and Debian, using all available drive space for persistence and/or data storage,
    • restore a USB boot drive to a standard storage device.
  • There is a detailed description at /fromUbuntu including the Startup Disk Creator, UNetbootin and mkusb.

    Creating a bootable Ubuntu USB flash drive from Mac OSX

    There is a good wiki page about booting with UEFI, and a good tutorial thread, UEFI Installing — Tips.

    Test if running in UEFI mode

    You may want to test if your Ubuntu flavour is running in [U]EFI mode. An installed system and a live system too is using the directory /sys/firmware/efi, so you can run the following command line,

    The following command line is more robust and also easier to understand, so you may prefer it (if you copy & paste and are not bothered by typing a long command line),

    Ubuntu Documentation

    The Extensible Firmware Interface (EFI) or its version 2.x variant, Unified EFI (UEFI) is a firmware type that is widespread on recent computers, especially those more recent than 2010. It is intended to replace the traditional BIOS firmware that is prevalent on earlier machines. This page provides information about installing and booting Ubuntu using UEFI, as well as about switching between UEFI mode and legacy BIOS mode using Ubuntu. Most modern computers support both UEFI mode and BIOS mode. Which boot mode you should use depends on several factors:

    Boot mode matching — If you’re dual-booting with another OS, the two OSes’ boot modes should match. Most computers that ship with Windows 8 and later use UEFI to boot that OS, so this configuration dictates use of UEFI mode when installing and booting Ubuntu.

    Hardware support — Some hardware devices work better in one mode or the other. (Usually BIOS mode is better supported.) This type of problem is becoming less common.

    Boot loader problems — Sometimes a boot loader for one mode works better than a boot loader for another mode. BIOS-mode boot loaders are better tested and are therefore less likely to pose problems.

    Note that these factors can conflict with one another. For instance, if you’re dual-booting with a pre-installed Windows 8 but have problems getting a UEFI version of GRUB to work, you’ll be in a bind. As a general rule, though, UEFI mode works better in dual-boot setups with pre-installed versions of Windows 8. If you’re installing Ubuntu as the sole OS on a computer, either mode is likely to work, although BIOS mode is less likely to cause problems.

    Installing Ubuntu in UEFI mode

    The following sections describe how to install Ubuntu in UEFI mode, either because you’re single-booting and want to try this boot mode or because you’re dual-booting with another OS that’s already installed in this mode.

    Case when Ubuntu must be installed in UEFI mode

    Having a PC with UEFI firmware does not mean that you need to install Ubuntu in UEFI mode. What is important is below:

      if the other systems (Windows Vista/7/8, GNU/Linux. ) of your computer are installed in UEFI mode, then you must install Ubuntu in UEFI mode too.

    if the other systems (Windows, GNU/Linux. ) of your computer are installed in Legacy (not-UEFI) mode, then you must install Ubuntu in Legacy mode too. Eg if your computer is old (

  • if Ubuntu is the only operating system on your computer, then it does not matter whether you install Ubuntu in UEFI mode or not.
  • General principles

    To install Ubuntu in UEFI mode:

    Use a 64bit disk of Ubuntu. (Ubuntu32bit cannot be easily installed in UEFI mode. This is a problem if 32-bit UEFI is the only way your computer can boot, e.g. if you have a modern Intel Atom based laptop. In this case, you will need a complicated work-around.)

    You might want to use an EFI-only image to avoid troubles with mistakenly booting the image and installing Ubuntu in BIOS mode.

    Use a supported version of Ubuntu. Support for UEFI appeared in 11.10, but has become more reliable in next versions. Support for UEFI SecureBoot appeared in 12.10 and 12.04.2.

    Set up your firmware (BIOS) to boot the disk in UEFI mode (see the «Identifying if the computer boots the HDD in UEFI mode» paragraph below)
    Then:

      nothing special is required if you use the automatic installer of Ubuntu («Install Ubuntu alongside others» or «Erase the disk and install Ubuntu»). Important: if you have a pre-installed Windows and you want to keep it, do not choose «Erase the disk and install Ubuntu».

    if you use the manual partitioning («Something else»), the difference is that you will have to set the /boot/efi mount point to the UEFI partition. And if there was not any UEFI partition on your HDD, you first will have to create it (see the «Creating an UEFI partition» paragraph below).

    Identifying if the computer boots the HDD in UEFI mode

    This is possible only if you have already installed Ubuntu on the HDD, or by looking at the BIOS setup (see paragraph below).

    From an Ubuntu installed on the HDD (neither liveCD nor liveUSB), open a terminal (Ctrl+Alt+T), then type the following command:

    [ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD"

    Remark: if the result is «Legacy boot on HDD», then either the BIOS is not UEFI type, or the BIOS is not set up to boot the HDD in UEFI mode.

    Identifying if the computer boots the Ubuntu DVD in UEFI mode

    Warning: even if your PC boots the DVD in UEFI mode, it might boot the HDD in Legacy mode (and the contrary).

    When booting on a 64-bit Ubuntu disk:

    — If the BIOS is set up to boot the CD in UEFI mode, then you will see the screen below:

    — If the BIOS is NOT set up to boot the CD in UEFI mode, or if the disk is not 64-bit, then you will see the screen below:

    Set up the firmware in UEFI or BIOS/CSM/Legacy mode

    Some recent computers (>2011) allow you to set up the computer to boot either in UEFI mode or in BIOS/CSM/Legacy (not-EFI) mode. The way to adjust this setting depends on the computers, but generally this setting is located in the «Boot order» tab of the BIOS (to access the BIOS screens, it is generally necessary to press a key during the PC startup). It can also often be set on a per-boot basis by hitting a function key (F8 and F10 are common choices) soon after you power on the computer.

    Note: Some UEFIs (e.g. American Megatrends’ «Aptio», found on the Asus vivobook series) call Legacy mode «Compatibility Support Module» or simply «CSM».

    Remark: Some UEFIs enable one to set up the boot mode for the optical drive separately from the boot mode for the HDD.

    For example, below:

    • the «UEFI Hitachi» line allows to boot the HDD in UEFI mode,
    • the «P1: Hitachi» line allows to boot the HDD in Legacy (not-UEFI) mode,
    • the «P3: DVD» line allows to boot the Ubuntu CD in Legacy mode
    • the «UEFI: USB» line allows to boot the Ubuntu liveUSB in UEFI mode.

    Here is a 2nd example of UEFI boot mode setting, where the «Boot Mode» parameter enables one to choose the boot mode («UEFI» or «Legacy») for all media (hard disk, CD, USB. ) at the same time.

    Some other UEFIs propose an «UEFI/Legacy Boot:» option with the following choices: [Legacy only], [UEFI only] and [Both]. This last one boots in UEFI mode when possible, then in Legacy mode if no UEFI files are detected.

    Creating an EFI System Partition

    If you are manually partitioning your disk in the Ubuntu installer, you need to make sure you have an EFI System Partition (ESP) set up. This partition holds EFI-mode boot loaders and related files.

    If your disk already contains an ESP (eg if your computer had Windows 8 preinstalled), it can be used for Ubuntu too. Do not format it. It is strongly recommended to have only 1 ESP per disk.

    An ESP can be created via a recent version of GParted (the Gparted version included in the 12.04 disk is OK), and must have the following attributes:

    Mount point: /boot/efi (remark: no need to set this mount point when using the manual partitioning, the Ubuntu installer will detect it automatically)

    Size: minimum 100Mib. 200MiB recommended.

    Performing the Installation

    Once you’ve taken care of the preliminaries, you can install Ubuntu normally. Aside from the ESP, Ubuntu installed in UEFI mode has no special partition requirements, and you need not adjust other installation options. Note that in a UEFI-mode installation, Ubuntu will not ask you where to install the boot loader. If it does, or if it complains about the lack of a BIOS Boot Partition, you’ve probably accidentally booted in BIOS/CSM/legacy mode.

    Identifying if an Ubuntu has been installed in UEFI mode

    An Ubuntu installed in UEFI mode can be detected the following way:

    • its /etc/fstab file contains an UEFI partition (mount point: /boot/efi)
    • it uses the grub-efi bootloader (not grub-pc)
    • from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:

    [ -d /sys/firmware/efi ] && echo «Installed in UEFI mode» || echo «Installed in Legacy mode»

    Installing Ubuntu for Single Boot with a Random Boot Mode

    If you aren’t multi-booting with another OS and you don’t care about your boot mode, you can forego some of the picky details of the preceding procedure and install Ubuntu in whatever boot mode your computer happens to pick. This procedure is not recommended for multi-boot installations alongside existing UEFI-based OSes, because it can result in a combination of one OS installed in UEFI mode and the other in BIOS mode. Such setups will require post-installation repair or other awkward steps to manage switching OSes.

    You should be able to get Ubuntu installed quickly using the following steps:

    Create a LiveDVD or LiveUSB of Ubuntu (>=12.04.2) 64bit.

    Boot your PC using the LiveDVD or LiveUSB and choose «Try Ubuntu». If you get a Secure boot or signature error, you may wish to disable SecureBoot as described here, then retry to boot the disk.
    Install Ubuntu from the Live CD/DVD or Live USB in the usual manner, then reboot the PC.

    If the PC does not load Ubuntu, boot your PC using the Live CD/DVD or Live USB and choose «Try Ubuntu» once again. When the live session has loaded, run Boot-Repair (see link for details). When Boot-Repair loads, click on the «Recommended repair» button, and write on a paper the URL (paste.ubuntu.com/XXXXXX/) that will appear. Then reboot the computer. Do not run Boot-Repair unless you have problems booting the computer; the expression «if it ain’t broke, don’t fix it» applies to this tool.

    This should fix most boot problems. If this does not fix your boot problems, please create a new thread in this forum, describing your problem and indicating the URL you wrote in the previous step.

    Converting Ubuntu into UEFI or Legacy mode

    Converting Ubuntu into UEFI mode

    Note: Do not follow this procedure if your computer is already booting correctly. Use this procedure only if you believe you’ve accidentally installed Ubuntu in BIOS/CSM/legacy mode and you want it to boot in UEFI/UEFI mode.

    Start Boot-Repair, click on «Advanced options», go to the «GRUB location» tab.

  • If you do not see a «Separate /boot/efi partition» line, this means that your PC does not have any UEFI partition. In this case, exit Boot-Repair, then create an UEFI partition (see the «Creating an UEFI partition» paragraph above).
  • If you see a «Separate /boot/efi partition» line, tick it then click the «Apply» button.

    Set up your BIOS so that it boots the HDD in UEFI mode (see the «»Set up the BIOS in UEFI or Legacy mode» paragraph above).

    Converting Ubuntu into Legacy mode

    Note: Use this procedure only to convert an UEFI-mode Linux installation to boot in BIOS/CSM/legacy mode. Such a conversion may be necessary if some hardware doesn’t work correctly under UEFI mode. (Video cards are a common source of problems.) Converting to boot in BIOS/CSM/legacy mode while Windows boots in UEFI mode can make the boot process more awkward — you’ll need to use the computer’s built-in boot manager to switch between OSes, and some computer’s have such poor boot managers that this may be impossible.

    If Ubuntu is installed on a GPT disk (you can check it via the ‘sudo parted -l’ command), use Gparted to create a BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of its disk.

    Start Boot-Repair, click on «Advanced options», go to the «GRUB location» tab.

  • Untick the «Separate /boot/efi partition» option
  • Click the «Apply» button.

    Set up your BIOS so that it boots the HDD in Legacy mode (see the «»Set up the BIOS in UEFI or Legacy mode» paragraph above).

    SecureBoot

    «Secure Boot» is a new UEFI feature that appeared in 2012, with Windows8 preinstalled computers. All current Ubuntu 64bit (not 32bit) versions now support this feature, but as PCs implementing support for it have only become widespread at the end of 2012 it is not yet widely tested, so it’s possible that you may encounter problems booting Ubuntu under Secure Boot. If you do, please file a bug report against the shim package in Ubuntu, preferably using the command ubuntu-bug shim once you’ve installed with Secure Boot disabled.

    Disabling SecureBoot in the BIOS

    Here is an example of BIOS showing that «Secure Boot» is enabled:

    To disable or enable Secure Boot, find a similar option in your BIOS, and use the keyboard to switch it to Enabled/Disabled.

    Remark: if your PC has Windows8, you may need to follow the procedure below to access your BIOS.

    Accessing the UEFI settings from Windows8

    Go to the PowerOff options, and while holding the SHIFT key, click on Restart.

    When the menu below appears, select Troubleshoot, then UEFI Firmware Settings.

    The PC will reboot and you will be able to enter the BIOS (if not press the necessary key).

    See also

    — UEFIBooting (older documentation, maybe useful for Mac)

    — Installing Ubuntu on a Pre-Installed UEFI Supported Windows 8 System: Step by Step guide to install Ubuntu on an UEFI/Secure Boot enabled computer that comes pre-installed with Windows 8

    UEFI (последним исправлял пользователь rodsmith 2015-06-07 16:32:39)

    The material on this wiki is available under a free license, see Copyright / License for details
    You can contribute to this wiki, see Wiki Guide for details

    Читайте также:  Windows in real life
  • Оцените статью