How to make a bootable flash drive that runs on both Legacy BIOS and UEFI machines

To make a flash drive that boots on both legacy BIOS and UEFI machines, use the dd command to write the iso to a flash drive.

First open a terminal and run the command lsblk to determine which device your flash drive is:

lsblk

If your flash drive is sdc for example, then write the iso to your flash drive as follows. The following command is a single line (even though it might appear to be wrapped into multiple lines in your browser window):

sudo dd if=/home/user/manjaro-xfce-16.06-x86_64.iso of=/dev/sdc bs=4M status=progress oflag=nocache,sync && sync

Wait until the process in the terminal is done. This might take a few minutes.

To make sure the process completes successfully, unmount the flash drive:

sudo umount /dev/sdc

Sometimes the .iso will be written from a buffer to the flash drive on the moment that you unmount the flash drive. That is why unmounting the flash drive can be important. So if that happens when you unmount, then simply wait until the process is done. If nothing happens, then continue.

Finally, open your file manager (Thunar) and eject your flash drive. Now pull your flash drive out of your computer and reinsert it. This is needed so that the Linux kernel can recognize the changes that dd made in the partition table and filesystem of the flashdrive. Rebooting your system will accomplish that as well.

That's it, enjoy.

Notes:

  • if stands for 'input file'

  • of stands for 'output file'

  • bs stands for 'block size'

  • status=progress stands for 'show the progress in the terminal'

  • oflag=nocache,sync stands for 'write the data directly to the flash drive instead of using a cache'

  • sync makes sure that the iso is fully and correctly written to your flash drive

Warning: Make VERY sure which device your flash drive is (using the lsblk command), otherwise you could accidentally overwrite another device, disk or drive!

11 Likes

add && sync at end !

3 Likes

On archwiki it is said to use status=progress oflag=nocache,sync && sync and explanation is this:

The option status=progress above reports transfer progress every so often. Although the option oflag=nocache,sync provides synchronized I/O for direct writes, do not miss sync to complete before pulling the USB drive to be completely sure.

3 Likes

So, @Heart-Of-A-Lion, would you edit your initial post to make sure someone new to the issue uses correct options?

1 Like

Yes, I've edited the tutorial.

Or just use Mintstick, install from the AUR. Sometimes a little GUI simplicity just cannot be beat. Great program for formatting usb drives and writing bootables. Works flawlessly on legacy and UEFI, I've never had an issue.

2 Likes

I have used this method on an existing manjaro desktop in order to install dual boot with Windows 10 (installed in legacy mode) on a new HP Probook laptop.
The stick is not recognised in Legacy boot mode only UEFI mode, any ideas?

Thanks for the tutorial.

I just want to ask if you could show me how to create a bootable flash drive with persistence as well? I want to create a small back up usb with the needed a few tools from the repos added into it.

Thanks
Much appreciated.

Manjaro tools don't provide persistence, but you can use them to build your customized iso with all needed packages. See
https://wiki.manjaro.org/index.php?title=Build_Manjaro_ISOs_with_buildiso

Thanks Kainonergon, i dont want to build an iso in such a way. I thought there maybe a way to create a live usb iso with persistence, not a customised iso build as that seems a bit advanced for me. In windows there is a program called pen drive linux that can create bootable usb iso's with persistence so you can add to the image. Thanks for your time.

I've heard that Porteus Nemesis (based on Manjaro) can use persistence, though I never tried it myself. See
https://forum.porteus.org/viewtopic.php?f=138&t=5481

1 Like

That it can, i have an iso image of Porteus, but i cant figure out what program i need to create persistant bootable usb drive. Doesnt have to be Manjaro, could be Debian, Mint, Puppy linux, Porteus. I just need an application or command that can create a bootable and persistant portable usb drive within Manjaro. I have tried a handful of programs but none can offer the needed persistance.

I think you can just install Porteus on USB stick and it will save changes by default. They have detailed guide.
http://www.porteus.org/component/content/article/8-informations/114-official-porteus-installation-guide-v-10.html

1 Like

Forum kindly sponsored by