2

I want to copy the latest Ubuntu release installer ISO to a usb key. I may be wrong but from my knowledge, on an uefi machine it is not necessary to have boot in MBR, the EFI folder suffices to boot the installer. So why not simply copy the .iso content as files on a GPT fat32 usb stick ? This solution works for Windows and MacOS (I tried both) and avoids to "burn" to the usb stick, as it is prone to damage the usb stick, and also erases its content.

I can without issue extract and copy the files from the .iso to a folder but it fails for some symbolic or hard link files when copying to the usb stick.

So I wonder if there is still a simple solution for uefi machines to get a bootable Ubuntu installer on a key without writing image using unetbootin, dd,.. and without erasing what may already be on the stick ?

hello world
  • 153
  • 9

4 Answers4

3

Simply copying and pasting the files (remember to also copy hidden files on the iso) works also on ubuntu. I recently created a bootable USB for my ubuntu 18.04 LTS by simply copying the files from the ISO to a clean fat32 pendrive (MBR partition table). When i booted the pen on UEFI machine it just worked. I was scared using dd was going to damage the drive

However when I tried that same bootable pendrive to boot in Legacy (BIOS) mode on a different machine it didn't work. In that case i came back to using dd which worked

ptetteh227
  • 2,044
3

While it is straightforward for Windows and MacOS (simply copying content of .iso installer(s) to usb partition(s)), it seems there is no simple solution to get an UEFI-only live for Ubuntu 18.04 LTS, as the ISO contains 3 symlinks and these files cannot be copied to a fat32 partition. Doing so will result to a usb key that will boot but fail to completely load the system and lead to initram shell because of the missing links.

To allow to get an uefi-only working usb live for Ubuntu 18.04 LTS by simply copying files from the ISO, we would need a different ISO distribution designed to work without symlinks.

EDIT : It appears that the missing symlinks are not necessary for the live/installer to work. So simply copying files to a fat32 partition is sufficient to have an UEFI-only bootable and working Ubuntu 18.04 live installer. MBR or GPT partitioning has no importance (for UEFI machine), but the latter allows to add many more (primary) partitions so I would recommend it. If it however does not work on a UEFI machine, this should be for other reasons specific to hardware/software setup, like old worn hardware, corruption or whatever.

hello world
  • 153
  • 9
2

Backup

You should backup all data that you don't want to lose to separate media. Do this at regular intervals or when there is something important to backup.

This advice is relevant to data on all drives, particularly USB pendrives and memory cards, because they are mass produced, and the lifetime is hard to predict. They may fail suddenly.

Make a clean installation

It is a bad idea to create a USB boot drive of a drive, where you keep data unless you have a special reason for it, for example because you want to upgrade a persistent live drive. There is always a risk that the data will be damaged, by a human mistake or power failure or because the internal system in the pendrive is 'overloaded'.

Cloning is a robust method

I have used USB pendrives a lot for years (because I develop tools for creating USB boot drives and I test Ubuntu community flavours before they are released). I use the cloning method, and the pendrives survive.

The cloning method writes only once (yes, from the beginning of the drive all the time), but on the other hand a cloned Ubuntu iso file makes a read-only iso9660 file system, so there will be no writing onto it while you are using it to run a live system or install Ubuntu from it.

When the data transfer speed is reduced to about half of the original speed, I wipe the whole drive, which restores (almost) the original speed and also reduces the risk of a corrupted internal management of data inside the USB pendrive.

Extraction methods

If you want a persistent live drive, you should normally use an extraction method, that tampers with the partition structure, boot structure and copies files. It is more sensitive (compared to cloning) but works too, and you can install programs and store data on the pendrive.

Maybe the 'Do it yourself' method described in one of the links is what you want. It works in its simplest form in UEFI mode.


Edit because the 'Do it yourself' method failed for you

My experience was from earlier versions, so I tested now with Ubuntu 18.04 LTS.

The first attempt was a little tricky and flaky. I had to remove 'quiet splash' from the grub menuentry in order to make it boot all the way in my Toshiba laptop (which is my test computer). I tried again and found that the electrical connnection was flaky with the pendrive I used. The connection went on and off, when I wiggled a little on the pendrive.

So I tested with another [less worn] combination of pendrive and USB hub, and now it works flawlessly. The following screenshot shows that it works even when those links are broken (red in the list by ls). Please notice the boot flag. I think it is important.

enter image description here


Links

Pendrive lifetime

mkusb - tool to create boot drives

Cloning and extraction - you may like the 'Do it yourself method'

Installation/FromUSBStick

sudodus
  • 47,684
0

1- Download the iso file from the official Ubuntu website

2-
* If you are using a Debian based distro (Ubuntu, Linux mint, ...) you can create a bootable USB using gnome-disk-utilisty (you can find it a good tutorial :here)
* If you are using Windows, you can use universal boot to create a bootable usb ( you can follow this tutorial)

3- Plug your USB drive to your computer then reboot it, and follow the installation steps.

singrium
  • 7,320