How to make bootable USB via dd in Linux?

 


Recently I came up to a dd command in my Udemy Linux LPIC-1 course. It's a very useful command which you can use to make a full back-up of your partition, copy data, partitions and much more. But, in this article I'm going to show you practical side of dd command and how you can use it to make a bootable USB installation of your favorite Linux distro?


1. Make sure that your USB drive is formated

First thing that you need is to prepare your USB drive. It should be formatted in order to put a Linux distribution on it. First off all, plug in your USB drive and type the following command. 

# df  -hT


This command will list all your devices on the system. Note at the bottom, there is /dev/sdb which is USB drive mounted at /home/amar/tmp. We need to unmount it using the following command. 

# sudo umount /dev/sdb 

Once this command is issued on the terminal, the USB device will be unplugged. Our next step is to format it in order to place Linux distribution to it. We can use the following command to accomplish the task. 

# sudo  mkfs.ext4  /dev/sdb



Now, we need to jump into download directory in order to find our Linux .iso. 


I have downloaded recently a Zorin OS 15.3.Core 64.bit.iso that I'm going to install on USB. It'a great OS and a full review is also coming at this website. Now, let's write the Zorin OS to the usb drive. Here's the command. 

# dd bs=4M if=Zorin-OS-15.3-Core-64-bit.iso of=/dev/sdb status=progress oflag=sync


The write up process of Zorin OS has been successfully started and dd command now writes the Zorins OS on to a /dev/sdb drive. While dd commands write the Zorin to my drive, here's the quick note on how dd command works.

In order to work properly with dd command, we need to pass the input file or if, in our case it's a Zorin OS.iso which is input file or a source from where wee want to copy our Linux distribution; and last is output file or of, which in our case is the /dev/sdb drive on which we are copying the Zorin OS distribtution. In the above command, the bs flag means 'bytes per second' or write speed which is set to 4 MB. 

The status progress flag is simply to tell dd command to display the copying progress in terminal. 


Our Zorin OS is successfully copied on to USB drive. The final thing left for this article is to boot the USB drive to make sure that Zorin OS will boot. Let's see.


If you see such a screen as on above image, it means that dd command has successfully completed operation and that Zorin OS is now bootable. 

There you go. Now you can plug in your USB drive, test your distribution of choice, try it out, install it from your USB drive. So, in this article you have learned how to unmount USB drive, how to format it via terminal and how to make it bootable using dd command. If you like this article, please share and I see you next time. 

Share:

Nema komentara:

Objavi komentar

POPULARNI POSTOVI

Oznake

NAJNOVIJE