Update: If you’re looking for Windows 10 UEFI installation, take a look at the addendum at the end of the post!
Although there are a lot of applications for creating a bootable flash drive using an ISO image (such as UNetBootin), not many of them support the creation of a bootable flash drive that can be used for installing the operating system in UEFI mode (I’ve never succeeded with UNetBootin personally!).
There is a comprehensive guide about installing Linux in UEFI mode that details all the do’s and don’ts. Most of us are already familiar with all the necessary steps but the creation of a bootable UEFI compatible flash drive from an ISO file 😀 . There are two ways to create a UEFI compatible flash drive:
There is a great application called rufus that does the trick for you. You can find it here. The good thing about this app is that the USB flash drive will end up with a single partition and is still usable in Windows.
(That’s Too Long; Wanna Read; for the lack of a better acronym!)
The other possibility is to use the good ol’ Linux utility disk dump (
dd It should be already available under any Linux installation. It is also available under Windows if you have Cygwin installed. The procedure is as follows.
WARNING: You will loose all the data on your flash drive.
NOTE: If you’re using Cygwin, make sure to run Cygwin as Administrator (right click, run as Administrator).
- Insert the flash drive and determine what device it has been mapped to by running.
cat /proc/partitionsThis should output a list of partitions in /dev. The devices and the partitions are numbered. Since you want to work directly with the whole drive, ignore the numbers at the end. In my case, I found out that my flash drive was mapped to /dev/sde (by observing two entries in the list: /dev/sde and /dev/sde1). Make sure you select the correct partition otherwise you’ll ruin another storage device.
- Dump the ISO file to the device you noted in step 1:
dd if=/path/to/your/image.iso of=[the device above] bs=4MIn my case it was:
dd if=~/image.iso of=/dev/sde bs=4M
This will start dumping the image onto the flash drive. You won’t get any output from the command while the operation is in progress. To check the progress, you need to open another terminal (command) window, determine the
dd process by running
ps -e (which will give you
PID), and then running the command
kill -USR1 [PID]; sleep 1; to see the output of dd in the original terminal (command) window.
After the operation has completed, you can boot the flash drive in UEFI mode. The flash drive is booted in UEFI mode if the output of the following command is a list of files:
Hopefully, the next time I want to install a Linux distro in UEFI mode, I wouldn’t have to Google for two hours.
Unsurprisingly, rufust can also be used for Windows 10 UEFI installation. Unfortunately, I didn’t have much luck with Microsoft’s media creation tool. I used it at first, yet I was getting the black screen which says the installation cannot continue (wish I had taken a note of what it said exactly).
Nevertheless, installation with rufus went smoothly. Here’s a direct link to Windows 10 ISO (link courtesy of Reddit). Grab the image, run rufus, select GPT Partition Scheme for UEFI, file system MUST be FAT32 (I chose the block size of 8192, anything other than FAT32 did not boot for me). Click start and you’re golden 🙂 I also had CSM enabled in my bios settings. Not sure if that really mattered though!
UPDATE: I noticed that the above settings had to be slightly different if the goal was an MBR/BIOS installation. What I had to do was to select “MBR Partition Scheme for BIOS or UEFI-CSM“, and the file system must have been NTFS. Also, I had to completely disable secure boot in the BIOS settings to get the flash drive too boot up.
I’ve forgotten how to use dd command, well it implies that my Linux distro are pretty stable. But now I need to make tests in CentOS distro without virtualize. This safe many efforts, one look (means read a bit) one job done! Thank you!
PS: the command to see operation progress was such pretty good!