How do I convert my usb installation from legacy boot to uefi?

6,283

If a live or persistent live system

@C.S.Cameron's comments are relevant.

  • Save the casper-rw file or the content of the casper-rw partition.

  • The method he is describing is explained with more details at the following link,

    https://help.ubuntu.com/community/Installation/iso2usb

  • If you want a persistent live system with a casper-rw partition, you can use mkusb to create it from the same Ubuntu iso file as the previous one. Then the content of the old casper-rw partition will work.

If an installed system (installed like into an internal drive)

It is possible to convert the boot mode from BIOS (alias legacy) mode to UEFI according to this link (as suggested by @MichaelBay in the comment to your question),

Which commands to convert a Ubuntu BIOS install to EFI/UEFI without boot-repair on single boot hardware?


An alternative (for other users, who read this in the future) is to create an installed system (or modify your current system) such that it can boot both in UEFI mode and BIOS mode. See the following link,

help.ubuntu.com/community/Installation/UEFI-and-BIOS

This way you make a system, that is portable between newer and older computers.

Share:
6,283

Related videos on Youtube

Ben Sakac
Author by

Ben Sakac

Updated on September 18, 2022

Comments

  • Ben Sakac
    Ben Sakac over 1 year

    I installed elementary os onto a usb using legacy settings, and I can boot it using legacy bios options. However, I would like to switch the boot to UEFI so that I dont have to change my PC's firmware setting everytime I want to boot windows from my hard drive, or switch it again when I want to boot elementary off the USB. Is this possible, and how would I go about doing it?

    • Meninx - メネンックス
      Meninx - メネンックス over 6 years
      What kind of install is on the USB? Live, Persistent or Full install? If you are using a Persistent install, you can save your casper-rw file to your windows desktop, do a UEFI install and replace the casper-rw file when done. You may need to add the word "persistent" to your boot configuration.
    • Meninx - メネンックス
      Meninx - メネンックス over 6 years
      Not sure what this question has to do with the "duplicated" question, which concerned switching the internal drive to UEFI, this question concerns getting a USB drive to boot UEFI.
    • Meninx - メネンックス
      Meninx - メネンックス over 6 years
      For a UEFI only USB device you can simply extract the Ubuntu ISO to the FAT32 formatted USB device using 7Zip and set the boot flag. Add your casper-rw file and the word "persistent" before "quiet splash" in /boot/grub/grub.cfg.
    • sudodus
      sudodus over 6 years
      Ben Sakac, are you asking about an installed system (installed like into an internal drive, but into a USB drive) or about a live or persistent live system)? -- If a live or persistent live system, @C.S.Cameron's comments are relevant, and marking it 'duplicate' is wrong.
    • Ben Sakac
      Ben Sakac over 6 years
      @sudodus it is an installed system, but it is installed on a usb as opposed to an internal drive
    • Marecky
      Marecky over 4 years
      +1 to encurage more contribution from OP
  • Meninx - メネンックス
    Meninx - メネンックス over 6 years
    It does not sound like the op needs BIOS mode, only to boot the USB in UEFI mode, so he does not need to adjust the computer each boot.
  • sudodus
    sudodus over 6 years
    @C.S.Cameron, You are right. I was thinking about other users, who might benefit from the alternative. But it can be misunderstood. After a short time (enough to let you read this) I will remove this answer.
  • Meninx - メネンックス
    Meninx - メネンックス over 6 years
    Thanks Sudodus, I'm wondering how this question got marked as duplicate? I think this would be the perfect question to propose The Simple Method.
  • sudodus
    sudodus over 6 years
    Until we know better, I edited my answer to add a paragraph (if the original question is about live and persistent live system).
  • Ben Sakac
    Ben Sakac over 6 years
    @sudodus I have an installed system on 32 GB pendrive. What you describe, modifying my system to be able to boot in BIOS and in UEFI sounds like what I want, but the link you provide for that seems to be for creating an install in this way, not modifying a current system to be able to boot in both modes?
  • sudodus
    sudodus over 6 years
    @BenSakac, 1. What about the accepted answer to this question at AskUbuntu: askubuntu.com/questions/509423/… ? 2. I agree about the other link: help.ubuntu.com/community/Installation/UEFI-and-BIOS , it is for creating an install in this way. But you can pick up some tips from there about how to [remove grub-pc and] install grub-efi, which can install a bootloader for UEFI mode without losing the abililty to boot in BIOS mode, if that is what you want.
  • Ben Sakac
    Ben Sakac over 6 years
    @sudodus I am just not sure what I am supposed to be booting from as my system is installed on a pendrive. Should I boot a live uefi usb with the system usb just plugged in? Also, I partitioned the whole drive for the installation, so is it possible to shrink it in order to create the seperate partition for the bootloader without disturbing the system?
  • sudodus
    sudodus over 6 years
    1. It depends on which computers, that you expect to boot from the USB drive. If only computers running in UEFI mode, or only computers running in BIOS mode or both; 2. You can shrink a partition (move the tail end of the partition to create drive space for the ESP (EFI system partition) or bios_grub partition or both, depending on what you need. You can try, but remember that it is risky to edit partitions. You can make a cloned copy before starting.
  • sudodus
    sudodus over 6 years
    It might be easier to start from the beginning from a compressed image file from help.ubuntu.com/community/Installation/UEFI-and-BIOS, and install the program packages (maybe a meta package like lubuntu-desktop or xubuntu-desktop to get the corresponding flavour of Ubuntu, or ubuntu-desktop to get standard Ubuntu).